Beispiel #1
0
def registration_ref(Req, Reference=None):
    if Req.user.is_authenticated():
        return redirect("/stock")

    Req.session['reference'] = Reference

    t = loader.get_template("registration.html")
    Dict = {}
    Dict["title"] = settings.secondary_main

    regisForm = UsersRegis(initial={"reference": Reference})
    Dict["regis_form"] = regisForm.as_p()
    return http_tmpl_context(Req, t, Dict)
Beispiel #2
0
def registration_ref(Req, Reference=None):
    if Req.user.is_authenticated():
        return redirect("/stock")

    Req.session['reference'] = Reference

    t = loader.get_template("registration.html")
    Dict = {}
    Dict["title"] = settings.secondary_main

    regisForm = UsersRegis(initial={"reference": Reference})
    Dict["regis_form"] = regisForm.as_p()
    return http_tmpl_context(Req, t, Dict)
Beispiel #3
0
def try_regis(Req):
    Form = UsersRegis(Req.POST)

    if Form.is_valid():
        # Save a new Article object from the form's data.
        regis_new_user(Req, Form)
        return redirect("/regis_success")

    else:
        t = loader.get_template("registration.html")
        Dict = {}
        Dict["title"] = settings.secondary_regis
        Dict["regis_form"] = Form.as_p()
        return http_tmpl_context(Req, t, Dict)
Beispiel #4
0
def try_regis(Req):
    Form = UsersRegis(Req.POST)

    if Form.is_valid():
        # Save a new Article object from the form's data.
        regis_new_user(Req, Form)
        return redirect("/regis_success")

    else:
        t = loader.get_template("registration.html")
        Dict = {}
        Dict["title"] = settings.secondary_regis
        Dict["regis_form"] = Form.as_p()
        return http_tmpl_context(Req, t, Dict)