openpolis / open_municipio

Transparency in italian Comuni
GNU Affero General Public License v3.0
54 stars 16 forks source link

cache number of users monitoring objects #642

Open fspegni opened 6 years ago

fspegni commented 6 years ago

Objects that can be monitored should have a field for storing the number of users monitoring them.

Such cache value should be updated using django signal's (listening to save actions on instances of Monitoring model).

See also: MonitorizedItem.all_monitoring_count and MonitorizedItem.all_monitoring_users