Allow two decimal places in cable length, show training item IDs in selectpicker

Will close #540
This commit is contained in:
2023-05-24 23:05:04 +01:00
parent 01fe242172
commit 35def0e921
4 changed files with 27 additions and 4 deletions

View File

@@ -105,6 +105,10 @@ class TrainingItem(models.Model):
def display_id(self):
return f"{self.category.reference_number}.{self.reference_number}"
@property
def display_name(self):
return f"{self.display_id} | {self.name}"
@display_id.filter
@classmethod
def display_id(cls, lookup, value):