From 89bd3b0de69e1a66b6482034ab434d738a888aa1 Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Thu, 19 Nov 2020 15:55:10 +0100 Subject: [PATCH] first steps towards an csv export view --- input/urls.py | 3 ++- input/views.py | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/input/urls.py b/input/urls.py index bd49902..4854f11 100644 --- a/input/urls.py +++ b/input/urls.py @@ -1,11 +1,12 @@ from django.urls import path -from .views import ExternView, done, authorize, deny, InternView +from .views import ExternView, done, authorize, deny, InternView, export urlpatterns = [ path('', ExternView.as_view(), name='extern'), path('intern', InternView.as_view(), name='intern'), path('saved', done, name='done'), + path('export', export, name='export'), path('authorize//', authorize, name='authorize'), path('deny//', deny, name='deny') ] diff --git a/input/views.py b/input/views.py index 3e083e4..f597568 100644 --- a/input/views.py +++ b/input/views.py @@ -30,6 +30,11 @@ def auth_deny(choice,pk,auth): return HttpResponse(f'ERROR! UNKNWON CHOICE TYPE! {choice}') return False +@login_required +def export(request): + '''export the project database to a csv''' + return HttpResponse('WE WANT CSV!') + @login_required def authorize(request, choice, pk): '''If IF grant a support they click a link in a mail which leads here.