Strange, for me it works like said in 1). After the new object is
saved, the id field is not None, but the true id of the object in
database. Maybe I did not understand something?

Also, if you look at the tutorial at
http://www.djangoproject.com/documentation/tutorial1/ it says:

 # No polls are in the system yet.
>>> polls.get_list()
[]

# Create a new Poll.
>>> from datetime import datetime
>>> p = polls.Poll(question="What's up?", pub_date=datetime.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


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" 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-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to