from django.shortcuts import render
from django.views import generic
from .models import Posts

class HomeView(generic.TemplateView):
    template_name = 'home.html'

    def get_context_data(self, **kwargs):
        context = super().get_context_data(**kwargs)
        context["posts"] = Posts.objects.all()
        return context