Re: Advice on distutils and distribution policies



Hi Magnus,
thanks a lot for your posting, you made me clear several things.
However, there something I still want to discuss:

Le die Mon, 21 Nov 2005 20:08:24 +0100, Magnus Lycka ha scribite:
[...]
> In an apache cgi-bin directory: The main Python CGI script(s) that are
> called by the web server. These might be scripts that are modified as a
> part of the installation process to e.g. point out data files. These
> should be short files. Import a module, set up configuration and run
> something in the imported module.

Good point!

> Under /usr/lib/python2.x/site-packages/ you keep the bulk of your
> software (as described above).
>
> HTML and CSS files that are to be handled directly by the web browser is
> placed under Apache's DOCUMENT_ROOT etc. E.g. $DOCUMENT_ROOT/eligante.

Actually, for the moment, this is just the CSS file.

> Data files that are read and processed by you own programs (i.e. not
> directly by the web server) van be anywhere under /var, e.g.
> /var/eligante.

And this is the HTML one (which is a template that is used by the python
scripts).
The number of HTML might even grow in the future, but it's extremely
unlikely they'll be ever more than 5.

I'm even thinking of including the HTML in a python file, that will save
me the trouble of storing it elsewhere.
The other files accessed by the webserver will be the CSS and eventually
some images (and the favicon). For these I'll follow your advice of
storing them under DOCUMENT_ROOT.
This variable, though, seems to be defined only in the processes spawned
by the webserver; so my guess is that I'll have to instruct the setup.py
script to ask the user where his webserver's document root is (either
interactively, or from the command line when invoking the setup script).
I guess this involves subclassing some Distutils class, does anyone have a
starter for this?
Thanks again for your help,
Alberto

--
Saluti,
Mardy
http://interlingua.altervista.org

.



Relevant Pages

  • Re: CSS switcher in Ruby?
    ... If your HTML is static and huge and your CSS small and dynamic, then creating CSS on the fly makes sense. ... However, if you have a couple static 'theme' CSS files and your HTML is already dynamic, users will save bandwidth and time if your HTML generator rewrites the tag on the fly to pre-existing, static CSS files. ... the browser can cache the CSS file (provided you also set up your web server to send caching HTTP headers). ...
    (comp.lang.ruby)
  • [NEWS] Multiple Vulnerabilities in WASD HTTP Server for OpenVMS
    ... WASD VMS Hypertext Services is a popular HTTP server for OpenVMS released ... - Read access to the whole web server configuration. ... - Getting the sources of all CGI scripts. ...
    (Securiteam)
  • Re: "modern" javascript...
    ... The same can be true for scripts in HTML. ... augmentation (which is pretty bad as support for this is specified as being ... An event registry is not of much use if adding the primary listener is not ...
    (comp.lang.javascript)
  • Re: PHP-Yes, HTML-No --- Why?
    ... Surely a dynamic web server should appear exactly the same as a static one - all files that contain HTML when viewed should be called ..html. ... If you know how, say, the PHP apache module works, you'll see that the hit is absolutely, positively minimal. ... "Andrew DeFaria" <That's also exactly why php files should have php as their extensions - because that's the way that web servers determine which pages not only need parsing, but which parsing it needs. ...
    (comp.lang.php)
  • Re: Restrict FileSystemObject to its virtual dir
    ... not scripts run by the Web Server. ... Creating an Application Pool for each application, with a unique AppPool ... If you allow users to upload and run arbitrary code on the server, ...
    (microsoft.public.inetserver.iis)