Files
django-htmx-presenatation/project/main/views/swap.py
2024-04-06 16:46:24 +02:00

23 lines
607 B
Python

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",
)