Chris McDonough
2010-03-08 1a6e9e316162caeba171735372b32982bc2ede43
- The ``__name__`` value assigned to the returned object in the
``bfg_alchemy`` application template's ``MyApp`` model was an
integer. This was incorrect. It is now a string.


2 files modified
22 ■■■■ changed files
CHANGES.txt 16 ●●●● patch | view | raw | blame | history
repoze/bfg/paster_templates/alchemy/+package+/models.py 6 ●●●●● patch | view | raw | blame | history
CHANGES.txt
@@ -1,3 +1,16 @@
Next release
============
Bug Fixes
---------
- Defer conditional import of IPython to avoid breakage under mod_wsgi.
  http://bugs.repoze.org/issue138
- The ``__name__`` value assigned to the returned object in the
  ``bfg_alchemy`` application template's ``MyApp`` model was an
  integer.  This was incorrect.  It is now a string.
1.2 (2010-02-10)
================
@@ -16,9 +29,6 @@
Bug Fixes
---------
- Defer conditional import of IPython to avoid breakage under mod_wsgi.
  http://bugs.repoze.org/issue138
- More correct conversion of provided ``renderer`` values to resource
  specification values (internal).
repoze/bfg/paster_templates/alchemy/+package+/models.py
@@ -35,10 +35,12 @@
    def __getitem__(self, key):
        session= DBSession()
        try:
            key = int(key)
            id = int(key)
        except (ValueError, TypeError):
            raise KeyError(key)
        query = session.query(MyModel).filter_by(id=key)
        query = session.query(MyModel).filter_by(id=id)
        try:
            item = query.one()
            item.__parent__ = self