Living-with-machines / lwmdb

A django-based library for managing the Living with Machines newspapers metadata database schema
https://living-with-machines.github.io/lwmdb/
MIT License
2 stars 0 forks source link

Add `geodjango` support #65

Closed griff-rees closed 1 year ago

griff-rees commented 1 year ago

Adding geodjango support would enable spatial querying and ease exploration through the default django admin. The obvious models to support this are GazetteerModel (which have longitude and latitude float attributes) and Record inherited from CensusModel. Initial tests in commit 3a3b32b on the geodjango branch suggest that adding a coordinates attribute works. More testing is needed, but that may mean the majority of this is solved.

griff-rees commented 1 year ago

All (relatively simple) tests in commit 0b8f1f9ae94bf1f6bf1ba1bcb1c126ed6fbab2f2 now pass. Note a separate migration is added rather than appended to the initial migration. @kallewesterling I can modify that to keep it to one migration if you prefer.

kallewesterling commented 1 year ago

I think we can keep it like this for now. Perhaps once we consolidate the code, we can reset the migrations as the system is not in production, which means that we should probably keep it to one migration in the outset.

griff-rees commented 1 year ago

Sorted as of commit f52ca9fab89e0a776830deac48833fa2ccd5a9a0.

kallewesterling commented 1 year ago

Time to close?

griff-rees commented 1 year ago

Yup, thanks :)