Hi. I am using the SignedCookieSessionFactory, as I have very simple needs
of the session. I can't see a way to add default objects to the session, eg
I want the default/new session to be `{'pinned':OrderedDict()}`. This way
in my code, I don't need to be checking if 'pinned' is set, and setting it
to an OrderedDict otherwise. Doing so is extremely impractical in templates.
As a workaround, I have virtually copied pyramid.session, and altered
'class CookieSession(dict)'. I changed the lines `state = {}` to `state =
self._state`, and set `_state = {'pinned':OrderedDict()}`. Is this as good
as it gets, or is there a hook or something I missed and could be using to
set my defaults better?
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.