1、 Error: templatedoesnotexist
Exception Type: | TemplateDoesNotExist |
---|
2、 Problem analysis and solution
Problem analysis: the accessed HTML file was not found
reason:
Django directly regards the template path as an absolute path, and the HTML file cannot be found.
After viewing the project setting file, you can see the setting method of template, including an option of “dirs”,
Solution:
'DIRS': [os.path.join(BASE_DIR), 'templates'],
Read More:
- Game development unity xlua framework knowledge series: this type must add to csharpcalllua error reporting solutions
- How to solve the problem of error reporting in the introduction of Python Django no module name ‘Django. Utils. Six’
- Exception occurred when Django created app: from exc ^ syntaxerror: invalid syntax
- django.db.utils.OperationalError: no such table: django_admin_log
- ImageIO.read () unsupported image type when reading picture_ exception Unsupported Image Type
- django.core.exceptions . improveconfigured: error loading MySQL DB module. Django configuring MySQL database
- A first chance exception of type ‘ System.NullReferenceException ‘when occurred, you did encounter a bug
- Default constructor cannot handle exception type FileNotFoundException thrown by implicit super cons
- Error reporting – the project directly introduces the error reporting and solution of. SCSS file
- Solved: elasticsearch error: exception [type = search]_ phase_ execution_ exception, reason=all shards failed]
- Some mistakes and solutions in Django
- Solution — windows 2012 installation Framework 3.5 in VMWare
- Es error mapper of different type, current_ Type “text” solution
- The solution of a Java exception has occurred. And error exception in thread when eclipse runs
- When Python Django creates a database, can’t open file ‘ manage.py ‘: [Errno 2] No such file or directory
- Django project running service reported an error NameError: name ‘OS’ is not defined
- Solutions to Django is not importable in this environment
- Install. Net Framework 3.5 error 0x800f0950 in Windows 10
- Importerror of Django error: no module named**
- Unity Error:InvalidCastException: Cannot cast from source type to destination type.