Login

Snippets by dogada

Snippet List

Mathematical Captcha

Simple mathematical captcha where human is asked to solve a simple mathematical calculation like 2+3=?. Don't require database access or external libraries like PIL. To use MathCaptchaForm subclass it and add your fields. For example of usage and discussion about security of this captcha comparing with traditional image captcha please see my blog entry [Improved Mathematical Captcha](http://www.mysoftparade.com/blog/improved-mathematical-captcha/)

  • captcha
Read More

Table of Contents

Simple template filter that extracts from a text ids, replaces '_' with spaces and produces hyperlinked Table of Contents. More info and usage example please see at [http://www.mysoftparade.com/blog/autogenerated-toc/](http://www.mysoftparade.com/blog/autogenerated-toc/)

  • toc
  • table-of-contents
Read More

Django profiler

The script that can be used to profile any Django-powered web-site and find how many SQL-queries are used per page, how heavy html-pages are, etc. To use the the script it's enough to put django-profile.py somewhere in PYTHONPATH and call it from the directory that holds projects' settings.py. For more info and examples please see: [www.mysoftparade.com/blog/django-profile-sql-performance/](http://www.mysoftparade.com/blog/django-profile-sql-performance/)

  • sql
  • profile
  • performance
Read More

dogada has posted 3 snippets.