I have a problem with the captcha, I'm using the ¨Django Simple Captcha¨ the problem is that it doesn't let me place a bootstrap class so that the input has a better appearance.
I tried to:
- I Put widget_tweaks in that input, but it does not send the data correctly and marks errors
html
<label class="form-label">Captcha</label>
{% render_field form.captcha class="form-control" %}
- From forms I placed a class inside the widget, but it doesn't work
forms.py
class RegisterForm(UserCreationForm):
captcha=CaptchaField(widget=forms.TextInput(attrs={'class': 'form-control'}))
- I took the input id and edit it in my style.css but the bootstrap class is not visible either
style.css
#id_captcha_1{
height: 34px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857143;
color: #555;
background-color: #fff;
background-image: none;
border: 1px solid #ccc;
border-radius: 4px;
}
Any ideas for that input to have the bootstrap class?