You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,11 +24,13 @@ Installation
24
24
25
25
#. Call object tool's ``autodiscover`` method. This works in a similar fashion as Django's admin; discovering which tools to render in admin. You can do this in any module that is called during initialization but we recommend doing it in ``urls.py``, as illustrated in the next point.
26
26
27
-
#. Hook up URLConf. Do this by pointing a given URL at the ``tools.urls`` method. In this example, we register the default ``Tools`` instance ``object_tools.tools`` at the URL ``/object-tools/``::
27
+
#. Hook up URLConf. Do this by pointing a given URL at the ``tools.urls`` method. In this example, we register the default ``Tools`` instance ``object_tools.tools`` at the URL ``/object-tools/``:
28
+
29
+
.. code-block:: python
28
30
29
31
# urls.py
30
32
from django.conf.urls.defaults import*
31
-
form django.conf.urls import url
33
+
from django.conf.urls import url
32
34
import object_tools
33
35
34
36
# you can skip this if you're using Django >= 1.7
@@ -55,7 +57,9 @@ Firstly create a Django app folder structure as per usual, with the root directo
55
57
__init__.py
56
58
tools.py
57
59
58
-
Edit ``tools.py`` to look like this::
60
+
Edit ``tools.py`` to look like this:
61
+
62
+
.. code-block:: python
59
63
60
64
from django.contrib.admin.actions import delete_selected
0 commit comments