Closed garrettr closed 7 years ago
Taking this for a spin now.
Rebased on top of master.
I took to test this through the workflow under the devops
folder but working good for me :+1:
Really like the programmatic fixture code in createdevdata.py
-- good idea shoving the test admin create down there too. You da best
Also good for me. I used the competing vagrant workflow with a libvirt backend and it worked like a dream, was able to view a populated leaderboard on the local forwarded port. Great work, @garrettr!
During testing I screwed up and didn't rm
the sqlite database, which caused the createdevdata
task to fail. Mentioning this in case someone bumps into that problem again.
manage.py createdevdata
builds a basic site which resembles Secure the News. It also adds a set of Sites and Scans to the database. You can run this (after the initial database migration) to get a reasonable imitation of the Secure the News production site up and running, which is useful for development.Previously, all development data was loaded from fixtures. This was overly brittle and required lots of updates to the fixtures (pretty much whenever we added or changed a model). This PR changes things so
createdevdata
builds the Wagtail site programmatically, which is easier to understand and extend/maintain. Sites and Scans are still loaded from fixtures, because it is more annoying to generate that data programmatically.Updates the README accordingly, so first-time contributors to Secure the News should be able to get up and running quickly with the new workflow.
Future work
Could be addressed in this PR, or in follow-ups.