some changes (sorry, i lost track)

This commit is contained in:
Benni Bärmann 2020-10-27 15:50:46 +01:00
parent 209beea756
commit c7bde110a7
4 changed files with 36 additions and 11 deletions

View File

@ -0,0 +1,23 @@
# Generated by Django 3.1.1 on 2020-10-27 13:37
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('input', '0029_auto_20201027_1247'),
]
operations = [
migrations.AlterField(
model_name='businesscard',
name='data',
field=models.CharField(default='', max_length=1000, verbose_name='Persönliche Daten'),
),
migrations.AlterField(
model_name='businesscard',
name='sent_to',
field=models.CharField(default='', max_length=1000, verbose_name='Sendungsadresse'),
),
]

View File

@ -164,8 +164,8 @@ class BusinessCard(Extern):
project = models.CharField(max_length=20, choices=PROJECT_CHOICE.items(),
default='PEDIA', verbose_name='Wikimedia Projekt')
data = models.CharField(max_length=1000, verbose_name='Persönliche Daten', default='NODATA')
data = models.CharField(max_length=1000, verbose_name='Persönliche Daten', default='')
variant = models.CharField(max_length=5, choices=BC_VARIANT.items(),
default='NOPIC', verbose_name='Variante')
sent_to = models.CharField(max_length=1000, verbose_name='Sendungsadresse',
default='NOADRESS')
default='')

View File

@ -9,18 +9,15 @@ Der Nutzer mit dem Username {{data.username}} ({{data.email}}) fragt ein(e){% if
{% elif data.choice == 'SOFT' %} Softwarestipendium
{% elif data.choice == 'VIS' %} Visitenkarten
{% elif data.choice == 'MAIL' %} Mailadresse
{% elif data.choice == 'LIST' %} Mailingliste
{% else %} ERROR UNKNOWN FORMTYPE {% endif %} an.
{% elif data.choice == 'LIST' %} Mailingliste {% else %} ERROR UNKNOWN FORMTYPE {% endif %} an.
{% if data.choice in ('BIB','ELIT','SOFT','LIT','IFG') %}
{% if data.choice in data.grant %}
Vorraussichtliche Kosten: {{data.cost}}
Anmerkungen: {{data.notes}}
{% endif %}
{% if data.choice in ('MAIL', 'LIST') %}
{% endif %} {% if data.choice in data.domain %}
Domain: {{data.domain}}
Adressenbestandteil: {{data.address}}
{% endif %}
{% if data.choice == 'BIB' %}
{% endif %} {% if data.choice == 'BIB' %}
Bibliothek: {{data.library}}
Dauer: {{data.duration}}
{% elif data.choice == 'ELIT' %}
@ -40,8 +37,7 @@ Adressenbestandteil frei gewählt: {{data.other}}
Wikimedia-Projekt: {{data.project}}
Persönliche Daten: {{data.data}}
Variante: {{data.variant}}
Sendungsadrese: {{data.send_to}}
{% endif %}
Sendungsadrese: {{data.send_to}} {% endif %}
Zum Genehmigen hier klicken: {{data.urlprefix}}{% url 'authorize' data.choice data.pk %}
@ -50,6 +46,10 @@ Zu Ablehnen hier klicken: {{data.urlprefix}}{% url 'deny' data.choice data.pk %}
Stets zu Diensten, Deine Förderdatenbank
{% comment %}
vielleicht brauchen wir das hier https://gist.github.com/martinsvoboda/1bf965a8c6037c0fe1a88d89ea822df6
alte mail:
<!DOCTYPE html>
<html>

View File

@ -166,6 +166,8 @@ class ExternView(CookieWizardView):
# add some data to context for mail templates
data['pk'] = form.pk
data['urlprefix'] = URLPREFIX
data['grant'] = ('LIT', 'SOFT', 'ELIT', 'BIB', 'IFG')
data['DOMAIN'] = ('MAIL', 'LIST')
# we need to send the following mails here:
context = { 'data': data }