2010/1/4 rnarozniak <[email protected]>:
> Hello,
>
> I am very new to mod_wsgi, and I am trying to get beaker session
> management to work with a mod_wsgi, embedded apache application. I
> have a feeling that I am missing something quite fundamental to
> mod_wsgi.
>
> Any help would be greatly appreciated.
>
Just made a copy and paste of your code.
> in my wsgi application script, i have the following:
>
> ##################################################################
> from beaker.middleware import SessionMiddleware
>
> def application(environ, start_response):
>
> response_headers = [
> ('Content-Type', 'text/html'),
> ]
>
> session = environ['beaker.session']
The above line is unaligned. It starts with two spaces only.
>
> sys.path.append("/home/rnarozniak/webapps/mod_wsgi/htdocs")
> import forms
>
> start_response('200 OK', response_headers)
>
> return['test'']
Two closing quotes.
Use a syntax coloring editor and you will catch the most common
problems. I like Komodo Edit. Not an IDE, just a powerful editor.
I didn't pay attention to anything else. Will have time later in the day.
Regards, Clodoaldo
>
> session_opts = {
> 'session.type': 'file',
> 'session.cookie_expires': 300
> }
> wsgi_app = SessionMiddleware(application, session_opts)
>
> #################################################################
>
> it is failing on the line: session=environ['breaker.session']
>
> breaker does not exist in environ, why?
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "modwsgi" 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/modwsgi?hl=en.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"modwsgi" 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/modwsgi?hl=en.