I re-organized Django,the following way:
config
- settings
- base.py
- local.py
urls.py
wsgi.py
also apps:
- apps(level0)
- acc(level_1)
- users(level_2)
- templates
- users
- acc_control(level_2)
-att(level_1)
- notes (level_2)
- notifications (level_2)
- mark(level_1)
- config (level0)
- templates(level0)
Some apps are directly in apps folder, ex mark, others are in other subfolders, ex users
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates')]
My issue is regarding templates access, because I receive the following error:
\apps\acc\users\templates\users\templates\users\detail.html (Source does not exist)
is repeating the internal folder;
In the View
the template is set as:
template_name = 'users/templates/users/detail.html'
I tried also:
template_name = '/users/detail.html'