Skip to content

Update "Django Tutorial Part 2: Creating a skeleton website" page to prevent a bug in "Django Tutorial Part 8: User authentication and permissions" #39129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LittleBangTheory
Copy link

@LittleBangTheory LittleBangTheory commented Apr 15, 2025

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 of INSTALLED_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 :

At each stage, Django processes all applications in the order of INSTALLED_APPS.

Related issues and pull requests

None that I could find.

Move the catalog as the first line in the installed app to override default behavior
@LittleBangTheory LittleBangTheory requested a review from a team as a code owner April 15, 2025 08:55
@LittleBangTheory LittleBangTheory requested review from dipikabh and removed request for a team April 15, 2025 08:55
@github-actions github-actions bot added Content:Learn Learning area docs size/s [PR only] 6-50 LoC changed labels Apr 15, 2025
@Josh-Cena Josh-Cena requested review from hamishwillee and removed request for dipikabh April 15, 2025 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:Learn Learning area docs size/s [PR only] 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant