Friday, August 1, 2014

Re: unsupported opperand type(s)

thanks, that helped

I also got confused and created too many objects, so now instead of  p.id  "1" cdm returns  "3". How do I delete objects from p?
>>> from django.utils import timezone  >>> p = Poll(question="What's new?", pub_date=timezone.now())    # Save the object into the database. You have to call save() explicitly.  >>> p.save()    # Now it has an ID. Note that this might say "1L" instead of "1", depending  # on which database you're using. That's no biggie; it just means your  # database backend prefers to return integers as Python long integer  # objects.  >>> p.id  1                                   <----- I HAVE 3 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c7c3b295-9169-4317-81bb-bb0ce2ea8e7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment