#2166: quickstart-generated tests crash
-------------------------------------+--------------------------------------
 Reporter:  pitrou                   |        Owner:  Gustavo 
     Type:  defect                   |       Status:  assigned
 Priority:  normal                   |    Milestone:  2.0b5   
Component:  TurboGears               |      Version:          
 Severity:  normal                   |   Resolution:          
 Keywords:  repoze.what.plugins.sql  |  
-------------------------------------+--------------------------------------
Comment (by pitrou):

 Here it is:

 {{{
 from tg.configuration import AppConfig, Bunch
 import ftth
 from ftth import model
 from ftth.lib import app_globals, helpers

 base_config = AppConfig()
 base_config.renderers = []

 base_config.package = ftth

 #Set the default renderer
 base_config.default_renderer = 'mako'
 base_config.renderers.append('mako')
 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 = ftth.model
 base_config.db_session = ftth.model.db_session

 # Configure the authentication backend
 base_config.auth_backend = 'sqlalchemy'
 base_config.sa_auth.db_session = model.db_session
 # what is the class you want to use to search for users in the database
 base_config.sa_auth.user_class = model.User
 # what is the class you want to use to search for groups in the database
 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

 # set a default hashing mechanism for the auth system
 # this makes sure the passwords are not stored in clear-text
 # inside the database. Choices are "md5", "sha1" or "salted_sha1"
 base_config.sa_auth.password_encryption_method = "salted_sha1"

 # 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
 }}}

-- 
Ticket URL: <http://trac.turbogears.org/ticket/2166#comment:6>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to