Add str repr for role and register role in admin
This commit is contained in:
parent
7461bea49c
commit
17131dc91c
2 changed files with 4 additions and 0 deletions
|
@ -245,3 +245,4 @@ admin.site.register(RangesPeople, PeopleRangeAdmin)
|
|||
admin.site.register(TaxonRange, TaxonRangeAdmin)
|
||||
admin.site.register(PeopleResource, PeopleResourceAdmin)
|
||||
admin.site.register(RangeCountry, RangeCountryAdmin)
|
||||
admin.site.register(Role)
|
||||
|
|
|
@ -683,6 +683,9 @@ class Role(models.Model):
|
|||
id = models.AutoField(primary_key=True)
|
||||
role = models.TextField(blank=True, null=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.role if self.role else '--'
|
||||
|
||||
|
||||
class PeopleResource(models.Model):
|
||||
id = models.AutoField(primary_key=True)
|
||||
|
|
Loading…
Reference in a new issue