diff --git a/input/migrations/0057_auto_20210104_0937.py b/input/migrations/0057_auto_20210104_0937.py new file mode 100644 index 0000000..642e009 --- /dev/null +++ b/input/migrations/0057_auto_20210104_0937.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.1 on 2021-01-04 09:37 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('input', '0056_auto_20201217_1215'), + ] + + operations = [ + migrations.AlterField( + model_name='project', + name='account', + field=models.CharField(choices=[('21111', '21111 Förderung (reaktiv)'), ('21112', '21112 WikiCon'), ('21115', '21115 Lokale Räume, Berlin'), ('21116', '21116 Lokale Räume, Hamburg'), ('21117', '21117 Lokale Räume, Hannover'), ('21118', '21118 Lokale Räume, Köln'), ('21119', '21119 Lokale Räume, München'), ('21120', '21120 Lokale Räume, Fürth'), ('21125', '21125 Lokale Räume, allgemein'), ('21130', '21130 GLAM-Förderung'), ('21131', '21131 Initiative Förderung'), ('21140', '21140 Wikipedia-Kampagne'), ('21141', '21141 Wikipedia-Onboarding'), ('21150', '21150 Fürsorge und Online-Kommunikationskultur')], max_length=5, null=True, verbose_name='Kostenstelle'), + ), + ] diff --git a/input/views.py b/input/views.py index f597568..e40ca21 100644 --- a/input/views.py +++ b/input/views.py @@ -22,9 +22,9 @@ from .settings import IF_EMAIL def auth_deny(choice,pk,auth): if choice in ('BIB', 'ELIT', 'SOFT'): Library.set_granted(pk,auth) - if choice == 'LIT': + elif choice == 'LIT': Literature.set_granted(pk,auth) - if choice == 'IFG': + elif choice == 'IFG': IFG.set_granted(pk,auth) else: return HttpResponse(f'ERROR! UNKNWON CHOICE TYPE! {choice}') @@ -34,7 +34,7 @@ def auth_deny(choice,pk,auth): 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.