10π
β
I tried your code. Your problem is that the action attribute of your html form tag is set to β/league/β.
Unless reqPage url is actually β/league/β, it wonβt work. When i changed action="/league/"
to action=""
as such:
<HTML lang="en">
<head>
<title>User Registration</title>
</head>
<body>
<form method="POST" action="">
{% csrf_token %}
<table>{{ form }}</table>
<input type="submit" value="Create Account" />
</form><br /><br />
</body>
</HTML>
The form did work:
In [3]: UserRegistration.objects.all()
Out[3]: [<UserRegistration: aoeu oeu oeu@aeou.com>]
π€jpic
Source:stackexchange.com