Swap content

This commit is contained in:
Eden Kirin
2024-04-06 16:46:24 +02:00
parent ae2612cfd6
commit f2dc83caab
9 changed files with 93 additions and 19 deletions

View File

@ -2,5 +2,5 @@ from .complex_form import ComplexFormView
from .filter_list import FilterListView
from .form_validation import FormValidationView
from .home import HomeView
from .swap_content import SwapContentView
from .swap import SwapView
from .table_inline_edit import TableInlineEditView

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

View File

@ -1,7 +0,0 @@
from project.main.views.demo_view_base import DemoViewBase
class SwapContentView(DemoViewBase):
template_name = "main/swap_content.html"
active_section = "swap-content"
title = "Swap Content"