Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django TemplateDoesNotExist admin/login.html

I am working with django 1.4. And this error appeared:

TemplateDoesNotExist at /admin/ admin/login.html

I tried to reinstall django, but i did not work... Please Help!

like image 234
Leonardo Coelho Avatar asked Jul 20 '26 06:07

Leonardo Coelho


1 Answers

You can try to add the admin tempates path name to TEMPLATES['DIRS'] in your django settings.py

The default TEMPLATES:

'DIRS': [os.path.join(BASE_DIR, 'templates')]

change to if you are using Django project created by Pycharm:

'DIRS': [os.path.join(BASE_DIR, 'templates'),
         os.path.join(BASE_DIR, 'venv/lib/site-packages/django/contrib/admin/templates')]
like image 121
fengpei xu Avatar answered Jul 25 '26 07:07

fengpei xu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!