2023-06-10 19:33:06 +00:00
|
|
|
from django.views.generic import TemplateView, ListView, DetailView
|
|
|
|
from django.views.generic.edit import CreateView
|
2023-06-09 20:19:15 +00:00
|
|
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
2023-06-09 19:51:18 +00:00
|
|
|
|
2023-06-11 18:01:36 +00:00
|
|
|
from guild.models import Adventure, Player
|
2023-06-10 19:33:06 +00:00
|
|
|
|
2023-06-09 19:51:18 +00:00
|
|
|
# Create your views here.
|
2023-06-09 20:19:15 +00:00
|
|
|
class HomeView(LoginRequiredMixin, TemplateView):
|
|
|
|
template_name = "guild/home.html"
|
2023-06-10 19:33:06 +00:00
|
|
|
|
2023-06-11 18:01:36 +00:00
|
|
|
def get_context_data(self, **kwargs):
|
|
|
|
context = super().get_context_data(**kwargs)
|
|
|
|
context["adventures"] = Adventure.objects.all()
|
|
|
|
return context
|
|
|
|
|
|
|
|
|