Login

Snippets by ronnie

Snippet List

Active link

I needed a way to find if a menu items should be active. After searching the internet i found a few options*, but none of them did fit my needs, so i wrote my own: Usage: <a href="{% url 'view-name' %}" class="{% current request 'view-name' %}"></a> * http://gnuvince.wordpress.com/2008/03/19/the-new-and-improved-active-tag/ * http://stackoverflow.com/questions/340888/navigation-in-django

  • template
  • path
  • active
  • link
  • current
Read More

HTML5 filter for XXS

Usefull for TinyMCE, to allow some HTML but be vunarable by XXS attacks You need to install html5lib sudo easy_install html5lib

  • template
  • filter
  • security
  • sanitize
  • xss
Read More

ronnie has posted 2 snippets.