Use list_display instead.

This commit is contained in:
Víðir Valberg Guðmundsson 2018-08-10 18:39:21 +02:00
parent c83ebfed08
commit d6321cf5e8
2 changed files with 1 additions and 8 deletions

View file

@ -5,4 +5,5 @@ from .models import Ride
@admin.register(Ride) @admin.register(Ride)
class RideModelAdmin(admin.ModelAdmin): class RideModelAdmin(admin.ModelAdmin):
list_display = ('location', 'when', 'seats', 'user')
list_filter = ('camp', 'user') list_filter = ('camp', 'user')

View file

@ -20,11 +20,3 @@ class Ride(UUIDModel, CampRelatedModel):
'camp_slug': self.camp.slug 'camp_slug': self.camp.slug
} }
) )
def __str__(self):
return "{} seats from {} at {} by {}".format(
self.seats,
self.location,
self.when,
self.user
)