Skip to content

Commit

Permalink
fix: fix register
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehco1996 committed Dec 14, 2020
1 parent 838ceb0 commit bd954a9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/sspanel/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ def get(self, request):
form = RegisterForm(initial={"ref": request.GET.get("ref")})
else:
form = RegisterForm(initial={"invitecode": request.GET.get("invitecode")})
return render(request, "sspanel/register.html", {"form": form})
context["form"] = form
return render(request, "sspanel/register.html", context=context)

def post(self, request):
context = {"simple_extra_static": True}
Expand All @@ -68,7 +69,7 @@ def post(self, request):
)
login(request, user)
return HttpResponseRedirect(reverse("sspanel:userinfo"))
context["form":form]
context["form"] = form
return render(request, "sspanel/register.html", context=context)


Expand Down

0 comments on commit bd954a9

Please sign in to comment.