#54 Grouped autocomplete
* refactors default autocomplete into grouped autocompletes, if parents exist for grouping * updates requirement for django-autocomplete-light due to an issue with an attribute in pip's default version 3.8.2. More info here: https://github.com/yourlabs/django-autocomplete-light/issues/1278
This commit is contained in:
@@ -48,9 +48,9 @@ class KonovaCode(models.Model):
|
||||
help_text="Whether this code is archived or not"
|
||||
)
|
||||
|
||||
def __str__(self):
|
||||
def __str__(self, with_parent: bool = True):
|
||||
ret_val = ""
|
||||
if self.parent:
|
||||
if self.parent and with_parent:
|
||||
ret_val += self.parent.long_name + " > "
|
||||
ret_val += self.long_name
|
||||
if self.short_name and self.short_name != self.long_name:
|
||||
|
||||
Reference in New Issue
Block a user