views.py 386 B

1234567891011121314151617
  1. from django.views import generic
  2. from videogames.models import VideoGame, VideoGamePlatform
  3. class VideoGameListView(generic.ListView):
  4. model = VideoGame
  5. paginate_by = 20
  6. class VideoGameDetailView(generic.DetailView):
  7. model = VideoGame
  8. slug_field = "uuid"
  9. class VideoGamePlatformDetailView(generic.DetailView):
  10. model = VideoGamePlatform
  11. slug_field = "uuid"