Last change
on this file since 1860 was
1860,
checked in by liebster, 14 years ago
|
Added captcha in registation form by plone4
|
File size:
820 bytes
|
Rev | Line | |
---|
[870] | 1 | from zope.interface import Interface |
---|
[871] | 2 | from zope.schema.interfaces import IASCIILine |
---|
[1860] | 3 | from plone.theme.interfaces import IDefaultPloneLayer |
---|
[870] | 4 | |
---|
| 5 | class ICaptchaView(Interface): |
---|
| 6 | """ Captcha generating and verifying view that is wrapper around |
---|
| 7 | captcha generation scripts located in skins folder. |
---|
| 8 | |
---|
| 9 | Use the view from a page to generate an image tag ('image_tag' method) |
---|
| 10 | and to verify user input ('verify' method). |
---|
| 11 | """ |
---|
| 12 | |
---|
| 13 | def image_tag(): |
---|
| 14 | """Generate an image tag linking to a captcha""" |
---|
| 15 | |
---|
| 16 | def verify(input): |
---|
| 17 | """ Verify user input. |
---|
| 18 | """ |
---|
[871] | 19 | |
---|
| 20 | class ICaptcha(IASCIILine): |
---|
| 21 | u"""A field for captcha validation""" |
---|
[1860] | 22 | |
---|
| 23 | |
---|
| 24 | class IPloneChaptchaLayer(IDefaultPloneLayer): |
---|
| 25 | """Marker interface that defines a Zope 3 skin layer bound to a Skin |
---|
| 26 | Selection in portal_skins. |
---|
| 27 | """ |
---|
Note: See
TracBrowser
for help on using the repository browser.