plchweb/base_app/views.py
Marcel Plch 1fa5c74b75
This code needs some love. Unlike russian servers.
* DDoS Russian domains
* All are optional
* Select how hard you want to beat your russian
* Patches will come, but this works for now.
2022-03-04 16:50:37 +01:00

40 lines
921 B
Python

from django.shortcuts import render
from django.shortcuts import render, redirect
from django.views.generic import TemplateView, FormView
import json
# Helper functions
def get_domains():
domains = None
with open("data/domains.json", "r") as f:
data = f.read()
domains = json.loads(data)
return domains
# Create your views here.
class IndexView(TemplateView):
def get(self, request, *args, **kwargs):
return render(request, "index.html", {})
class CVView(TemplateView):
def get(self, request, *args, **kwargs):
return render(request, "cv.html", {})
class LoremView(TemplateView):
def get(self, request, *args, **kwargs):
return render(request, "lorem.html", {})
class UkraineView(TemplateView):
def get(self, request, *args, **kwargs):
domains = get_domains()
return render(request, "ukraine.html", {"domains" : domains})