问题
I'm trying to override the default django-allauth templates. I've copied the templates from the allauth folder in my site-packages to my applications template directory.
The structure is as follows
myapp
--templates
----account
----admin
----socialaccount
----www
----base.html
My settings.py has the TEMPLATE_DIRS set
TEMPLATE_DIRS = (
os.path.join(BASE_DIR, "templates"),
)
As per this answer I'm loading my application before allauth.
Making any changes to the templates in my directory doesn't have any effect, however changing the templates in the allauth templates in the site-packages outputs the changes. I know I'm missing some very basic thing here, but can't seem to figure it out.
回答1:
Not sure if this is the best approach, but copying the entire allauth directory into my applications root directory made it possible to override the templates.
来源:https://stackoverflow.com/questions/24647774/unable-to-override-django-allauth-templates