1👍
✅
Django supports this automatically, via the app_directories
loader that is installed by default. See the documentation.
0👍
Maybe you can do the following:
#settings.py
import os
PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
TEMPLATE_DIRS = (
os.path.join(PROJECT_PATH, 'templates'),
os.path.join(PROJECT_PATH, 'app1/templates'),
)
This will save you from editing each and every absolute path in setting file in case you happen to move your project.
- [Answer]-Is calling is_valid() on a form that has hidden values required?
- [Answer]-Binding ModelForm to Model's instance when saving
- [Answer]-How to add likes of an object for the given user
- [Answer]-Server seemingly randomly spitting out error messages: Exception occurred processing WSGI script
- [Answer]-I get error when I try to check my MySQLdb connector in Django shell
Source:stackexchange.com