17 lines
515 B
Python
17 lines
515 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 Adventure, Player
|
|
|
|
# Create your views here.
|
|
class HomeView(LoginRequiredMixin, TemplateView):
|
|
template_name = "guild/home.html"
|
|
|
|
def get_context_data(self, **kwargs):
|
|
context = super().get_context_data(**kwargs)
|
|
context["adventures"] = Adventure.objects.all()
|
|
return context
|
|
|
|
|