-
Notifications
You must be signed in to change notification settings - Fork 9
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
Refactor: Django admin always enabled #1881
Conversation
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
Preview url: https://benefits-1881--cal-itp-previews.netlify.app |
1 similar comment
Preview url: https://benefits-1881--cal-itp-previews.netlify.app |
Preview url: https://benefits-1881--cal-itp-previews.netlify.app |
f20faf3
to
0eebbd3
Compare
Preview url: https://benefits-1881--cal-itp-previews.netlify.app |
1 similar comment
Preview url: https://benefits-1881--cal-itp-previews.netlify.app |
remove duplicate django.contrib.messages.context_processors.messages
these have to be present in the .env file to reset the DB locally
reset_db.sh reuses the existing init.sh for other initialization
dumped the existing (prior to this deletion) data using Django manage.py, excluding some model types that are defined and recreated by other migrations: python manage.py dumpdata \ --exclude auth.permission \ --exclude auth.user \ --exclude contenttypes.contenttype > fixtures.json then cleaned up the labels/names of our sample data for consistency updates db_reset.sh to load these fixtures after migrations are run updates the Cypress tests to use the new fixture location for sample data
0eebbd3
to
4bac379
Compare
Preview url: https://benefits-1881--cal-itp-previews.netlify.app |
these are no longer relevant as we'll use the admin interface directly to configure
Preview url: https://benefits-1881--cal-itp-previews.netlify.app |
@angela-tran @machikoyasuda this is ready for review. @angela-tran I know you opened the original PR but I'd still like your review since I made a ton of changes. The full list of post-merge steps (and other things I did) is outlined in #1856 |
083e3c6
to
d2e089d
Compare
Preview url: https://benefits-1881--cal-itp-previews.netlify.app |
* devs may or may not want to reset their local DB * devs may want to change which DB file is targeted * devs may want to change which fixture file is loaded update docs to reflect these changes
d2e089d
to
0a562fb
Compare
Preview url: https://benefits-1881--cal-itp-previews.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got admin up and running on my machine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @thekaveman for finishing out this PR. The code changes look good to me.
I noticed some documentation that is out-of-date:
docs/deployment/README.md
no external database...
...loaded via data migrations
and
note the use of Key Vault for secrets, Django admin for non-secrets
now that we have the Admin interface, we don't want to regrenerate the existing migration rather, we need to generate new migrations each time to reflect model changes into the DB
Preview url: https://benefits-1881--cal-itp-previews.netlify.app |
@angela-tran thanks for those notes. You reminded me that we also need to update the |
we use Django 5.x now
Preview url: https://benefits-1881--cal-itp-previews.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch on the migrations helper script, and thanks for the documentation updates.
I noticed one typo to be fixed, but other than that this PR is approved ✅
Co-authored-by: Angela Tran <[email protected]>
Preview url: https://benefits-1881--cal-itp-previews.netlify.app |
Prerequisite of finishing #1856