I figured out what the problem was, while doing a pip install, the package did not install the HTML files into the dist-packages directory where Django_503 resides. You need to manually add a templates folder inside Django_503 and then add the respective HTML files.
Django-503 App Maintenance Template Error
-
24-03-2022 - |
質問
I recently downloaded coagulant's Django-503 app which generates a 503 page so that you can run maintenance.
The problem I am currently having is that I downloaded the app from GitHub and did a pip install. I followed all the instructions. However, when I try to turn on maintenance mode, I get the following error.
Request Method: POST
Request URL: http://XX.XXX.XXX.XXX:8000/admin/django_503/config/1/
Django Version: 1.4.3
Exception Type: TemplateDoesNotExist
Exception Value: admin_warning.html
Exception Location: /usr/local/lib/python2.7/dist-packages/django/template/loader.py in find_template, line 138
Even though the package from GitHub came with the templates, Django can't seem to find them. Is there any possible solution to this?
解決
他のヒント
Is the path containing admin_warning.html in your setting's TEMPLATE_DIRS?
所属していません StackOverflow