Changed team creation to auto generate unique usernames and auto generate passwords like old application

Okay thanks

On 11/17/2014 11:05 AM, nikolas wrote:
>
> In brownfield_django/main/views.py:
>
> >          '''
> >          Should probably retrieve the information for the course here
> >          so it appears in the form/pre-populates the fields.
> >          '''
> >          course = self.get_object(pk)
> >          j_course = []
> > -        j_course.append({'id': str(course.id),
> > -                         'name': course.name,
> > -                         'startingBudget': course.startingBudget,
> > -                         'enableNarrative': self.convert_TF_to_json(
> > +        professors = User.objects.filter(profile__profile_type='AD')
> > +        professor_list = []
> > +        for each in professors:
> > +            professor_list.append({"first_name": str(each.first_name),
> > +                                   "last_name": str(each.last_name),
> > +                                   "username": str(each.username),
> > +                                   "pk": str(each.pk)})
> > +        j_course.append({"id": str(course.id),
>
> I would define the json you're passing in here as a python dictionary 
> first, and then pass the whole thing to |json.dumps|. It seems to be 
> in some in-between format here that isn't very clear.
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/ccnmtl/brownfield_django/pull/7/files#r20444163>.
>