2π
β
To fix the problem, add piggybank
to INSTALLED_APPS
in your settings.
In your TEMPLATES
setting, you have:
'APP_DIRS': True,
This is the default, and means that Django will look at the templates
directory for each app in INSTALLED_APPS
. In the post mortem you can see:
django.template.loaders.app_directories.Loader: /home/anna/starling/lib/python3.6/site-packages/django/contrib/admin/templates/starling/index.html (Source does not exist)
django.template.loaders.app_directories.Loader: /home/anna/starling/lib/python3.6/site-packages/django/contrib/auth/templates/starling/index.html (Source does not exist)
Itβs not looking in the piggybank/templates
directory because you havenβt added piggybank
to INSTALLED_APPS
yet.
π€Alasdair
0π
You need are missing TEMPLATES DIR
read this django templates
try this
settings.py
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates')], # your dir template path
π€rahul.m
0π
I got this error when I forgot to add the app in installed apps:
INSTALLED_APPS = [
...
'app.apps.AppConfig',
...
]
app is the name of you app, so if your apps name was myApp,
then it would be: 'myApp.apps.MyappConfig',
π€AnonymousUser
- [Django]-What's the difference between settings.AUTH_USER_MODEL and django.contrib.auth.get_user_model?
- [Django]-Django CharFIeld with unique=True update error "Instance with this Name already exists"
- [Django]-Allow user to change its picture. Django
- [Django]-Trouble scheduling and rescheduling posts with Celery
- [Django]-Django QuerySet annotate with Subquery
Source:stackexchange.com