Re: Query re: pystaticfile.py

"Will Guaraldi" <[email protected]>
Newsgroups gmane.comp.web.pyblosxom.user
Message-ID <[email protected]>
On 6/9/07, Chris G <[email protected]> wrote:
> Is there any particular reason why pystaticfile.py has been restricted
> to allow only files in the static directory and not to allow files in
> sub-directories of the static directory?
>
> I.e. I have set:-
>
>     py["staticdir"] = "/var/www/htdocs/pb/info"
>
> Pyblosxom converts and displays file in /var/www/htdocs/pb/info but
> doesn't convert/display files in subdirectories of info.
>
> A very simple change to pystaticfile.py fixes this, just delete the
> two lines (around lines 201, 202) :-
>
>     if page_name.find("/") > 0:
>         page_name = page_name[page_name.rfind("/"):]
>
> Will this have any undesirable consequences?

Hrm....  It looks like I wrote it with the intention of making sure
that all static files were in the same directory.  I don't recall why
that is, though.  I'll have to think about it.

/will

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.