def pythonistas_signup(request): context = {"form": RegisterForm(request.POST or None)} if request.method == "POST" and context["form"].is_valid(): user = context["form"].save() login(request, user) return redirect("/") return render(request, "pythonistas-signup.html", context)
def pythonistas_signup(request): context = {"form": RegisterForm(request.POST or None)} context["webpush"] = WEBPUSH_CONTEXT if request.method == "POST" and context["form"].is_valid(): user = context["form"].save() login(request, user) return redirect("/") return render(request, f"{CURRENT_DOMAIN}/pythonistas-signup.html", context)