This commit is contained in:
tisto 2012-01-14 07:47:07 +01:00
parent aa36c0bc9b
commit 11e101f7d7
3 changed files with 12 additions and 9 deletions

View File

@ -2,6 +2,7 @@ from Acquisition import aq_inner, aq_parent
from Products.Five.browser import BrowserView
class View(BrowserView):
"""Comment View.

View File

@ -162,7 +162,8 @@ class MigrationTest(unittest.TestCase):
[{'comment': comment1, 'depth': 0, 'id': long(comment1.id)},
{'comment': comment1_1, 'depth': 1, 'id': long(comment1_1.id)},
{'comment': comment1_1_1, 'depth': 2, 'id': long(comment1_1_1.id)},
{'comment': comment1_1_1_1, 'depth': 3, 'id': long(comment1_1_1_1.id)},
{'comment': comment1_1_1_1, 'depth': 3,
'id': long(comment1_1_1_1.id)},
{'comment': comment1_2, 'depth': 1, 'id': long(comment1_2.id)},
{'comment': comment1_3, 'depth': 1, 'id': long(comment1_3.id)},
{'comment': comment1_4, 'depth': 1, 'id': long(comment1_4.id)},

View File

@ -7,28 +7,28 @@ from plone.app.discussion.interfaces import _
HAS_CAPTCHA = False
try:
import plone.formwidget.captcha
HAS_CAPTCHA = True # pragma: no cover
HAS_CAPTCHA = True # pragma: no cover
except ImportError:
pass
HAS_RECAPTCHA = False
try:
import plone.formwidget.recaptcha
HAS_RECAPTCHA = True # pragma: no cover
HAS_RECAPTCHA = True # pragma: no cover
except ImportError:
pass
HAS_AKISMET = False
try:
import collective.akismet
HAS_AKISMET = True # pragma: no cover
HAS_AKISMET = True # pragma: no cover
except ImportError:
pass
HAS_NOROBOTS = False
try:
import collective.z3cform.norobots
HAS_NOROBOTS = True # pragma: no cover
HAS_NOROBOTS = True # pragma: no cover
except ImportError:
pass
@ -43,28 +43,28 @@ def captcha_vocabulary(context):
token='disabled',
title=_(u'Disabled')))
if HAS_CAPTCHA: # pragma: no cover
if HAS_CAPTCHA: # pragma: no cover
terms.append(
SimpleTerm(
value='captcha',
token='captcha',
title='Captcha'))
if HAS_RECAPTCHA: # pragma: no cover
if HAS_RECAPTCHA: # pragma: no cover
terms.append(
SimpleTerm(
value='recaptcha',
token='recaptcha',
title='ReCaptcha'))
if HAS_AKISMET: # pragma: no cover
if HAS_AKISMET: # pragma: no cover
terms.append(
SimpleTerm(
value='akismet',
token='akismet',
title='Akismet'))
if HAS_NOROBOTS: # pragma: no cover
if HAS_NOROBOTS: # pragma: no cover
terms.append(
SimpleTerm(
value='norobots',
@ -72,6 +72,7 @@ def captcha_vocabulary(context):
title='Norobots'))
return SimpleVocabulary(terms)
def text_transform_vocabulary(context):
"""Vocabulary with all available portal_transform transformations.
"""