Skip to content

Commit f0e3d30

Browse files
committed
Add note about relative imports
1 parent 90a193b commit f0e3d30

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tutorials/07-templatetags.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ Let's make our template tag actually display entry history. First we will impor
148148
149149
from ..models import Entry
150150
151-
TODO: Add aside explaining ``..`` syntax
151+
.. NOTE::
152+
153+
For more information on the ``..`` syntax for imports see the Python documentation on `relative imports`_.
152154

153155
Now let's send the last 5 entries in our sidebar:
154156

@@ -216,3 +218,4 @@ It looks like we still have a problem because our tests still fail now. Try to
216218
.. _template documentation: https://docs.djangoproject.com/en/1.6/ref/templates/api/
217219
.. _inclusion tag: https://docs.djangoproject.com/en/1.6/howto/custom-template-tags/#howto-custom-template-tags-inclusion-tags
218220
.. _django tutorial part 3: https://docs.djangoproject.com/en/1.6/intro/tutorial03/#write-views-that-actually-do-something
221+
.. _relative imports: http://docs.python.org/2/tutorial/modules.html#intra-package-references

0 commit comments

Comments
 (0)