File: forms.py

package info (click to toggle)
django-simple-captcha 0.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 668 kB
  • sloc: python: 1,596; makefile: 103; sh: 21
file content (15 lines) | stat: -rw-r--r-- 354 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from django import forms

from captcha.fields import CaptchaField, CaptchaTextInput


class CustomCaptchaTextInput(CaptchaTextInput):
    template_name = "captcha_test/custom_captcha_field.html"


class CaptchaForm(forms.Form):
    captcha = CaptchaField()


class CustomCaptchaForm(forms.Form):
    captcha = CaptchaField(widget=CustomCaptchaTextInput)