Skip to content

Instantly share code, notes, and snippets.

@Liano-HyperionDev
Created August 27, 2024 10:03
Show Gist options
  • Save Liano-HyperionDev/4309e9febdd22444d838111662c38356 to your computer and use it in GitHub Desktop.
Save Liano-HyperionDev/4309e9febdd22444d838111662c38356 to your computer and use it in GitHub Desktop.
views.py
def register(request):
if request.method == 'POST':
form = SignupForm(request.POST)
if form.is_valid():
user = form.save()
login(request, user)
return redirect('user_auth:show_user')
else:
form = SignupForm()
return render(request, 'authentication/register.html', {'form': form})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment