Commits

Anonymous committed 7a5b053

Adjust application template for 'pyramid_handlers' spinoff in Pyramid 1.0a10.

Comments (0)

Files changed (9)

+0.2  (2011-01-19)
+-----------------
+
+- Pyramid 1.0a10 spins off view handler support to 'pyramid_handlers' package.
+- 'pyramid_sqla' application template depends on Pyramid>=1.0a10.
+
+
 0.1  (2011-01-12)
 -----------------
 
 - Initial release.
+- 'pyramid_sqla' application template is compatible with Pyramid==1.0a9 only
+  (undeclared).
 **pyramid_sqla** is a library for Pyramid_ applications using SQLAlchemy_, and
 an application template that brings some of Pylons 1's features to Pyramid.
 
-Version 0.1 is the intial alpha release for community testing and feedback. The
+This is an alpha release for community testing and feedback. The
 goal is a 1.0 release in time for Pyramid 1.0. API compatibility between
 versions is not guaranteed at this early stage.
 

docs/_static/default.css

 /**
- * Sphinx stylesheet -- default theme
+ * Sphinx stylesheet
  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  */
 
 
  * body: font-size "small" instead of "100%"
  * div.body p: text-align "left" instead of "justify"
+ * important: new class
  */
 
 @import url("basic.css");
 
 div.body p, div.body dd, div.body li {
     text-align: left;
-    /* text-align: justify; 8?
+    /* text-align: justify; 8? */
     line-height: 130%;
 }
 
 .note tt {
     background: #d6d6d6;
 }
+
+div.admonition {
+    background-color: #EEA2AD;
+    border: double 1px;
+    padding: 5px;
+    }
 # built documents.
 #
 # The short X.Y version.
-version = '0.1'
+version = '0.2'
 # The full version, including alpha/beta/rc tags.
-release = '0.1'
+release = '0.2'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
 pyramid_sqla
 ============
-:Version: 0.1, released 2011-01-12
+:Version: 0.2, released 2011-01-19
 :Docs: https://bitbucket.org/sluggo/pyramid_sqla/wiki/html/index.html
 :Download: http://pypi.python.org/packages/source/p/pyramid_sqla/pyramid_sqla-0.1.tar.gz
 :PyPI: http://pypi.python.org/pypi/pyramid_sqla
 
 **pyramid_sqla** is a library for Pyramid_ applications using SQLAlchemy_, and
 an application template that brings some of Pylons 1's features to Pyramid.
+This is an alpha release for community testing and feedback.  The goal is a 1.0
+release in time for Pyramid 1.0. API compatibility between versions is not
+guaranteed at this early stage.
 
-Version 0.1 is the intial alpha release for community testing and feedback. The
-goal is a 1.0 release in time for Pyramid 1.0. API compatibility between
-versions is not guaranteed at this early stage.
+.. admonition:: Important version note
+
+   - Use version 0.2 with Pyramid>=1.0a10.
+   - Version 0.1's application template is compatible only with 
+     Pyramid==1.0a9. This is not declared in the app's setup.py!
+   - The reason is that 1.0a10 spun off the view  handling code to a separate
+     package ('pyramid_handlers').
 
 .. _SQLAlchemy: http://sqlalchemy.org/
 .. _Pyramid: http://docs.pylonshq.com/pyramid/dev/

pyramid_sqla/paster_templates/pyramid_sqla/+package+/__init__.py_tmpl

 from pyramid.config import Configurator
 import pyramid_beaker
+import pyramid_handlers
 import pyramid_sqla
 from pyramid_sqla.static import add_static_route
 
     """ This function returns a Pyramid WSGI application.
     """
     config = Configurator(settings=settings)
+    config.include(pyramid_handlers.includeme)
 
     # Initialize database
     pyramid_sqla.add_engine(settings, prefix='sqlalchemy.')

pyramid_sqla/paster_templates/pyramid_sqla/+package+/handlers.py_tmpl

 import logging
 
-from pyramid.view import action
+from pyramid_handlers import action
 
 #from {{package}}.models import MyModel
 

pyramid_sqla/paster_templates/pyramid_sqla/setup.py_tmpl

 CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
 
 requires = [
-    'pyramid',
+    'pyramid>=1.0a10',
     'pyramid_beaker',
+    'pyramid_handlers',
     'SQLAlchemy',
     'transaction',
     'repoze.tm2',
 """
 
 setup(name='pyramid_sqla',
-      version='0.1',
+      version='0.2',
       description='A SQLAlchemy library and Pylons-like application template for Pyramid',
       long_description=README + '\n\n' +  CHANGES,
       classifiers=[
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.