On Dec 9, 8:47 pm, wmiller <[EMAIL PROTECTED]> wrote:
> Is it possible configure mod_wsgi to recognize WSGI application script
> files without explicitly declaring the application object within each
> script file?  If not, is there a elegant/crude work-around?
>
> Along the same lines, if that were possible, it would be nice to also
> assume defaults for the  return variables of the start_response
> function so it (start_response) wouldn't have to be declared
> explicitly.  Then, any changes to the defaults or to the environ
> settings could optionally be set/declared and retrieved in the script
> file:
>
> <%
> # default status = '200 OK'
> start_response('403 Forbidden', [('Content-Type', 'text/html')])
> var = "Access Denied"
> %>
> <html>
> <body>
> {var}
> </body>
> </html>
>
> The above example also assumes there would be no need to explicitly
> return content because the processed script file itself would serve as
> the return content.  Admittedly, the goal is a bit unconventional
> having the template file serve also as the wsgi application script
> file with several assumptions built-in.  The motivation if it's not
> already obvious is to return to a one file per URL application
> environment along the lines of PHP (performance and security issues
> permitting).
>
> -Walter

Graham does this mean i can post my signature again :-)

example http://code.google.com/p/appwsgi/source/browse/trunk/httpd.conf

About templates, it is not going to work like php without a framework.
But I do recommend to think for a minute and wonder do I really need
templates when there is so much stuff you can request with
javascript ? Writing python code without html in it, has so many
benefits.

There are many many big frameworks out there in many flavors that all
work with mod_wsgi and there is also http://code.google.com/appengine/
with some major restrictions but word mentioning.

Other example if you have ff3 or chrome browser, ie7 has some
javascript issues.
This does not use any frame works or templates at all, it basically
just static files with some specific tasks loaded in by java script
carried out by mod_wsgi in pure basic python code. You might look at
it as a multi threading web page :)

http://91.121.53.159/appwsgi/www/barcode/barcode.htm

http://91.121.53.159/appwsgi/www/register/register.htm (fill in
anything you want, creates new user, also push on the picture if you
have flash installed)

Anyway just examples.
source code http://code.google.com/p/appwsgi/source/browse/trunk

(sign) No more templates :-) Vote javascript (sign)

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to