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):
|
class VillageAdmin(admin.ModelAdmin):
|
||||||
list_display = [
|
list_display = [
|
||||||
'name',
|
'name',
|
||||||
|
'camp',
|
||||||
'private',
|
'private',
|
||||||
'deleted',
|
'deleted',
|
||||||
]
|
]
|
||||||
|
|
||||||
list_filter = [
|
list_filter = [
|
||||||
|
'camp',
|
||||||
'private',
|
'private',
|
||||||
'deleted',
|
'deleted',
|
||||||
]
|
]
|
||||||
|
|
|
@ -31,7 +31,7 @@ class Village(UUIDModel, CampRelatedModel):
|
||||||
objects = VillageQuerySet.as_manager()
|
objects = VillageQuerySet.as_manager()
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
return "%s (%s)" % (self.name, self.camp.title)
|
||||||
|
|
||||||
def get_absolute_url(self):
|
def get_absolute_url(self):
|
||||||
return reverse_lazy('village_detail', kwargs={'camp_slug': self.camp.slug, 'slug': self.slug})
|
return reverse_lazy('village_detail', kwargs={'camp_slug': self.camp.slug, 'slug': self.slug})
|
||||||
|
|
Loading…
Reference in a new issue