[birds] Add birding location scrobbling
This commit is contained in:
22
vrobbler/apps/birds/views.py
Normal file
22
vrobbler/apps/birds/views.py
Normal file
@ -0,0 +1,22 @@
|
||||
from birds.models import Bird, BirdingLocation
|
||||
from django.views import generic
|
||||
from scrobbles.views import ScrobbleableDetailView, ScrobbleableListView
|
||||
|
||||
|
||||
class BirdingLocationListView(ScrobbleableListView):
|
||||
model = BirdingLocation
|
||||
|
||||
|
||||
class BirdingLocationDetailView(ScrobbleableDetailView):
|
||||
model = BirdingLocation
|
||||
|
||||
|
||||
class BirdListView(generic.ListView):
|
||||
model = Bird
|
||||
paginate_by = 200
|
||||
ordering = "common_name"
|
||||
|
||||
|
||||
class BirdDetailView(generic.DetailView):
|
||||
model = Bird
|
||||
slug_field = "uuid"
|
||||
Reference in New Issue
Block a user