Changeset 3121 in products for quintagroup.formlib.captcha/trunk/quintagroup/formlib/captcha/example.py
- Timestamp:
- Apr 15, 2011 1:00:00 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.formlib.captcha/trunk/quintagroup/formlib/captcha/example.py
r2810 r3121 8 8 from quintagroup.formlib.captcha import Captcha 9 9 10 10 11 # Define CaptchaFormlibForm form schema 11 12 12 class ICaptchaFormlibFormSchema(Interface): 13 13 label = TextLine(title=u'Label', 14 14 required=False) 15 15 captcha = Captcha(title=u'Type the code') 16 16 17 17 18 # Create adapter for any object to ICaptchaFormlibFormSchema 18 19 # schema interface 19 20 20 class CaptchaFormlibFormAdapter(object): 21 21 implements(ICaptchaFormlibFormSchema) … … 26 26 label = u'' 27 27 captcha = None 28 28 29 29 30 # And at the last define the CaptchaFormlibForm form 30 31 31 class CaptchaFormlibForm(EditForm): 32 32 form_fields = FormFields(ICaptchaFormlibFormSchema)
Note: See TracChangeset
for help on using the changeset viewer.