Open ARJhe opened 4 years ago
- Your password can’t be too similar to your other personal information.
- Your password must contain at least 8 characters.
- Your password can’t be a commonly used password.
- Your password can’t be entirely numeric.
def register(request):
if request.method == 'POST':
form = UserCreationForm(request.POST)
if form.is_valid():
username = form.cleaned_data.get('username')
messages.success(request, f'Account created for {username}!')
return redirect('blog_home')
else:
form = UserCreationForm()
return render(request, 'users/register.html', {'form': form})
After filled name,password and recheck password, form.is_valid() still get false.