File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,9 @@ Next, create a project which uses the application::
52
52
cd ..
53
53
django-admin.py startproject demo
54
54
55
- Add the following to ``settings.py ``::
55
+ Add the following to ``settings.py ``:
56
+
57
+ .. code :: python
56
58
57
59
INSTALLED_APPS += (
58
60
' polymorphic_tree' ,
67
69
The main feature of this module is creating a tree of custom node types.
68
70
It boils down to creating a application with 2 files:
69
71
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
71
75
72
76
from django.db import models
73
77
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
115
119
verbose_name_plural = _(" Image nodes" )
116
120
117
121
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
119
125
120
126
from django.contrib import admin
121
127
from django.utils.translation import ugettext_lazy as _
You can’t perform that action at this time.
0 commit comments