On Mar 11, 4:46 am, Hugh Zhang <[email protected]> wrote:
> Hi there, i have occured an error bellow with django 1.1:
> *Traceback (most recent call last):
>   File "<console>", line 1, in <module>
> AttributeError: 'QuerySet' object has no attribute 'remove'*
> The whole code about this error is:
>
> *>>> b = Blog.objects.get(id=1)
>
> >>> e = Entry.objects.get(id=234)
> >>> b.entry_set.remove(e)*
>
> So, what's the problem with me? I need your help, thanks!

The documentation that you got this from explains why exactly
underneath the code you have copied:
"In order to prevent database inconsistency, this method only exists
on ForeignKey objects where null=True."

Presumably, your ForeignKey does not have null=True set.
--
DR.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
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