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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user