tailbone/rattail/pyramid/__init__.py
2012-04-10 12:39:30 -05:00

79 lines
2.6 KiB
Python

#!/usr/bin/env python
# -*- coding: utf-8 -*-
################################################################################
#
# Rattail -- Retail Software Framework
# Copyright © 2010-2012 Lance Edgar
#
# This file is part of Rattail.
#
# Rattail is free software: you can redistribute it and/or modify it under the
# terms of the GNU Affero General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
# Rattail is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
# more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Rattail. If not, see <http://www.gnu.org/licenses/>.
#
################################################################################
"""
``rattail.pyramid`` -- Rattail's Pyramid Framework
"""
# import os.path
# import pyramid_beaker
# from pyramid.config import Configurator
# import edbob
from rattail.pyramid._version import __version__
# def main(global_config, **settings):
# """
# This function returns a Pyramid WSGI application.
# """
# # Here you can insert any code to modify the ``settings`` dict.
# # You can:
# # * Add additional keys to serve as constants or "global variables" in the
# # application.
# # * Set default values for settings that may have been omitted.
# # * Override settings that you don't want the user to change.
# # * Raise an exception if a setting is missing or invalid.
# # * Convert values from strings to their intended type.
# settings['mako.directories'] = [
# 'something:templates',
# 'edbob.pyramid:templates',
# ]
# # Configure Pyramid
# config = Configurator(settings=settings)
# config.include('edbob.pyramid')
# config.include('something.subscribers')
# config.scan()
# # Configure Beaker
# session_factory = pyramid_beaker.session_factory_from_settings(settings)
# config.set_session_factory(session_factory)
# pyramid_beaker.set_cache_regions_from_settings(settings)
# # Configure edbob
# edbob.basic_logging()
# edbob.init('something', os.path.abspath(settings['edbob.config']))
# # Add static views
# # config.add_static_view('css', 'static/css', cache_max_age=3600)
# # config.add_static_view('img', 'static/img', cache_max_age=3600)
# # config.add_static_view('js', 'static/js', cache_max_age=3600)
# return config.make_wsgi_app()