sixstone  committed cadf505

Remove autodiscover from init and do this in main app urls file

  • Participants
  • Parent commits ea153a9
  • Branches default

Comments (0)

Files changed (2)

File dbgettext/

 # based on
-from django.utils.importlib import import_module
 LOADING = False
 from django.conf import settings
     LOADING = True
+    from django.utils.importlib import import_module
     import imp
     for app in settings.INSTALLED_APPS:
     LOADING = False
-# go:

File docs/registration.rst

     registry.register(MyModel, MyModelOptions)
+And add autodiscover method in your main application ````
+file. For example::
+    import dbgettext
+    dbgettext.autodiscover()
 That's it. Your ```` files will be automatically imported by django-dbgettext, and registered models will be included when running :doc:`dbgettext_export <dbgettext_export>`.
 You can customise the module name using the ``DBGETTEXT_REGISTRATION_MODULE_NAME`` :ref:`setting <settings>`.