testmode warning
This commit is contained in:
parent
39cee37be8
commit
4229928aae
2
TODO
2
TODO
|
@ -4,6 +4,4 @@
|
|||
|
||||
* enforce Mac OS if Mac is choosen?
|
||||
|
||||
* Maintainance-Anzeige im Debugmodus, damit niemand denkt, es würden mails verschickt.
|
||||
|
||||
* better error handling with mail sending.
|
||||
|
|
|
@ -29,6 +29,9 @@
|
|||
</style>
|
||||
|
||||
<img src="{% static 'evapp/logo.png' %}" />
|
||||
{% if TESTMODE %}
|
||||
<h1 style="background-color:red;color:white">WARNUNG! Test-MODUS aktiviert. Es werden keine Mails verschickt!</h1>
|
||||
{% endif %}
|
||||
<h1>
|
||||
E (V A) - Eintritt, (Veränderung, Austritt)<p>
|
||||
</h1>Du bist eingeloggt als {{ user.email }}
|
||||
|
|
|
@ -20,7 +20,7 @@ class LoginTestCase(TestCase):
|
|||
self.assertContains(self.response, "WARNUNG! Test-MODUS aktiviert. Es werden keine Mails verschickt!", status_code=200)
|
||||
|
||||
|
||||
class SimpleTest(TestCase):
|
||||
class NoLoginTestCase(TestCase):
|
||||
def setUp(self):
|
||||
self.client = Client()
|
||||
|
||||
|
|
|
@ -83,8 +83,10 @@ class EvaFormView(LoginRequiredMixin, CookieWizardView):
|
|||
|
||||
#print('GETCONTEXT')
|
||||
context = super().get_context_data(form=form, **kwargs)
|
||||
#testmode = settings.DEBUG or settings.MAILTEST
|
||||
context.update({'choice': self.choice,
|
||||
'choice_string': TYPE_CHOICES[self.choice]})
|
||||
'choice_string': TYPE_CHOICES[self.choice],
|
||||
'TESTMODE': settings.DEBUG or settings.MAILTEST})
|
||||
|
||||
# deliver context for forms if we are in the last step
|
||||
if (self.steps.step1 == 5 or (self.choice != 'IN' and self.steps.step1 == 3)):
|
||||
|
|
Loading…
Reference in New Issue