mirror of
https://github.com/django/django.git
synced 2024-12-25 02:26:12 +00:00
Fixed typo in docs
This commit is contained in:
parent
10d32072af
commit
f200ffd701
@ -900,10 +900,10 @@ possible to easily create new instance with all fields' values copied. In the
|
|||||||
simplest case, you can just set ``pk`` to ``None``. Using our blog example::
|
simplest case, you can just set ``pk`` to ``None``. Using our blog example::
|
||||||
|
|
||||||
blog = Blog(name='My blog', tagline='Blogging is easy')
|
blog = Blog(name='My blog', tagline='Blogging is easy')
|
||||||
blog.save() # post.pk == 1
|
blog.save() # blog.pk == 1
|
||||||
|
|
||||||
blog.pk = None
|
blog.pk = None
|
||||||
blog.save() # post.pk == 2
|
blog.save() # blog.pk == 2
|
||||||
|
|
||||||
Things get more complicated if you use inheritance. Consider a subclass of
|
Things get more complicated if you use inheritance. Consider a subclass of
|
||||||
``Blog``::
|
``Blog``::
|
||||||
|
Loading…
Reference in New Issue
Block a user