Exception If a wrong field is introduced in Appointment on date
If you introduce something like asdad
in the field, it crashes.
ERROR 2018-12-03 11:02:34,832 exception 18298 140349896963840 Internal Server Error: /appointments/add/22883
Traceback (most recent call last):
File "/var/www/scheduling-system/env/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/var/www/scheduling-system/env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/var/www/scheduling-system/env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/var/www/scheduling-system/smash/web/views/appointment.py", line 61, in appointment_add
raise ValidationError("Invalid request: Errors: {}. Non field errors: {}".format(form.errors, form.non_field_errors()))
ValidationError: [u'Invalid request: Errors: <ul class="errorlist"><li>datetime_when<ul class="errorlist"><li>Enter a valid date/time.</li></ul></li></ul>. Non field errors: ']