8 web design add-ons for Django

In the last year, I’ve defined a quite stable fundation for my django projects. In this post I’m enumerating template design components that saved my day by reducing development time while keeping code readable, concise and standard-compliant.

1. Blueprint CSS framework

While not a django-specific add-on, Blueprint CSS framework is a perfect companion for django template designers: it features cross-browser style reset, a 24-column grid layout, a nice looking typography and a print-friendly style.

2. django-uni-form

django-uni-form implements UniForm CSS framework in Django: you can render your forms as stylish xhtml-compliant divs using a simple template tag filter and add form layout information to your Form classes.

3. django-compress

Optimization of CSS and Javascript distribution can greatly improve web client rendering times: django-compress outputs concatenated and minified files and handles smart client-side caching.

4. django-userskins

Using django-userskins you can enable user-selected themes in your application.

5. django-tabs

For your navigation bar, you can use django-tabs to highlight active tab (possibly with multiple navigation layers), by combining Django template extension mechanism and a special template tag.

6. django-reversetag

Default url tag is quite primitive, but using reverse tag introduce by django-reversetag, you can resolve urls from variables and string literals, which is very useful if your view or named view is computed at run-time.

7. macros template tags

Django macros template tags help you apply DRY criterias in your templates, while maintaining separation between presentation and logic. Download macros.py and save it into your app’s templatetags folder.

8. smart_if template tags

smart_if template tag add-on replaces default if/else/endif tags with a custom version that allows basic yet useful value comparisons. Download smart_if.py and save it into your app’s templatetags folder.

Tip: original smart_if doesn’t support elif syntax. You can find amended version here.

Related posts:

  1. Django dynamic template paths
  2. Integrate Wordpress and Django
  3. Integrate Tornado in Django
Add to StumbleUpon Add to del.icio.us Add to Mixx!     
blog comments powered by Disqus