additional preliminary work for authorize/deny links in IF mail

This commit is contained in:
Benni Baermann 2020-10-20 08:29:51 +02:00
parent c96f195b00
commit 0b21af98cc
3 changed files with 5 additions and 5 deletions

View file

@ -13,8 +13,8 @@ Der Nutzer mit dem Username {{data.username}} fragt ein {% if data.choice == 'LI
{% elif data.choice == 'VIS' %} Visitenkarten, Mailingliste oder E-Mail-Adresse
{% else %} ERROR UNKNOWN FORMTYPE {% endif %} an.
Genehmigen: http://127.0.0.1:8000/authorize/{{data.id}}
Ablehnen: http://127.0.0.1:8000/deny/{{data.id}}
Genehmigen: http://127.0.0.1:8000/authorize/{{data.choice}}/{{data.pk}}
Ablehnen: http://127.0.0.1:8000/deny/{{data.choice}}/{{data.pk}}
{% comment %}

View file

@ -9,6 +9,6 @@ urlpatterns = [
path('certificate', certificate, name='certificate'),
path('extern', ExternView.as_view(), name='extern'),
path('saved', done, name='done'),
path('authorize/<int:pk>', authorize, name='authorize'),
path('deny/<int:pk>', deny, name='deny')
path('authorize/<str:choice>/<int:pk>', authorize, name='authorize'),
path('deny/<str:choice>/<int:pk>', deny, name='deny')
]

View file

@ -107,7 +107,7 @@ class ExternView(CookieWizardView):
form.save()
# add primary key to context
data['id'] = 100
data['pk'] = form.pk
# we need to send the following mails here:
context = { 'data': data }