Removed unnecessary code-block directives.

This commit is contained in:
areski 2014-08-18 16:30:44 +02:00 committed by Tim Graham
parent fa02120d36
commit 9d6551204e
32 changed files with 161 additions and 308 deletions

View file

@ -2,11 +2,7 @@
Many-to-one relationships
#########################
.. highlight:: pycon
To define a many-to-one relationship, use :class:`~django.db.models.ForeignKey`.
.. code-block:: python
To define a many-to-one relationship, use :class:`~django.db.models.ForeignKey`::
from django.db import models
@ -32,6 +28,8 @@ To define a many-to-one relationship, use :class:`~django.db.models.ForeignKey`.
What follows are examples of operations that can be performed using the Python
API facilities.
.. highlight:: pycon
Create a few Reporters::
>>> r = Reporter(first_name='John', last_name='Smith', email='john@example.com')

View file

@ -2,13 +2,9 @@
One-to-one relationships
########################
.. highlight:: pycon
To define a one-to-one relationship, use :ref:`ref-onetoone`.
In this example, a ``Place`` optionally can be a ``Restaurant``:
.. code-block:: python
In this example, a ``Place`` optionally can be a ``Restaurant``::
from django.db import models
@ -37,6 +33,8 @@ In this example, a ``Place`` optionally can be a ``Restaurant``:
What follows are examples of operations that can be performed using the Python
API facilities.
.. highlight:: pycon
Create a couple of Places::
>>> p1 = Place(name='Demon Dogs', address='944 W. Fullerton')