datamade / django-councilmatic

:heartpulse: Django app providing core functions for *.councilmatic.org
http://councilmatic.org
MIT License
26 stars 16 forks source link

Factor out annotations to models #261

Open fgregg opened 4 years ago

fgregg commented 4 years ago

Councilmatic code has many places where it needs to compare dates and datetimes.

For good reasons, the opencivicdata models store dates and datetimes as strings. Currently, we deal with this by extensively using annotations to cast to real datetimes.

We should just do this casting one on saving or updating the Councilmatic models in the signal handler.