Skip to content

Feat: districts Django app setup #91

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

Merged
merged 3 commits into from
Apr 16, 2025
Merged

Feat: districts Django app setup #91

merged 3 commits into from
Apr 16, 2025

Conversation

lalver1
Copy link
Member

@lalver1 lalver1 commented Apr 15, 2025

Closes #63
Part of #65

This PR sets up the districts Django app and adds an initial District model (with associated fixtures).

Notes

We assume these patterns

  • A models.py module per Django app.
  • A migrations folder per Django app (python manage.py makemigrations will run through each app and make the migrations). This means that in makemigrations.sh we will have several lines like python -m black pems/district/migrations/*.py, one per app.
  • A local_fixtures.json file in the root Django project .

@lalver1 lalver1 self-assigned this Apr 15, 2025
Copy link

github-actions bot commented Apr 15, 2025

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  pems/districts
  admin.py
  apps.py
  models.py
  urls.py 5-6
  pems/districts/migrations
  0001_initial.py
Project Total  

This report was generated by python-coverage-comment-action

@lalver1 lalver1 force-pushed the feat/district-setup branch 2 times, most recently from 543c7a5 to b702236 Compare April 16, 2025 14:52
@lalver1 lalver1 marked this pull request as ready for review April 16, 2025 15:22
@lalver1 lalver1 requested a review from a team as a code owner April 16, 2025 15:22
@lalver1 lalver1 changed the title Feat: district Django app setup Feat: district Django app setup Apr 16, 2025
Copy link
Member

@thekaveman thekaveman left a comment

Choose a reason for hiding this comment

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

This is a nitpick, I think the name of the app districts (plural) reads a little better than the singular district.

E.g. thinking about the URL structure, we'll want something like /districts/<id> -- not that this ties exactly to the app name, but the consistency seems good.

Thoughts?

@lalver1
Copy link
Member Author

lalver1 commented Apr 16, 2025

No, this is a good suggestion. I'm actually seeing this pattern in the Miro board, but I don't know why I overlooked it (devices, instead of device, etc.). And yep, the URL structure can be completely different from the app name but I agree that they need to stay consistent. I'll make this change and update it 👍

@lalver1 lalver1 force-pushed the feat/district-setup branch from b702236 to 5acbd72 Compare April 16, 2025 20:02
@lalver1 lalver1 changed the title Feat: district Django app setup Feat: districts Django app setup Apr 16, 2025
Copy link
Member

@thekaveman thekaveman left a comment

Choose a reason for hiding this comment

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

Looks good 👍

Nice to have a fixtures file with all the Districts defined to get started with.

@lalver1 lalver1 merged commit 66395ee into main Apr 16, 2025
9 checks passed
@lalver1 lalver1 deleted the feat/district-setup branch April 16, 2025 21:03
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.

Initial Django district application setup
2 participants