7👍
You are using the include
function in a file in which you’re not importing it. You should add
from django.conf.urls import url, include
to your security app urls.py
EDIT
For the second error, try and change the way you include the urls from accounts. Replace accounts.url
for it’s relative path, starting with the apps folder. For example
url(r'^account/', include('accounts.urls')),
If you have doubts, add your folder structure to the question and I will update the answer properly.
2👍
Here’s the solution:
from django.conf.urls import include
import it on urls.py
page of your project.
0👍
In your rootapp.py you have used
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^account/', include('accounts.url')),
]
Here you have used include('accounts.url')
But you have not imported include
So your code should be
from django.apps import AppConfig
class AccountsConfig(AppConfig):
name = 'accounts'
my security app urls.py is the following:
from django.conf.urls import url , include
from django.contrib import admin
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^account/', include('accounts.url')),
]
- [Django]-Django – how to restrict DeleteView to object owner
- [Django]-How to solve "No Python interpreter configured for the module"? in Android Studio?
0👍
Hi i’m not sure but it works for me. I just installed the module include with this command (in the virtual environment):
pip install include
The script no longer displays error.
- [Django]-Tastypie: JSON header to use UTF-8
- [Django]-Using django.setup() from a subdirectory, how to reference settings?
- [Django]-Saving a Pillow file to S3 with boto
0👍
First try ‘pip install include’
or
you forgot to save your views.py and urls.py
or
add this in your urls.py ‘from django.conf.urls import include’
- [Django]-Django QuerySet querying or filtering "Odd" and/or "Even" value in a particular field
- [Django]-Django can't process non-ascii symbols
- [Django]-Django CMS functionality