Ok, added these lines to development.ini:
beaker.session.key = w2t
beaker.session.type = cookie
beaker.session.encrypt_key = some_string_1
beaker.session.validate_key = some_string_2
Added this action in a controller:
def q1(self):
session['foo'] = 'bazzery'
session.save()
return render('/logic/q1.mako')
That produced this error:
BeakerException: pycryptopp is not installed, can't use encrypted
cookie-only Session.
But, the docs (http://pylonshq.com/docs/en/0.9.7/sessions) seem to say
that either Python 2.5 or pycriptopp would be sufficient:
"The key to use for the session encryption, if not provided the
session will not be encrypted. This will only work if a strong hash
scheme is available, such as pycryptopp’s or Python 2.5’s
hashlib.sha256."
Running on this workstation with Python 2.5.2.
Why is an error still produced?
Thanks.
Edgar
On Mar 23, 8:18 am, edgarsmolow <[email protected]> wrote:
> I'm new to Pylons. I've read the online docs on sessions.
>
> http://pylonshq.com/docs/en/0.9.7/sessions
>
> But, it doesn't provide a practical, simple example of implementing
> sessions. Can someone clarify a bit:
>
> 1. When session type do you favor: database, cookie-only, memory?
>
> 2. How do you implement sessions? By writing a __Before__ method on
> each controller? If using database, do you create a table called,
> say, "sessions" with whatever columns you'll need?
>
> Thanks.
> Edgar
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---