Compare commits
No commits in common. "c96f195b00b8e85068d4d87fe0f82a13601c7c87" and "4e7a0372c710f5b6f9369b081601817b42255d8f" have entirely different histories.
c96f195b00
...
4e7a0372c7
|
@ -15,8 +15,7 @@ class ProjectForm(ModelForm):
|
|||
|
||||
class VolunteerForm(ModelForm):
|
||||
|
||||
choice = ChoiceField(choices=TYPE_CHOICES, widget=RadioSelect,
|
||||
label='Was möchtest Du beantragen?')
|
||||
choice = ChoiceField(choices=TYPE_CHOICES, widget=RadioSelect)
|
||||
|
||||
class Meta:
|
||||
model = Volunteer
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
{{data}}
|
||||
|
||||
|
||||
Hallo Team Ideenförderung,
|
||||
|
||||
es gab einen neuen Antrag von {{data.realname}}.
|
||||
|
||||
Der Nutzer mit dem Username {{data.username}} fragt ein {% if data.choice == 'LIT' %} Literaturstipendium
|
||||
Username {{data.username}} fragt ein
|
||||
{% if data.choice == 'LIT' %} Literaturstipendium
|
||||
{% elif data.choice == 'BIB' %} Bibliotheksstipendium
|
||||
{% elif data.choice == 'IFG' %} IFG
|
||||
{% elif data.choice == 'ELIT' %} eLiteraturstipendium
|
||||
{% elif data.choice == 'SOFT' %} Softwarestipendium
|
||||
{% 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: INSERT Link here
|
||||
Ablehnen: INSERT Link here
|
||||
|
||||
|
||||
{% comment %}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from django.urls import path
|
||||
|
||||
from .views import project, accreditation, travel, certificate, ExternView, done, authorize, deny
|
||||
from .views import project, accreditation, travel, certificate, ExternView, done
|
||||
|
||||
urlpatterns = [
|
||||
path('project', project, name='project'),
|
||||
|
@ -8,7 +8,5 @@ urlpatterns = [
|
|||
path('travel', travel, name='travel'),
|
||||
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('saved', done, name='done')
|
||||
]
|
||||
|
|
|
@ -10,12 +10,6 @@ from django.template import Context
|
|||
from .forms import ProjectForm, VolunteerForm, LibraryForm, IFGForm
|
||||
from .models import Project, TYPE_CHOICES
|
||||
|
||||
def authorize(request):
|
||||
print('AUTHORIZE!')
|
||||
|
||||
def deny(request):
|
||||
print('DENY!')
|
||||
|
||||
def project(request):
|
||||
# return HttpResponse("Hello, world. You're at the input form")
|
||||
# ProjectFormSet = modelformset_factory(Project, fields='__all__')
|
||||
|
@ -106,9 +100,6 @@ class ExternView(CookieWizardView):
|
|||
form.type = data['choice']
|
||||
form.save()
|
||||
|
||||
# add primary key to context
|
||||
data['id'] = 100
|
||||
|
||||
# we need to send the following mails here:
|
||||
context = { 'data': data }
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue