Exemplo n.º 1
0
def kotti_configure(settings):

    Audio.type_info.addable_to.append("Blog entry")
    BlogEntry.type_info.add_selectable_default_view("media_folder_view",
                                                    _("Media Folder"))
    view_needed.add(css)
    edit_needed.add(css)
Exemplo n.º 2
0
from pyramid.i18n import TranslationStringFactory
from fanstatic import Library
from fanstatic import Resource
from kotti.fanstatic import edit_needed
from kotti.fanstatic import view_needed
from kotti.fanstatic import base_css

PROJECTNAME = 'betahaus_net_site'
BetahausTSF = TranslationStringFactory(PROJECTNAME)

betahaus_net_lib = Library('betahaus_static', 'static')
main_css = Resource(betahaus_net_lib, 'main.css', depends = (base_css,))


view_needed.add(main_css)
edit_needed.add(main_css)

def includeme(config):
    cache_ttl_seconds = int(config.registry.settings.get('cache_ttl_seconds', 7200))
    config.add_static_view('static', '%s:static' % PROJECTNAME, cache_max_age = cache_ttl_seconds)
    config.scan()


def kotti_configure(settings):
    settings['kotti.fanstatic.view_needed'] = '%s.view_needed' % PROJECTNAME
    settings['kotti.fanstatic.edit_needed'] = '%s.edit_needed' % PROJECTNAME
Exemplo n.º 3
0
def includeme(config):
    config.scan(__name__)
    edit_needed.add(kotti_grid)
Exemplo n.º 4
0
def includeme(config):
    config.scan(__name__)
    edit_needed.add(kotti_grid)
Exemplo n.º 5
0
def includeme(config):
    edit_needed.add(kotti_tinymce)
    config.scan("kotti_tinymce")
    config.add_translation_dirs('kotti_tinymce:locale/')