Re: comments enhancements

Steven Armstrong <[email protected]>
Newsgroups gmane.comp.web.pyblosxom.devel
Message-ID <[email protected]>
Bill Mill wrote:
> Aww man, I was totally gonna do that. It was gonna be a neat little
> PIL hack. Good stuff, you beat me to it. It looks exactly like I was
> going to make it look. One question: how does it work with cgi? Does
> it? Do you embed its value in a form?
> 
> I had a thought that, if you wanted to embed the number in a form, you
> could do it and still be succesful. How? Simply by having a secret
> multiplier stored in config.py. Before sticking the number in the
> form, you'd multiply it by the number in config.py (which should be
> world-inaccessible), and when you decode it, simply divide it by that
> number. I thought that would be another neat little hack.
> 
> Good stuff.
> 
> Peace
> Bill Mill
> bill.mill at gmail.com
> 

Credits for the PIL stuff goes to Jesus Roncero Franco <jesus at 
roncero.org>,
http://notreally.org/blog/devel/Python/pybloxsomnospam

To have it work with CGI you'll have to make a few changes:

nospam.py: ----------
comment out the 'WSGI version' and uncomment the 'CGI version'.
Use the source luke, you will see what I mean.

session.py: ----------
Have a look at the Session._setCookie method.
Comment out the 2. and 3. line, and uncomment the commented part.

That should be all. Haven't tested this though.

cheers
Steven


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
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.