Snippet List
Completely based on [snippet 2729](http://djangosnippets.org/snippets/2729/) (see that snippet for useful comments!).
The above snippet did not work for me (something with MemoryError), so I looked at the Drula source code and reimplemented...
this function invalidates a template-fragment cache bit.
say you have:
{% load cache %}
{% cache 600 user_cache user.id %}
something expensive here
{% endcache %}
maybe you want to force an update. With this function you can, just call:
invalidate_template_cache("user_cache", user.id)
- template
- cache
- invalidate
Use this abstract model if you want to add "order" to a given model. Once you do, you will get automatic "up" and "down" links for each model row.
One problem is that if the user sorts by another row, the up and down links are still there, but now don't make a lot of sense.
This class not only checks an old-style phpbb 2.x password, when the user successfully logs in, it rehashes the (correct) password in the newstyle hash and saves it. Eradicating the old, quite unsafe stored md5 password.
- authentication
- backend
- phpbb
When adding fields in the __init__ of a newform, and you don't want the fields to be added *after* the class-attribute fields, this is a possibility... This is a bad example as the email_from could just as well have been defined as a class variable!
bram has posted 7 snippets.