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)
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)
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)
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)