legiongis / hmsf-md

Arches project for the Heritage Monitoring Scouts program, maintained by Florida Public Archaeology Network
https://hms.fpan.us
1 stars 0 forks source link

New widgets and datatypes #195

Closed mradamcox closed 3 years ago

mradamcox commented 3 years ago

This PR adds two new widget/datatype pairs, one for usernames and one for management areas. These are essentially extensions off of the core Arches domain-value-list datatype and widget, and they have been altered to be populated by objects pulled from the django ORM. Importantly, these widgets and datatypes must be registered (even if they are not used) because some of the context processor code expects them (though this could be improved). This PR also introduces a new management command which will be the beginning of a unified command for managing all extensions. So, using this command, register the widgets and datatypes in this order:

python manage.py extension register widget -s fpan/widgets/username-widget.json
python manage.py extension register datatype -s fpan/datatypes/username.py
python manage.py extension register widget -s fpan/widgets/management-area-widget.json
python manage.py extension register datatype -s fpan/datatypes/management_area.py

Another management command is included that performs a data migration process specific to the HMS Scout Report model.

Completes #80 and #150.