Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(48)  |  Call(46)  |  Derive(0)  |  Import(2)

src/i/w/iw.sitestat-1.0.0-beta-2/iw/sitestat/browser/controlpanel.py   iw.sitestat(Download)
from iw.sitestat.config import PROPERTYSHEET
from iw.sitestat.utils import getSite, validateSitestatName
from iw.sitestat import IwSitestatMessageFactory as _
 
###
## Validators and form validaiton errors
###
 
class InvalidASCIILabel(ValidationError):
    __doc__ = _(u'error_invalid_label', default=u"Label has unauthorized characters.")
class InvalidURL(ValidationError):
    __doc__ = _(u'error_invalid_url', default=u"Invalid URL form.")
 
 
def validateOptionalURL(value):
class ISitestatGlobalConfigSchema(Interface):
    """Site wide configuration for iw.sitestat"""
 
    sitestat_enabled = Bool(
        title=_(u'label_sitestat_enabled', default=u"Enable sitestat?"),
        description=_(u'help_sitestat_enabled', default=u"Will provide your Sitestat service relevant information."

src/i/w/iw.sitestat-1.0.0-beta-2/iw/sitestat/browser/contentoptions.py   iw.sitestat(Download)
from iw.sitestat.config import ANNOTATIONS_KEY, BLACKLISTED_LABELS
from iw.sitestat.utils import getSite, validateSitestatName
from iw.sitestat import IwSitestatMessageFactory as _
from iw.sitestat import logger
 
class InvalidCounterError(ValidationError):
    __doc__ = _(u'error_invalid_counter', default=u"This counter is invalid")
 
 
def validateCounters(value):
class InvalidLabelsError(ValidationError):
    __doc__ = _(u'error_invalid_labels', default=u"One (or more) label is invalid")
 
 
class DuplicateLabelError(ValidationError):
    __doc__ = _(u'error_duplicate_label', default=u"Don't duplicate a label name")
 
 
class BlacklistedLabelError(ValidationError):
    __doc__ = _(u'error_blacklisted_label', default=u"A label is blacklisted.")