Beispiel #1
0
base_config.renderers.append('genshi')

# if you want raw speed and have installed chameleon.genshi
# you should try to use this renderer instead.
# warning: for the moment chameleon does not handle i18n translations
#base_config.renderers.append('chameleon_genshi')
#Configure the base SQLALchemy Setup
base_config.use_sqlalchemy = True
base_config.model = model
base_config.DBSession = model.DBSession
base_config.use_transaction_manager = True

base_config.use_toscawidgets = True


# HOOKS
def on_startup():
    import datetime
    print ' --- starting turbotequila application --- ' + str(
        datetime.datetime.now())


def on_shutdown():
    print '--- stopping turbotequila application --- '


base_config.call_on_startup = [on_startup]
base_config.call_on_shutdown = [on_shutdown]

token = 'GDV'
Beispiel #2
0
# managing login and logout of your application
base_config.sa_auth.form_plugin = None

# You may optionally define a page where you want users to be redirected to
# on login:
base_config.sa_auth.post_login_url = "/post_login"

# You may optionally define a page where you want users to be redirected to
# on logout:
base_config.sa_auth.post_logout_url = "/post_logout"

# Handle custom errors
base_config.handle_status_codes.append(400)

# Startup and shutdown
def on_startup():
    #    notify.connect()
    pass


def on_shutdown():
    pass


base_config.call_on_startup = [on_startup]
base_config.call_on_shutdown = [on_shutdown]

# ToscaWidgets
base_config.use_toscawidgets = False
base_config.use_toscawidgets2 = True
Beispiel #3
0
#Set the default renderer
base_config.default_renderer = 'genshi'
base_config.renderers.append('genshi')
# if you want raw speed and have installed chameleon.genshi
# you should try to use this renderer instead.
# warning: for the moment chameleon does not handle i18n translations
#base_config.renderers.append('chameleon_genshi')

#Configure the base SQLALchemy Setup
base_config.use_sqlalchemy = True
base_config.model = bastion.model
base_config.DBSession = bastion.model.DBSession


# YOU MUST CHANGE THIS VALUE IN PRODUCTION TO SECURE YOUR APP
base_config.sa_auth.cookie_secret = "ChangeME"

# override this if you would like to provide a different who plugin for
# managing login and logout of your application
base_config.sa_auth.form_plugin = None

# You may optionally define a page where you want users to be redirected to
# on login:
base_config.sa_auth.post_login_url = '/post_login'

# You may optionally define a page where you want users to be redirected to
# on logout:
base_config.sa_auth.post_logout_url = '/post_logout'

base_config.call_on_startup = [schedule]
Beispiel #4
0
base_config.sa_auth.group_class = model.Group
# what is the class you want to use to search for permissions in the database
base_config.sa_auth.permission_class = model.Permission

# override this if you would like to provide a different who plugin for
# managing login and logout of your application
myPlugin = MySQLAlchemyAuthenticatorPlugin(model.User, model.DBSession)

base_config.sa_auth.authenticators = [("MySQLAlchemyAuthenticatorPlugin", myPlugin)]


# You may optionally define a page where you want users to be redirected to
# on login:
base_config.sa_auth.post_login_url = '/post_login'

# You may optionally define a page where you want users to be redirected to
# on logout:
base_config.sa_auth.post_logout_url = '/post_logout'

base_config.ldap = Bunch()
base_config.ldap.host = '192.168.42.167'
base_config.ldap.port = 389
base_config.ldap.basedn = ['ou=sz,dc=r-pac,dc=local', 'ou=hk,dc=r-pac,dc=local', 'ou=sh,dc=r-pac,dc=local']
base_config.ldap.initdn = 'CN=adAuth,OU=System Account,DC=r-pac,DC=local'
base_config.ldap.initpw = 'ky2379ck$'

#===============================================================================
# add the cron job , to send email on 13rd and 15th for DBA
#===============================================================================
base_config.call_on_startup=[dbaEmailNotify,sendInfo2mglobalpack]
Beispiel #5
0
 
"""

from tg.configuration import AppConfig

import scriptspony
from scriptspony import model
from scriptspony.lib import app_globals, helpers

from .. import vhosts

base_config = AppConfig()
base_config.renderers = []

base_config.package = scriptspony

base_config.call_on_startup = [vhosts.connect]

#Set the default renderer
base_config.default_renderer = 'mako'
base_config.renderers.append('mako')
# if you want raw speed and have installed chameleon.genshi
# you should try to use this renderer instead.
# warning: for the moment chameleon does not handle i18n translations
#base_config.renderers.append('chameleon_genshi')

#Configure the base SQLALchemy Setup
base_config.use_sqlalchemy = True
base_config.model = scriptspony.model
base_config.DBSession = scriptspony.model.DBSession