Repository navigation
Sync django-gunicorn-nginx with the updated tutorial - #954
Open
realpython-bot wants to merge 1 commit into
Open
realpython-bot wants to merge 1 commit into
realpython-bot wants to merge 1 commit into
Conversation
…ploy a Django App With Gunicorn, Nginx, & HTTPS Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Maintenance sync of
django-gunicorn-nginx/with the current state of Securely Deploy a Django App With Gunicorn, Nginx, & HTTPS.Changes
requirements/prod.txt: pindjango-csp==3.7. Unpinned, pip now installs django-csp 4.x, which drops theCSP_*settings this project uses (CSP_STYLE_SRC). Matches the article's install command and dependencies field.myapp/views.py: the file was empty, somyapp/urls.pyfailed onviews.indexandmanage.py checkcrashed. Restored theindex()view the tutorial shows.project/settings.py:SECURE_REFERRER_POLICYset to"strict-origin-when-cross-origin"andSECURE_HSTS_SECONDSto2_592_000(30 days), matching the tutorial's settings and its final response-header listing.Article draft: https://realpython.com/pbjt/blog/post/2728/change/
Maintenance card: https://trello.com/c/lJmGI1px
Verification
requirements/prod.txt(Django 3.2.25, gunicorn 20.1.0, django-csp 3.7)manage.py check: no issues.manage.py migrate: OKgunicorn --check-config -c config/gunicorn/prod.py: OK. Served/myapp/under Gunicorn: 200 withContent-Security-Policy: style-src 'self' cdn.jsdelivr.net; default-src 'self'andReferrer-Policy: strict-origin-when-cross-originruff@0.14.1 format --checkandruff@0.14.1 check: pass🤖 Generated with Claude Code