Update "Django Tutorial Part 2: Creating a skeleton website" page to prevent a bug in "Django Tutorial Part 8: User authentication and permissions" #39129
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Move the catalog as the first line in the installed app to override default behavior
Description
I moved
'catalog.apps.CatalogConfig',
as the first line ofINSTALLED_APPS
in the setup of the Django skeleton website tutorial, and made the following change in the description just above and below the code section.Motivation
When implementing the part 8 of the tutorial, I ran into an issue : the
logged_out.html
page I set up wasn't overriding the default Django page, which meant that when using the log out form in the tutorial, I was sent to the admin console logout page instead of mine.I found that it was because the order of applications in the settings mattered, so I needed to move my app the top of my list. I hope this change will avoid others the same headache as me !
English is not my first language, so my apologies if there are any mistakes in the way I rewrote the description :)
Additional details
I found the solution here, which is coherent with Django Documentation :
Related issues and pull requests
None that I could find.