Skip to content
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

Migrate to Django v5.0.2 #137

Merged
merged 16 commits into from
Apr 8, 2024
Merged

Migrate to Django v5.0.2 #137

merged 16 commits into from
Apr 8, 2024

Conversation

hamishwillee
Copy link
Collaborator

@hamishwillee hamishwillee commented Feb 23, 2024

This updates Django from 4 to 5.

Associated docs in mdn/content#32406

@hamishwillee hamishwillee marked this pull request as ready for review February 27, 2024 00:59
@bsmth bsmth self-requested a review March 19, 2024 10:40
env_path = load_dotenv(os.path.join(BASE_DIR, '.env'))
load_dotenv(env_path)

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/
# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
# SECRET_KEY = 'django-insecure-&psk#na5l=p3q8_a+-$4w1f^lt3lx1c@d*p4x$ymm_rn7pwb87'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# SECRET_KEY = 'django-insecure-&psk#na5l=p3q8_a+-$4w1f^lt3lx1c@d*p4x$ymm_rn7pwb87'

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, but I want to keep this. If you're inspecting this code it is good to be able to see the original code that was commented out, starting from the original django template. I am also grateful for this kind of thing every time I update the tutorial because it reminds me of the next things to do.

@bsmth
Copy link
Member

bsmth commented Apr 4, 2024

Not sure what the usual approach to caching is, but I needed to start a private browsing session after running the diy-blog Django project due to this (when visiting http://127.0.0.1:8000 as directed in the console):

<h1>Page not found <span>(404)</span></h1>
    
Request Method: | GET
-- | --
http://127.0.0.1:8000/blog/

      Using the URLconf defined in <code>locallibrary.urls</code>,
      Django tried these URL patterns, in this order:

locallibrary/urls.py Outdated Show resolved Hide resolved
Copy link
Member

@bsmth bsmth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Hamish. A couple of comments for you to take a look, but leaving a +1 - nice 🎉

@hamishwillee
Copy link
Collaborator Author

Not sure what the usual approach to caching is, but I needed to start a private browsing session after running the diy-blog Django project due to this (when visiting http://127.0.0.1:8000 as directed in the console):

<h1>Page not found <span>(404)</span></h1>
    
Request Method: | GET
-- | --
http://127.0.0.1:8000/blog/

      Using the URLconf defined in <code>locallibrary.urls</code>,
      Django tried these URL patterns, in this order:

You're not wrong. I usually clear my cache in development when I switch to the blog.

My inclination is to ignore this. We could offer advice, but I suspect very few actually do the blog part and noting that you might have do to this would therefore be a distraction. We've never had a question on it, and the cause/fix when switching are easy to work out.

@hamishwillee
Copy link
Collaborator Author

Thanks for the review. Much appreciated!

@hamishwillee hamishwillee merged commit 45df021 into main Apr 8, 2024
3 checks passed
@hamishwillee hamishwillee deleted the migrate_v5_0 branch April 8, 2024 22:58
@bsmth
Copy link
Member

bsmth commented Apr 9, 2024

My inclination is to ignore this. We could offer advice, but I suspect very few actually do the blog part and noting that you might have do to this would therefore be a distraction. We've never had a question on it, and the cause/fix when switching are easy to work out.

Sounds good to me! Something to keep note of in case it comes up. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants