Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Location of auto discover in urls.py #212

Closed
dmeehan opened this issue Dec 14, 2013 · 1 comment
Closed

Location of auto discover in urls.py #212

dmeehan opened this issue Dec 14, 2013 · 1 comment

Comments

@dmeehan
Copy link

dmeehan commented Dec 14, 2013

In the docs, it says:

In urls.py, call autocomplete_light.autodiscover() before admin.autodiscover()

However, in my experience, you need to put autocomplete_light.autodiscover() also before you import anything from your local apps.

WORKS

from django.contrib import admin
from django.conf.urls import patterns, include, url

import autocomplete_light

autocomplete_light.autodiscover()
admin.autodiscover()

from localapp.views import CustomView

WORKS

from django.contrib import admin
from django.conf.urls import patterns, include, url

from localapp.views import CustomView

admin.autodiscover()

DOES NOT WORK

from django.contrib import admin
from django.conf.urls import patterns, include, url

import autocomplete_light   

from localapp.views import CustomView

autocomplete_light.autodiscover()
admin.autodiscover()
@jpic jpic closed this as completed in 0674edf Dec 16, 2013
@jpic
Copy link
Member

jpic commented Dec 16, 2013

Yes, well there's this and that but I never felt like this was really necessary.

I've updated the docs, thanks !

@rpkilby rpkilby mentioned this issue Jan 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants