Changeset 5733
- Timestamp:
- 11/20/08 09:18:13 (2 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/turbogears/qstemplates/quickstart/+package+/config/app.cfg_tmpl
r5666 r5733 90 90 # Set internationalization 91 91 # i18n.run_template_filter = True 92 93 # CatWalk session directory 94 # You may need to set this to the path of a directory with write access for 95 # your server, e.g. if you deploy behind mod-wsgi and you want to use CatWalk 96 # mounted in your own controllers. 97 # By default CatWalk stores its session data in the directory 'catwalk-session' 98 # below your application's package directory or below the current directory. 99 # The path may be absolute or relative to the current working directory of your 100 # server. The directory will be created if it does not exist, so make sure it 101 # either exists already or the server has write access in the parent directory 102 # as well. Example: 103 # catwalk.session_dir = "/absolute/path/to/catwalk-session-dir" 104 # Default: 105 # catwalk.session_dir = 'catwalk-session' 92 106 93 107 #if $identity != 'none' branches/1.1/turbogears/toolbox/catwalk/__init__.py
r4202 r5733 26 26 27 27 import turbogears 28 from turbogears import expose, identity28 from turbogears import config, expose, identity 29 29 30 30 … … 592 592 """Return the path to the catwalk session pickle. 593 593 594 Create a session directory if nescesary. 595 596 """ 597 catwalk_session_dir = os.path.join(turbogears.util.get_package_name() 598 or '', 'catwalk-session') 594 By default this is located in a directory named 'catwalk-session' 595 beneath your application's package directory or, if the package name 596 can not be determined, below the ccurrent directory. 597 598 The directory must be writable by the server and will be created if it 599 does not exist. You can specify a different directory if you set the 600 config setting 'catwalk.session_dir' to an absolute path. 601 602 """ 603 catwalk_session_dir = os.path.join(config.get('catwalk.session_dir', 604 turbogears.util.get_package_name() or os.curdir), 'catwalk-session') 599 605 catwalk_session_dir = os.path.abspath(catwalk_session_dir) 600 606 if not os.path.exists(catwalk_session_dir): 601 607 try: 602 608 os.mkdir(catwalk_session_dir) 603 except IOError, e:609 except (IOError, OSError), e: 604 610 msg = 'Fail to create session directory %s' % e 605 611 raise cherrypy.HTTPRedirect(turbogears.url('error', msg=msg))