guild-journal/guild/views/character.py

14 lines
423 B
Python

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 Character
class CreateCharacterView(LoginRequiredMixin, CreateView):
model = Character
fields = ["name", "description", "player"]
class CharacterDetailView(LoginRequiredMixin, DetailView):
model = Character