Files @ 2aae2af55dea
Branch filter:

Location: symposion_app/vendor/symposion/views.py

James Polley
Disable client-side validation on credit_note forms

* HTML5 browsers have some clevers to do client-side validation of
forms
* Django activates this by default for certain field types
* However, in this case, there are three forms on this page. We rely
on two of them being invalid in order to figure out what processing
to do.
* So we need to disable the client-side validation.
from django.contrib.auth.decorators import login_required
from django.shortcuts import render, redirect


@login_required
def dashboard(request):
    if request.session.get("pending-token"):
        return redirect("speaker_create_token",
                        request.session["pending-token"])
    return render(request, "dashboard.html")