i'm using Django 1.10 and i want to add the allauth's app for login, signin, etc, to my website. I've installed allauth from pip, and tried to put the templates from allauth repository inside my templates folder and call them but i don't know how to make it work.
Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (social) account authentication.
The correct answer can be found here: https://stackoverflow.com/a/31282443/4992248
yourproject/templates/allauth/account/
and paste here all templates you need to edit from /myproject/Lib/site-packages/allauth/templates/account
.If you need to make changes for socialaccount
templates, create also yourproject/templates/allauth/socialaccount/
'DIRS'
in settings.py
like 'DIRS': [os.path.join(BASE_DIR, 'templates'), os.path.join(BASE_DIR, 'templates', 'allauth')],
In the end it should look somethink like this:
TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [os.path.join(BASE_DIR, 'templates'), os.path.join(BASE_DIR, 'templates', 'allauth')], 'APP_DIRS': True, 'OPTIONS': { 'debug': False, 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.template.context_processors.media', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ]
/Lib/site-packages/*
, because all changes are lost once a package is updated.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With