Exemplo n.º 1
0
def checkCoverImage(image):
    """Check Image height:width is 1:1.8
    """
    imageSize = image.getImageSize()
    if imageSize[0] == 720 and imageSize[1] == 300:
        return True
    raise Invalid(_(u"Wrong! Image Size must be 720X300(W:H)"))
Exemplo n.º 2
0
def checkImage1_1(image):
    """Check Image width:height is 2:1
    """
    # 暫時先不對子計畫logo做檢查
    return True
    imageSize = image.getImageSize()
    if imageSize[0] == 2 * imageSize[1]:
        return True
    raise Invalid(_(u"Wrong! width:height must be 2:1."))
Exemplo n.º 3
0
 def title(self):
     return _(u"SchoolSearch")
Exemplo n.º 4
0
# -*- coding: utf-8 -*-
from artistic.content import _
from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm

# 可設定年份
SETTABLE_YEARS = SimpleVocabulary(
    [SimpleTerm(value=u'2016', title=_(u'2016')),
     SimpleTerm(value=u'2017', title=_(u'2017')),
     SimpleTerm(value=u'2018', title=_(u'2018')),
     SimpleTerm(value=u'2019', title=_(u'2019')),
     SimpleTerm(value=u'2020', title=_(u'2020')),]
)

# 設備分類
DEVICE_CLASSFICATION = SimpleVocabulary(
    [SimpleTerm(value=u'basic device', title=_(u'Basic Device')),
     SimpleTerm(value=u'extension device', title=_(u'Extension Device')),]
)

# 藝才類別
ART_CLASSFICATION = SimpleVocabulary(
    [SimpleTerm(value=u"Artistic Class", title=_(u'artistic class')),
     SimpleTerm(value=u"Music Class", title=_(u'music class')),
     SimpleTerm(value=u"Dance Class", title=_(u'dance class')),]
)

# 公立或私立學校
PUBLIC_OR_PRIVATE = SimpleVocabulary(
    [SimpleTerm(value=u'public school', title=_(u'Public School')),
     SimpleTerm(value=u'private school', title=_(u'Private School')),]
)