Thanks for the help Russ: That worked. Next problem :) I want to add users to a group.
g = Group.objects.get(name='section81') gives errors. If I could get that to work I'd want to add a user to that group: u = User.objects.get(username='doe') This also give errors. Finally: u.groups.add(g) Which doesn't work because the previous 2 didn't :) Sorry to ask multiple questions about this but I can't seem to find any clear documentation on this. Vincent On 6/7/07 12:55 AM, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > > On 6/7/07, Vincent Nijs <[EMAIL PROTECTED]> wrote: >> >> TypeError: create() takes exactly 1 argument (2 given) >> >> Any ideas? > > Calling > g = Group.objects.create("section81") > > is the same as calling > > Group("section81") > > This yeilds an error because there is no way of knowing which model > field the string "section81" should be applied to. > > If you make this a keyword argument: > > g = Group.objects.create(name="section81") > > the problem should resolve itself. > > Yours, > Russ Magee %-) > > > -- Vincent R. Nijs Assistant Professor of Marketing Kellogg School of Management, Northwestern University 2001 Sheridan Road, Evanston, IL 60208-2001 Phone: +1-847-491-4574 Fax: +1-847-491-2498 E-mail: [EMAIL PROTECTED] Skype: vincentnijs --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---