Browse Source

additional preliminary work for authorize/deny links in IF mail

master
Benni Baermann 4 years ago
parent
commit
0b21af98cc
3 changed files with 5 additions and 5 deletions
  1. +2
    -2
      input/templates/input/if_mail.txt
  2. +2
    -2
      input/urls.py
  3. +1
    -1
      input/views.py

+ 2
- 2
input/templates/input/if_mail.txt 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 {% elif data.choice == 'VIS' %} Visitenkarten, Mailingliste oder E-Mail-Adresse
{% else %} ERROR UNKNOWN FORMTYPE {% endif %} an. {% 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 %} {% comment %}

+ 2
- 2
input/urls.py View File

@ -9,6 +9,6 @@ urlpatterns = [
path('certificate', certificate, name='certificate'), path('certificate', certificate, name='certificate'),
path('extern', ExternView.as_view(), name='extern'), path('extern', ExternView.as_view(), name='extern'),
path('saved', done, name='done'), 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')
] ]

+ 1
- 1
input/views.py View File

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

Loading…
Cancel
Save