Skip to content

Commit a857c18

Browse files
committed
Merge pull request #49 from jorgebg/patch-1
Add syntax highlighting for python code blocks in readme
2 parents c33ce75 + 6670f89 commit a857c18

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

README.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ Next, create a project which uses the application::
5252
cd ..
5353
django-admin.py startproject demo
5454

55-
Add the following to ``settings.py``::
55+
Add the following to ``settings.py``:
56+
57+
.. code:: python
5658
5759
INSTALLED_APPS += (
5860
'polymorphic_tree',
@@ -67,7 +69,9 @@ Usage
6769
The main feature of this module is creating a tree of custom node types.
6870
It boils down to creating a application with 2 files:
6971

70-
The ``models.py`` file should define the custom node type, and any fields it has::
72+
The ``models.py`` file should define the custom node type, and any fields it has:
73+
74+
.. code:: python
7175
7276
from django.db import models
7377
from django.utils.translation import ugettext_lazy as _
@@ -115,7 +119,9 @@ The ``models.py`` file should define the custom node type, and any fields it has
115119
verbose_name_plural = _("Image nodes")
116120
117121
118-
The ``admin.py`` file should define the admin, both for the child nodes and parent::
122+
The ``admin.py`` file should define the admin, both for the child nodes and parent:
123+
124+
.. code:: python
119125
120126
from django.contrib import admin
121127
from django.utils.translation import ugettext_lazy as _

0 commit comments

Comments
 (0)