[SPAM] Re: [mod_python] How declared correctly the way in the pg.html to the apache server can resolv the script python correctl

Graham Dumpleton graham.dumpleton at gmail.com
Wed Nov 21 04:35:39 EST 2007

Depends. Main file for publisher stuff needs to be in directory
exposed by Apache. Thus, whether you split top level functions across
multiple files makes no difference as still in exposed directory.

What people often do to limit risk, especially if stuff like database
logins and passwords in files, is to put the bulk of code in totally
distinct Python modules located outside of the exposed directory and
found via import by directory listed in sys.path. Ie., main publisher
file would then just have:

  from import myapplication.main index

That way if Apache configuration is screwed up, only part of your code
that someone may inadvertently see is that one line, which isn't
particularly useful to them.


On 21/11/2007, EdgardCosta <edgardalvescosta at gmail.com> wrote:
> Graham,
> Thanks and Sorry. I send yesterday two messages. One of then isn't
> complete. My sun push the enter and send the message.
> Only one question. If we can build a complete site in one file with the
> mod_pyhton, the security is better or not?
> --
> EdgardCosta <edgardalvescosta at gmail.com>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python

More information about the Mod_python mailing list