Replaced the home page view with a simple TemplateView(), and revised the name of the log out view.
This commit is contained in:
parent
b396b151e4
commit
f29943dfea
@ -22,8 +22,8 @@ from django.contrib import messages
|
||||
from django.contrib.auth import logout as logout_user
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.http import HttpResponse
|
||||
from django.shortcuts import redirect, render
|
||||
from django.views.decorators.http import require_POST, require_GET
|
||||
from django.shortcuts import redirect
|
||||
from django.views.decorators.http import require_POST
|
||||
from django.views.generic import DeleteView as CoreDeleteView
|
||||
|
||||
|
||||
@ -36,19 +36,6 @@ class DeleteView(SuccessMessageMixin, CoreDeleteView):
|
||||
return response
|
||||
|
||||
|
||||
@require_GET
|
||||
def home(request):
|
||||
"""The view of the home page.
|
||||
|
||||
Args:
|
||||
request (HttpRequest): The request.
|
||||
|
||||
Returns:
|
||||
HttpResponse: The response.
|
||||
"""
|
||||
return render(request, "index.html")
|
||||
|
||||
|
||||
@require_POST
|
||||
def logout(request):
|
||||
"""The view to log out a user.
|
||||
|
Loading…
Reference in New Issue
Block a user