Intervention tables and model adjustments

* adds user access relation to certain models
* adds pagination to tables
* adds checked_on/_by attributes to intervention model
* adds custom column rendering for checked and registered columns
* adds first simple index filtering of default interventions for user
* adds translations
This commit is contained in:
mipel
2021-07-21 15:40:34 +02:00
parent 704137216f
commit d139119a15
10 changed files with 170 additions and 43 deletions

View File

@@ -5,6 +5,7 @@ Contact: michel.peltriaux@sgdnord.rlp.de
Created on: 17.11.20
"""
from django.contrib.auth.models import User
from django.contrib.gis.db import models
from django.core.validators import MinValueValidator
from django.utils import timezone
@@ -74,6 +75,9 @@ class Compensation(BaseObject):
geometry = models.ForeignKey(Geometry, null=True, blank=True, on_delete=models.SET_NULL)
documents = models.ManyToManyField("konova.Document", blank=True)
# Users having access on this object
users = models.ManyToManyField(User)
@staticmethod
def _generate_new_identifier() -> str:
""" Generates a new identifier for the intervention object