from django.contrib.auth.mixins import LoginRequiredMixin
from django.views import generic
from scrobbles.views import ScrobbleableDetailView, ScrobbleableListView
from workouts.models import Exercise, WorkoutRoutine


class WorkoutRoutineListView(ScrobbleableListView):
    model = WorkoutRoutine


class WorkoutRoutineDetailView(ScrobbleableDetailView):
    model = WorkoutRoutine


class ExerciseListView(LoginRequiredMixin, generic.ListView):
    model = Exercise
    paginate_by = 100
    ordering = "name"


class ExerciseDetailView(LoginRequiredMixin, generic.DetailView):
    model = Exercise
    slug_field = "uuid"
