Skip to content

Conversation

@ddabble
Copy link
Member

@ddabble ddabble commented Oct 5, 2025

This depends on #766.

Proposed changes

Using environment variables is a more standard way of configuring settings.

Also removed the NOTE: This must be changed in production! comments in settings.py, as env.py now enforces that those settings have been set.

Review guidance

Create an empty .env file directly inside the repository folder, fill it by copying the contents of .env.example, and try running the project.

Deployment notes

Must create a .env file on the prod server with the corresponding values in the existing local_settings.py (and local_settings_post.py) file.

Checklist

(If any of the points are not relevant, mark them as checked, so that it's easy to see which points you've handled or not)

  • I've run makemigrations, makemessages and compilemessages
  • I've written tests that fail without these changes (if relevant/possible)
  • I've manually tested the website UI with different device layouts
    • Most common is to test with typical screen sizes for mobile (320-425 px), tablet (768 px) and desktop (1024+ px), which can easily be done with your browser's dev tools
  • I've manually tested with different users locally
    • This can be e.g. anonymous users (i.e. not being logged in), "normal" non-member users, members of different committees, and superusers
  • I've made sure that my code conforms to the code style guides
    • It's not intended that you read through this whole document, but that you get yourself an overview over its contents, and that you use it as a reference guide / checklist while taking a second look at your code before opening a pull request
  • I've attempted to minimize the number of common code smells
    • See the comment for the previous checkbox
  • I've added documentation
    • E.g. comments, docstrings, or in the README
  • I've added my changes to the "Unreleased" section of the changelog, together with a link to this PR
    • Mainly the changes that are of particular interest to users and/or developers, if any
  • I've added a "Deployment notes" section above and labelled the PR with has-deployment-notes
    • ...if anything out of the ordinary should be done when deploying these changes to the server (e.g. adding/removing an environment variable, manually creating/changing some objects, running a management command, etc.)
  • I've structured my commits reasonably

@make-bot make-bot bot added this to web Oct 5, 2025
@make-bot make-bot bot moved this to Ready for Review in web Oct 5, 2025
@codecov
Copy link

codecov bot commented Oct 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.04%. Comparing base (38c1bcf) to head (75702d9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #767   +/-   ##
=======================================
  Coverage   88.04%   88.04%           
=======================================
  Files         153      153           
  Lines        6224     6224           
=======================================
  Hits         5480     5480           
  Misses        744      744           
Files with missing lines Coverage Δ
src/util/url_utils.py 95.65% <100.00%> (ø)
src/web/admin_urls.py 93.33% <100.00%> (ø)
src/web/urls.py 95.34% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ddabble ddabble mentioned this pull request Oct 5, 2025
10 tasks
Copy link
Contributor

@TheStrgamer TheStrgamer left a comment

Choose a reason for hiding this comment

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

This works as intended when i run it locally.
The changes in the code also look good.

@ddabble ddabble force-pushed the feature/migrate-to-uv branch from 45b47b0 to 4e49ae3 Compare October 23, 2025 08:00
Base automatically changed from feature/migrate-to-uv to main October 23, 2025 08:08
@ddabble ddabble force-pushed the feature/migrate-to-dotenv branch from 4835a81 to 6f726ed Compare October 23, 2025 08:10
Using environment variables is a more standard way of setting settings
like these.

(Removed the `NOTE: This must be changed in production!` comments in
`settings.py`, as `env.py` now enforces that those settings have been
set.)

Also added a `channels_redis` logger from the current
`local_settings_post.py` file on the prod server.
@ddabble ddabble force-pushed the feature/migrate-to-dotenv branch from 6f726ed to 75702d9 Compare October 23, 2025 08:32
@ddabble ddabble merged commit 674c6f6 into main Oct 23, 2025
7 checks passed
@ddabble ddabble deleted the feature/migrate-to-dotenv branch October 23, 2025 08:38
@github-project-automation github-project-automation bot moved this from Ready for Review to Done in web Oct 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants