feat: basic template
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user