I set up django-allauth correctly following the project's documentation. I wanted to override the look and feel of the django-allauth templates so I went to the project github and downloaded the django-allauth templates folder into my accountsapp/templates directory.
My problem is that django-allauth will only look for its templates in the templates/account folder.
I want to put my templates in the templates/allauth/account folder to help keep MY template files separate from django-allauth's template files.
When I do this, django-allauth is unable to find the templates that I customized.
Here is my project structure:
projectfolder/
accountsapp/
templates/
projectsettings/
settings.py
manage.py
What I've tried:
Setting my
TEMPLATES'DIRS'to this'DIRS': [ os.path.join(os.path.dirname(BASE_DIR), 'accountsapp', 'templates', 'allauth'), ],With
BASE_DIRbeing this:BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))). This works, but I'm not sure that this is the best practice/solution to my problem.
If you put your templates in
projectfolder/accountsapp/templates/, then the app directories loader will find them, as long as you have'APP_DIRS': Truein your template settings.However, if you move the templates into the
projectfolder/accountsapp/templates/allauthsubfolder, then the app directories loader will not find them, so you will have to add the directory toDIRSas you have already done.