Closed rixx closed 6 years ago
I made region
optional on Jurisdiction
and part_of
optional on GeoRegion
. The missing blank=True
was just an oversight.
Please note that froide is supposed to be used as a set of apps in a Django project that runs it. The main user of froide is fragdenstaat_de. There you can find a management command to populate the GeoRegions.
The development guide is sadly not up-to-date, but I guess you already noticed. Thanks for the improvements!
Thanks for the fast fix! Do you think adapting the development guide to recommend integration with fragdenstaat would be better? Standalone development is nice and all, but if it brings more problems than solutions, maybe it's not worth it.
The tests run against froide stand-alone only, so there's a use case for it to run by itself (in the past it used to be the main entry point). Possibly try the FragDenStaat.de Docker Dev Setup that I setup last week, if this works better for you. In the end, the Docker Dev setup is starting a Postgres+PostGIS and elasticsearch and makes sure master
of froide and fragdenstaat_de are installed with dependencies in one virtualenv + frontend build setup.
To create a Jurisdiction (as per the development guide) I need a georegion. To create a region, I need to use the fancy input to add a geometry (which does not work for me, but maybe I just can't use the input method correctly), and provide the "part of" field for that geo region. Which I can't because there is no geo region there already.
(The ForeignKey
part_of
ofGeoRegion
is set tonull=True
, but also needs ablank=True
to signal the Django admin that leaving this field empty is alright. The same goes for theregion
field ofJurisdiction
)