Anonymous user
Django for Designers: Difference between revisions
→Add some bookmarks via the command line: Improve verbiage around id
imported>Paulproteus |
imported>Paulproteus (→Add some bookmarks via the command line: Improve verbiage around id) |
||
Line 932:
<source lang="python">>>> b.id</source>
Python has given you back your prompt because the value of b.id is ''None''. That is because we have not yet saved the object; to the database, it does not exist.
Save your bookmark to the database. In Django, you have to call save() explicitly.
Line 938:
<source lang="python">>>> b.save()</source>
<source lang="python">>>> b.id
|