Swap content
This commit is contained in:
22
project/main/views/swap.py
Normal file
22
project/main/views/swap.py
Normal file
@ -0,0 +1,22 @@
|
||||
from django.shortcuts import render
|
||||
from django.core.handlers.wsgi import WSGIRequest
|
||||
from django.http import HttpResponse
|
||||
|
||||
from project.main.views.demo_view_base import DemoViewBase
|
||||
|
||||
|
||||
class SwapView(DemoViewBase):
|
||||
template_name = "main/swap.html"
|
||||
active_section = "swap"
|
||||
title = "Swap"
|
||||
|
||||
def post(self, request: WSGIRequest, *args, **kwargs) -> HttpResponse:
|
||||
context = {
|
||||
"content": request.GET.get("content", "info")
|
||||
}
|
||||
|
||||
return render(
|
||||
request=request,
|
||||
context=context,
|
||||
template_name="main/swap_content.html",
|
||||
)
|
||||
Reference in New Issue
Block a user