Adding admin for rideshare.Ride
This commit is contained in:
parent
3229838d0a
commit
c83ebfed08
|
@ -1,3 +1,8 @@
|
|||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
from .models import Ride
|
||||
|
||||
|
||||
@admin.register(Ride)
|
||||
class RideModelAdmin(admin.ModelAdmin):
|
||||
list_filter = ('camp', 'user')
|
||||
|
|
|
@ -20,3 +20,11 @@ class Ride(UUIDModel, CampRelatedModel):
|
|||
'camp_slug': self.camp.slug
|
||||
}
|
||||
)
|
||||
|
||||
def __str__(self):
|
||||
return "{} seats from {} at {} by {}".format(
|
||||
self.seats,
|
||||
self.location,
|
||||
self.when,
|
||||
self.user
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue