Mark Lavin avatar Mark Lavin committed 2e86d13

Add documentation note about LookupAlreadyRegistered errors. Fixes #28.

Comments (0)

Files changed (1)

docs/quick-start.rst

 
         registry.register(FruitLookup)
 
+.. note::
+
+    You should only register your lookup once. Attempting to register the same lookup class
+    more than once will lead to ``LookupAlreadyRegistered`` errors. A common problem related to the
+    ``LookupAlreadyRegistered`` error is related to inconsistant import paths in your project.
+    Prior to Django 1.4 the default ``manage.py`` allows for importing both with and without
+    the project name (i.e. ``from myproject.myapp import lookups`` or ``from myapp import lookups``).
+    This leads to the ``lookup.py`` file being imported twice and the registration code
+    executing twice. Thankfully this is no longer the default in Django 1.4. Keeping
+    your import consistant to include the project name (when your app is included inside the
+    project directory) will avoid these errors.
+
 
 Defining Forms
 --------------------------------
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.