Hi Marin,

This one bit me myself.  You're looking for

beaker.cache.type = ext:database

in the config file.

If I remember correctly, Beaker creates the tables for you if they're missing.

Hope that helps!
Matt Z.

On Sat, Dec 6, 2008 at 5:23 AM, Marin <[EMAIL PROTECTED]> wrote:
>
> I was trying to make beaker work with database sessions like it was
> described in the documentation.
> This is the beaker confg:
>
> beaker.session.type = database
> beaker.session.sa.url = postgres://user:[EMAIL PROTECTED]:5432/dbsession
> beaker.session.table_name = db_session
>
> I am not sure if i have to create the table itself but the error that
> I get is this:
>
> Module paste.registry:160 in __contains__
> <<
>        def __contains__(self, key):
>            return key in self._current_obj()
>
>        def __nonzero__(self):>>  return key in self._current_obj()
> Module beaker.session:488 in __contains__
> <<
>        def __contains__(self, key):
>            return self._session().has_key(key)
>
>        def get_by_id(self, id):>>  return self._session().has_key
> (key)
> Module beaker.session:459 in _session
> <<              else:
>                    self.__dict__['_sess'] = Session(req,
> use_cookies=True,
>                                                     **params)
>            return self.__dict__['_sess']
>        >>  **params)
> Module beaker.session:66 in __init__
> <<              self.type = type
>
>            self.namespace_class = namespace_class or clsmap
> [self.type]
>
>            self.namespace_args = namespace_args>>
> self.namespace_class = namespace_class or clsmap[self.type]
> <type 'exceptions.KeyError'>: 'database'
>
> It seems that the type=database option does not work. Using
> type=memory works fine, but there is not persistency...
>
> Can somebody explain what I need to do to make it work?
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to