Hello,

My Tutorial model has an author field, which can contain many authors:

class Tutorial(models.Model):
    ...
    author = models.ManyToManyField(User,limit_choices_to =
{'is_staff' :1})


When i try to save :

users=[]
users.append(User.objects.get(username='joe'))
users.append(User.objects.get(username='bob'))
t = Tutorial(author=users, ...)
t.save()

I get an error:

TypeError: 'author' is an invalid keyword argument for this function

How do I save this field type using the python console? Does it want a
dict rather than list, how would   I structure the dict? I tried a
quick search but couldn't find the answer.

Thanks!

Milan


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to