make it easier to distinguish villaged
This commit is contained in:
parent
ff76c3e98e
commit
9d75bb6d9d
|
@ -7,11 +7,13 @@ from .models import Village
|
|||
class VillageAdmin(admin.ModelAdmin):
|
||||
list_display = [
|
||||
'name',
|
||||
'camp',
|
||||
'private',
|
||||
'deleted',
|
||||
]
|
||||
|
||||
list_filter = [
|
||||
'camp',
|
||||
'private',
|
||||
'deleted',
|
||||
]
|
||||
|
|
|
@ -31,7 +31,7 @@ class Village(UUIDModel, CampRelatedModel):
|
|||
objects = VillageQuerySet.as_manager()
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
return "%s (%s)" % (self.name, self.camp.title)
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse_lazy('village_detail', kwargs={'camp_slug': self.camp.slug, 'slug': self.slug})
|
||||
|
|
Loading…
Reference in a new issue