Commits

Chris Miles  committed 089c0a7

Moved who.ini inside the config directory of the package.

  • Participants
  • Parent commits 2ac6ee9

Comments (0)

Files changed (5)

File BlastOff/blastoff/template/+package+/config/deployment.ini_tmpl_tmpl

 sqlalchemy.url = sqlite:///production.db
 
 # Repoze.who
-who.config_file = %(here)s/who.ini
 who.log_level = warning
 who.log_file = stdout
 

File BlastOff/blastoff/template/+package+/config/middleware.py_tmpl

 """Pylons middleware initialization"""
+import os
 from beaker.middleware import CacheMiddleware, SessionMiddleware
 from paste.cascade import Cascade
 from paste.registry import RegistryManager
     })
     
     # Repoze.who middleware
-    app = make_who_with_config(app, global_conf, app_conf['who.config_file'], app_conf['who.log_file'], app_conf['who.log_level'])
+    who_config = os.path.join(os.path.dirname(__file__), 'who.ini')
+    app = make_who_with_config(app, global_conf, who_config, app_conf['who.log_file'], app_conf['who.log_level'])
 
     if asbool(full_stack):
         # Handle Python exceptions

File BlastOff/blastoff/template/+package+/config/who.ini_tmpl

+[plugin:form]
+use = repoze.who.plugins.friendlyform:FriendlyFormPlugin
+login_form_url = /account/login
+login_handler_path = /account/dologin
+post_login_url =
+logout_handler_path = /account/logout
+post_logout_url =
+rememberer_name = auth_tkt
+
+[plugin:auth_tkt]
+use = repoze.who.plugins.auth_tkt:make_plugin
+secret = iwedfhew9hdwe9dn823jioxk
+
+[plugin:sa_auth]
+use = repoze.who.plugins.sa:make_sa_authenticator
+user_class = {{package}}.model:User
+dbsession = {{package}}.model.meta:Session
+# user_name_translation = user_name
+# validate_password_translation = validate_password
+
+[plugin:sa_md]
+use = repoze.who.plugins.sa:make_sa_user_mdprovider
+user_class = {{package}}.model:User
+dbsession = {{package}}.model.meta:Session
+
+[general]
+request_classifier = repoze.who.classifiers:default_request_classifier
+challenge_decider = repoze.who.classifiers:default_challenge_decider
+
+[identifiers]
+plugins =
+    form;browser
+    auth_tkt
+
+[authenticators]
+plugins =
+        sa_auth
+
+[challengers]
+plugins =
+    form;browser
+
+[mdproviders]
+plugins =
+        sa_md

File BlastOff/blastoff/template/development.ini_tmpl

 sqlalchemy.url = {{sqlalchemy_url}}
 
 # Repoze.who
-who.config_file = %(here)s/who.ini
 who.log_level = warning
 who.log_file = stdout
 

File BlastOff/blastoff/template/who.ini_tmpl

-[plugin:form]
-use = repoze.who.plugins.friendlyform:FriendlyFormPlugin
-login_form_url = /account/login
-login_handler_path = /account/dologin
-post_login_url =
-logout_handler_path = /account/logout
-post_logout_url =
-rememberer_name = auth_tkt
-
-[plugin:auth_tkt]
-use = repoze.who.plugins.auth_tkt:make_plugin
-secret = iwedfhew9hdwe9dn823jioxk
-
-[plugin:sa_auth]
-use = repoze.who.plugins.sa:make_sa_authenticator
-user_class = {{package}}.model:User
-dbsession = {{package}}.model.meta:Session
-# user_name_translation = user_name
-# validate_password_translation = validate_password
-
-[plugin:sa_md]
-use = repoze.who.plugins.sa:make_sa_user_mdprovider
-user_class = {{package}}.model:User
-dbsession = {{package}}.model.meta:Session
-
-[general]
-request_classifier = repoze.who.classifiers:default_request_classifier
-challenge_decider = repoze.who.classifiers:default_challenge_decider
-
-[identifiers]
-plugins =
-    form;browser
-    auth_tkt
-
-[authenticators]
-plugins =
-        sa_auth
-
-[challengers]
-plugins =
-    form;browser
-
-[mdproviders]
-plugins =
-        sa_md