1👍
For example, the “django-allauth” app is completely independent, and it has a urls.py
file. So in you settings.py
, you load the app:
INSTALLED_APPS = (
...,
'django-allauth',
...,
)
and then in your project’s urls.py
you include the app’s urls:
urlpatterns = [
...,
url(r'^accounts/', include('allauth.urls')),
...,
]
See the Django basic Tutorial:
👤C14L
0👍
If you simply want to import the file, and assuming you have the app installed correctly, then you should just be able to do
from myproject import urls
Source:stackexchange.com