Added the home page view.

This commit is contained in:
依瑪貓 2020-07-06 23:22:20 +08:00
parent 66f1e4b4fa
commit cd7d7a5106

View File

@ -1,6 +1,19 @@
from django.contrib.auth import logout as logout_user
from django.shortcuts import redirect
from django.views.decorators.http import require_POST
from django.shortcuts import redirect, render
from django.views.decorators.http import require_POST, require_GET
@require_GET
def home(request):
"""The view of the home page.
Args:
request (HttpRequest): The request.
Returns:
HttpRedirectResponse: The redirect response.
"""
return render(request, "index.html")
@require_POST