Permalink
Browse files

added initial pyramid based site

  • Loading branch information...
0 parents commit 59e05aa2ae1300ee2c0708483e87f1f63f8a6b35 @dbrenneman committed Dec 8, 2012
@@ -0,0 +1,4 @@
+0.0
+---
+
+- Initial version
@@ -0,0 +1,2 @@
+include *.txt *.ini *.cfg *.rst
+recursive-include dontpanic *.ico *.png *.css *.gif *.jpg *.pt *.txt *.mak *.mako *.js *.html *.xml
@@ -0,0 +1 @@
+My blag.
@@ -0,0 +1,70 @@
+###
+# app configuration
+# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/environment.html
+###
+
+[app:main]
+use = egg:DontPanic
+
+pyramid.reload_templates = true
+pyramid.debug_authorization = false
+pyramid.debug_notfound = false
+pyramid.debug_routematch = false
+pyramid.default_locale_name = en
+pyramid.includes =
+ pyramid_debugtoolbar
+ pyramid_tm
+jinja2.directories = dontpanic:templates
+sqlalchemy.url = sqlite:///%(here)s/DontPanic.sqlite
+
+debugtoolbar.hosts = 70.199.70.124
+
+
+###
+# wsgi server configuration
+###
+
+[server:main]
+use = egg:waitress#main
+host = 0.0.0.0
+port = 6543
+
+###
+# logging configuration
+# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html
+###
+
+[loggers]
+keys = root, dontpanic, sqlalchemy
+
+[handlers]
+keys = console
+
+[formatters]
+keys = generic
+
+[logger_root]
+level = INFO
+handlers = console
+
+[logger_dontpanic]
+level = DEBUG
+handlers =
+qualname = dontpanic
+
+[logger_sqlalchemy]
+level = INFO
+handlers =
+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
@@ -0,0 +1,24 @@
+from pyramid.config import Configurator
+from sqlalchemy import engine_from_config
+
+from .models import (
+ DBSession,
+ Base,
+ )
+
+
+def main(global_config, **settings):
+ """ This function returns a Pyramid WSGI application.
+ """
+ engine = engine_from_config(settings, 'sqlalchemy.')
+ DBSession.configure(bind=engine)
+ Base.metadata.bind = engine
+ config = Configurator(settings=settings)
+ config.include('pyramid_jinja2')
+ config.add_static_view('assets', 'assets', cache_max_age=3600)
+ config.add_route('home', '/')
+ config.add_route('about', '/about')
+ config.add_route('blog', '/blog')
+ config.add_route('contact', '/contact')
+ config.scan()
+ return config.make_wsgi_app()

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 59e05aa

Please sign in to comment.