Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

217 lines (174 sloc) 6.551 kb
### Pyramid configuration for floof
# Developers: run as
# pserve --reload -n dev config.ini
# or just use bin/dev-server.sh. If you want to customize, see
# custom-example.ini for how to do that without angering the git gods.
# Items that should (or must) vary per machine are marked CHANGEME
[server:main]
use = egg:Paste#http
# CHANGEME: This may be publicly accessible! For production, use gunicorn and
# comment these out.
host = 0.0.0.0
port = 6543
################################################################################
### Production configuration
[app:floof-prod]
use = egg:floof#pyramid
# Pyramid built-ins
default_locale_name = en
# Pyramid's pipeline.
# CHANGEME in production; you certainly want either airbrake or exclog, or
# exceptions won't be logged anywhere
pyramid.includes =
# Airbrake is a service that aggragates error reports for you; requires
# pyramid_airbrake and an API key
# pyramid_airbrake
# exclog logs exceptions via the normal Python logging mechanism, which can
# then send emails or do whatever else you want.
# pyramid_exclog
#airbrake.api_key = ...
#airbrake.handler = blocking
# PySCSS; you probably don't want to touch this
scss.asset_path =
floof:assets/scss
floof:assets/vendor/archetype/scss
scss.compress = true
scss.cache = true
# Mako: http://docs.pylonsproject.org/projects/pyramid/1.1/narr/environment.html#mako-template-renderer-settings
mako.directories = floof:templates
mako.strict_undefined = true
# SQLAlchemy
# CHANGEME in production
sqlalchemy.url = sqlite:///%(here)s/floof.db
# Beaker sessions: http://beaker.groovie.org/configuration.html
# CHANGEME in production, preferably to ext:database
session.type = file
session.data_dir = %(here)s/data/sessions/data
session.lock_dir = %(here)s/data/sessions/lock
session.key = floof
# CHANGEME
session.secret = somesecret
session.httponly = true
session.secure = true
# (two weeks)
session.timeout = 1209600
### floof-specific
# Site title, appears in <title> and elsewhere
site_title = squiggle
# Generated thumbnails will be this size
thumbnail_size = 160
# How wide a range should ratings have?
rating_radius = 1
# Storage for uploaded files, either 'local' or 'mogilefs'
filestore = local
filestore.directory = %(here)s/floof/assets/files
;filestore = mogilefs
;filestore.trackers = localhost:7001
;filestore.domain = floof
# CDN root; if given, this will be used for serving files. It must be a
# full URL, though you should leave off the trailing slash.
# CHANGEME in production
;cdn_root = http://cdn.example.com
### floof authentication
# XXX Should we be performing this hard confirmation on the return_url of
# OpenID assesrtions as well? (request.route_url ultimately uses HTTP_HOST)
# See: https://github.com/mozilla/browserid/wiki/Security-Considerations-when-Implementing-BrowserID
# The scheme, host and port of the site; no trailing slash
# CHANGEME
auth.browserid.audience = https://localhost
# The time, in seconds, to consider a successful verification 'recent'
auth.browserid.expiry_seconds = 600
auth.openid.expiry_seconds = 600
# Allow client certificate authentication
# A potentially DANGEROUS option -- you *must* sanitize the transport
# See: http://bugs.veekun.com/projects/floof/wiki/Client_Certificates
# (The UI presently assumes that it is always "true")
auth.certs.enabled = false
# Determines where to look for the client certificate serial passed from the
# frontend HTTPS server. May be 'http_headers' or 'wsgi_environ'
auth.certs.transport = http_headers
# Where to generate and keep the CA for SSL client certificate authentication
auth.certs.directory = %(here)s/certs
################################################################################
### Development configuration
[app:floof-dev]
use = floof-prod
# Pyramid debugging; these are useful defaults
pyramid.reload_templates = true
pyramid.debug_authorization = false
pyramid.debug_notfound = true
pyramid.debug_routematch = false
pyramid.debug_templates = true
pyramid.includes =
pyramid_debugtoolbar
# Exclude the introspection panel; it's big and slow and not really all that
# useful. Also include our session panel.
debugtoolbar.panels =
pyramid_debugtoolbar.panels.versions.VersionDebugPanel
pyramid_debugtoolbar.panels.settings.SettingsDebugPanel
pyramid_debugtoolbar.panels.headers.HeaderDebugPanel
pyramid_debugtoolbar.panels.request_vars.RequestVarsDebugPanel
pyramid_debugtoolbar.panels.renderings.RenderingsDebugPanel
pyramid_debugtoolbar.panels.logger.LoggingPanel
pyramid_debugtoolbar.panels.performance.PerformanceDebugPanel
pyramid_debugtoolbar.panels.routes.RoutesDebugPanel
pyramid_debugtoolbar.panels.sqla.SQLADebugPanel
pyramid_debugtoolbar.panels.tweens.TweensDebugPanel
floof.lib.debugging.SessionDebugPanel
# Secure cookies don't play well with insecure dev
session.secure = false
# Don't compress SCSS, for ease of reading
scss.compress = false
scss.cache = false
# Generic "are you a developer" signal, most significantly it controls whether
# unexpected errors are handled by a generic in-site error page or allowed to
# propagate up (eg to a dubugger)
floof.debug = true
################################################################################
### Testing configuration
[app:floof-test]
use = floof-dev
sqlalchemy.url = sqlite://
################################################################################
### App pipeline
[filter:paste-prefix]
# This isn't actually used for prefixing, but it makes the app aware of the
# scheme (i.e., https).
use = egg:PasteDeploy#prefix
[filter:tm]
# That is, "transaction manager"
use = egg:repoze.tm2#tm
commit_veto = repoze.tm:default_commit_veto
[pipeline:main]
pipeline = paste-prefix tm floof-prod
[pipeline:dev]
pipeline = paste-prefix tm floof-dev
### Logging
# CHANGEME you may want to redirect or filter this logging
[loggers]
keys = root, floof, sqlalchemy
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = WARN
handlers = console
[logger_floof]
level = WARN
handlers =
qualname = floof
[logger_sqlalchemy]
level = WARN
handlers = console
qualname = sqlalchemy.engine
# "level = INFO" logs SQL queries.
# "level = DEBUG" logs SQL queries and results.
# "level = WARN" logs neither. (Recommended for production systems.)
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s
Jump to Line
Something went wrong with that request. Please try again.