feat: basic template

This commit is contained in:
eneller
2025-03-16 11:53:21 +01:00
parent bc8c4f61c7
commit 677e85a0f7
3 changed files with 90 additions and 7 deletions

View File

@@ -17,7 +17,25 @@ Including another URLconf
from django.contrib import admin
from django.urls import path
from django.http import HttpRequest, HttpResponse
from django.shortcuts import render, redirect
def root(request:HttpRequest):
title = 'epub2go'
targetParam = request.GET.get('t', None)
if targetParam is not None:
getEpub(targetParam)
return render(request, 'index.html', locals())
urlpatterns = [
path("admin/", admin.site.urls),
path('',root, name='root')
]
def getEpub(param):
# TODO validate / sanitize input
# TODO check for existing file and age
# TODO download
# TODO redirect to loading page
# TODO redirect to download page
raise NotImplementedError