You are not logged in.

#1 2011-09-18 3:04 am

benjaoming
Member
Registered: 2011-09-16
Posts: 4

Django middleware

After having created a pretty useless python script for maintaining an Apache mod_access policy, I decided it would be more fruitful to create a Django middleware:

http://overtag.dk/wordpress/projects/st … iddleware/

It is configurable, but by default it works by checking if request.method == "POST" and then seeing if the URL is in the list of URLs to be checked. It can also work by only checking that the URL is in a list of URLs to be checked.

Furthermore, since it uses state-of-the-art Django models, the user may insert more manual IPs manually in the admin site and mark them as "permanent" so that they won't be deleted upon updating the database. A log is also kept so the site administrator may have insights in the number of spammers caught.

The user is responsible for creating a cronjob that updates the database. It is recommended to do this every 24 hours. This is done by executing manage.py sfsupdate

Hope you like it!

Last edited by benjaoming (2011-09-18 3:05 am)

Offline

Board footer

Powered by FluxBB

Close
Close