[Django API] homepage - views.py
from django.shortcuts import render, redirect, get_object_or_404
from django.urls import reverse_lazy
from django.views import View
from django.views.generic.base import TemplateView
from django.views.generic import DetailView, ListView
from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResponse, JsonResponse
from django.utils import timezone
from django.contrib.auth import login as d_login, logout as d_logout, authenticate
import logging
logger = logging.getLogger(__name__)
class IndexView(TemplateView):
template_name = 'homepage/index.html'
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
return context
댓글
댓글 쓰기