Wednesday, July 4, 2012

Re: Unable to obtain c.poll

On 2-7-2012 23:37, Smaran Harihar wrote:
> Also when we are taking,
>
> c = p.choice_set.filter(choice_text__startswith='Just hacking')>>> c.delete()
>
>
> Are we deleting the object or just that filter queryset choice?

The list returned by the filter.
c = p.choice_set.get(..)
c.delete() # calls the delete method of the choice object

--
Melvyn Sopacua


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