That worked. Thanks for the help.
On Monday, July 23, 2012 9:50:07 AM UTC-7, Dmitry Zimnukhov wrote:
Note, that u1 is not a model instance, but a QuerySet object--
To get a model you should call manager's "get" method rather than "filter"
replace:
u1 = User.objects.filter(id=u)
with:
u1 = User.objects.get(id=u)
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/6Jd96LIUZ48J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment