Skip to content
Advertisement

Hi My Django Forms.cleaned_data is not giving me any output. Can someone help me?

I am trying to create a page to generate passwords and the user will select either level 0 or level 1 for varying strengths of the password. And I am not able to get the users selection of level 0 or level 1 using the radio button.

My views.py

JavaScript

My forms.py

JavaScript

My html file

JavaScript

Sorry if the problem may seem obvious, I am new to django.

After printing out the form.error it keeps saying this “on” it isn’t even one of my radio options. So how does it give me that?

Advertisement

Answer

The radio inputs are missing the value so add value for each radio and try again.

Advertisement