To clarify security, this is the project folder, and Accounts is the application. I am sure this is an elementary problem that I am missing, but I tried my best to get my manged.py commands to work, because the following error:
NameError: the name 'include' is not defined.
My project (Security) urls.py is as follows: it has:
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')), ]
My apps.py accounts contains:
from django.apps import AppConfig class AccountsConfig(AppConfig): name = 'accounts'
The application of my urls.py accounts is as follows:
from django.conf.urls import url, include from . import views urlpatterns = [ url(r'^$', views.home, name='home'), ]
My .py settings have accounts in installed applications:
INSTALLED_APPS = [ 'accounts', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', ]
After adding include to both urls.py for my project and application, now I welcome the next account module, which was not found.
return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 978, in _gcd_import File "<frozen importlib._bootstrap>", line 961, in _find_and_load File "<frozen importlib._bootstrap>", line 948, in _find_and_load_unlocked ModuleNotFoundError: No module named 'accounts.url'