django-extras
django-extras contains a few useful django extensions (similar to django-extensions).
If you are on Gentoo, you are fine - simply emerge django-extras
from our overlay. Other distros/os have to
download the tarball release and add it to python's site-packages
directory.
AutoIncrementField:
The AutoIncrementField is a IntegerField, which automaticly increments on every save. This field should not be used as your primary key! Example:
class BlogPost(models.Model):
title = models.CharField(max_length=200)
revision = AutoIncrementField()
LoginRequiredMiddleware:
This middleware enforces a login on the whole django site. Add djangoextras.middleware.LoginRequiredMiddleware to your MIDDLEWARE_CLASSES in your settings.py. To exclude pages from this middleware, add a EXEMPT_URLS list to your settings.py. This middleware was not written by me (found it at stackoverflow.com).
jQuery validation filter:
Creates jQuery validation rules based on your forms instance. Supports the following rules: min, max, minlength, maxlength, email, date, url, number and digits. Usage:
$("#my-form").validate({
rules: {{form|validation_rules}}
});
The source code of this project is available via anonymous svn:
svn co https://repos.j-schmitz.net/svn/pub/django-extras/trunk/ django-extras
Releases
| 0.1 | 28.07.2011 |