#99 Admin backend cleanup

* removes admin backend views which are not important for production
* adds filtering functionalities on index views
* simplifies detail views on intervention, compensation, ecoaccount and ema
* adds autocomplete fields on detail views
* adds handy horizontal filter fields on detail views
This commit is contained in:
2022-02-01 18:41:02 +01:00
parent 568a288e92
commit 5b0b376405
14 changed files with 243 additions and 60 deletions

View File

@@ -59,7 +59,7 @@ class CompensationAction(BaseResource):
objects = CompensationActionManager()
def __str__(self):
return "{} | {} {}".format(self.action_type, self.amount, self.unit)
return f"{self.action_type} | {self.amount} {self.unit}"
@property
def unit_humanize(self):

View File

@@ -46,7 +46,7 @@ class EcoAccount(AbstractCompensation, ShareableObjectMixin, RecordableObjectMix
objects = EcoAccountManager()
def __str__(self):
return "{}".format(self.identifier)
return f"{self.identifier} ({self.title})"
def clean(self):
# Deductable surface can not be larger than added states after surface

View File

@@ -44,4 +44,4 @@ class CompensationState(UuidModel):
objects = CompensationStateManager()
def __str__(self):
return "{} | {}".format(self.biotope_type, self.surface)
return f"{self.biotope_type} | {self.surface}"