guild-journal/guild/views/player.py

14 lines
383 B
Python
Raw Normal View History

2023-06-10 19:33:06 +00:00
from django.views.generic import TemplateView, ListView, DetailView
from django.views.generic.edit import CreateView
from django.contrib.auth.mixins import LoginRequiredMixin
from guild.models import Player
class CreatePlayerView(LoginRequiredMixin, CreateView):
model = Player
fields = ["name"]
class PlayerDetailView(LoginRequiredMixin, DetailView):
model = Player