Changeset 3443 in products for quintagroup.plonecaptchas
- Timestamp:
- Apr 20, 2012 1:36:28 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.plonecaptchas/branches/captcha_provider/quintagroup/plonecaptchas/captcha.py
r3442 r3443 33 33 """ Extend captcha vocabulary with quintagroup.plonecaptchas""" 34 34 terms = vocabularies.captcha_vocabulary(context)._terms 35 captchas = [t.value for t in terms] 35 36 36 37 adapters = getAdapters((context,), ICaptchaProvider) 37 38 for name, adapter in adapters: 38 terms.append(SimpleTerm(value=name, 39 token=name, 40 title=name)) 39 if name and name not in captchas: 40 terms.append(SimpleTerm(value=name.lower(), 41 token=name.lower(), 42 title=name[0].upper()+name[1:])) 41 43 return SimpleVocabulary(terms)
Note: See TracChangeset
for help on using the changeset viewer.