- Registered: 2011-09-16
- Posts: 4
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:
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)