예제 #1
0
파일: website.py 프로젝트: hforge/shop
    def _make_resource(cls, folder, name, **kw):
        root = get_context().resource
        NeutralWS._make_resource(cls, folder, name, **kw)
        website = root.get_resource(name)
        # Languages (En and Fr)
        metadata = website.metadata
        metadata.set_property('website_languages', ('en', 'fr', ))

        # Website is open
        metadata.set_property('website_is_open', True)

        # Default resources
        for name2, (cls, kw) in default_resources.items():
            cls._make_resource(cls, folder, '%s/%s' % (name, name2), **kw)
예제 #2
0
    def _make_resource(cls, folder, name, **kw):
        root = get_context().resource
        NeutralWS._make_resource(cls, folder, name, **kw)
        website = root.get_resource(name)
        # Languages (En and Fr)
        metadata = website.metadata
        metadata.set_property('website_languages', (
            'en',
            'fr',
        ))

        # Website is open
        metadata.set_property('website_is_open', True)

        # Default resources
        for name2, (cls, kw) in default_resources.items():
            cls._make_resource(cls, folder, '%s/%s' % (name, name2), **kw)
예제 #3
0
파일: website.py 프로젝트: hforge/shop
 def get_metadata_schema(cls):
     return merge_dicts(
               NeutralWS.get_metadata_schema(),
               hide_website_title_on_meta_title=Boolean,
               class_skin=SkinsEnumerate,
               class_skin_administrators=SkinsEnumerate)
예제 #4
0
 def get_metadata_schema(cls):
     return merge_dicts(NeutralWS.get_metadata_schema(),
                        hide_website_title_on_meta_title=Boolean,
                        class_skin=SkinsEnumerate,
                        class_skin_administrators=SkinsEnumerate)