I am (still) a beginner in django. I am trying to use the default django user management for the user registration/login/logout/password reset functionalities.
However, I am not clear on where to modify the templates for the registration/login/logout pages.
As I wasn’t able to find an answer in the documentation, I read the tutorial Django Tutorial Part 8: User authentication and permissions - Learn web development | MDN, where it mentioned that the template for the login page (accounts/login) can be stored in app/templates/registration/login.html. It works well. However, when I tried to follow the tutorial for the other templates, for example, logged_out.html, password_reset_form.html, nothing was changed and the website still uses the default django admin templates.
Could you please suggest the correct way to use the templates?
The problem is that it seems like this template is not used when I access http://127.0.0.1:8000/accounts/logout/. Still, it shows the default Django administration log out page.
I am not sure, but maybe I should add something in urls.py, to explicitly write “template_name=‘…’”, for example:
If it’s in a project level directory, then that directory needs to be identified in the DIRS section of your TEMPLATES settings.
If it’s in an app directory, your app needs to be listed before the django apps in INSTALLED_APPS, because the template directories are searched in the order that they are listed.