from django.views.generic import TemplateView
from gallery.models import Gallery
from posts.models import Post


class HomePageView(TemplateView):
    template_name = "index.html"

    def get_context_data(self, **kwargs):
        context = super().get_context_data(**kwargs)
        context['posts'] = Post.objects.all()
        context['galleries'] = Gallery.objects.all()
        # context['events'] = Events.objects.all()
        context['title'] = 'Homepage'
        return context

cdcb2417a787dfe30aade9de2dff2fbfa31ae1e3
<mask token>


class HomePageView(TemplateView):
    <mask token>
    <mask token>

<mask token>


class HomePageView(TemplateView):
    <mask token>

    def get_context_data(self, **kwargs):
        context = super().get_context_data(**kwargs)
        context['posts'] = Post.objects.all()
        context['galleries'] = Gallery.objects.all()
        context['title'] = 'Homepage'
        return context

<mask token>


class HomePageView(TemplateView):
    template_name = 'index.html'

    def get_context_data(self, **kwargs):
        context = super().get_context_data(**kwargs)
        context['posts'] = Post.objects.all()
        context['galleries'] = Gallery.objects.all()
        context['title'] = 'Homepage'
        return context

from django.views.generic import TemplateView
from gallery.models import Gallery
from posts.models import Post


class HomePageView(TemplateView):
    template_name = 'index.html'

    def get_context_data(self, **kwargs):
        context = super().get_context_data(**kwargs)
        context['posts'] = Post.objects.all()
        context['galleries'] = Gallery.objects.all()
        context['title'] = 'Homepage'
        return context

from django.views.generic import TemplateView
from gallery.models import Gallery
from posts.models import Post


class HomePageView(TemplateView):
    template_name = "index.html"

    def get_context_data(self, **kwargs):
        context = super().get_context_data(**kwargs)
        context['posts'] = Post.objects.all()
        context['galleries'] = Gallery.objects.all()
        # context['events'] = Events.objects.all()
        context['title'] = 'Homepage'
        return context
