django-smart-extends 0.6

Application to improve the inheritance of templates

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!

What's new in django-smart-extends 0.6:

  • Compatible with Django 1.4 (need Django patches when DEBUG_TEMPLATE is False)
Read full changelog
send us
an update
LICENSE TYPE:
LGPL v3 (GNU Lesser General Public Lic... 
USER RATING:
UNRATED
  0.0/5
DEVELOPED BY:
Yaco Sistemas
HOMEPAGE:
code.google.com
CATEGORY:
ROOT \ Internet \ Django Plugins
django-smart-extends is a Django app useful when you want to overwrite a template of a application in your project. Currently this in Django produce infinite recursion.

How to install

In your settings.py

 INSTALLED_APPS = (
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.admin',

 ...

 'smartextends',

 )


and if you want:

OVERWRITE_EXTENDS = True

How to use

This application is useful when you want to overwrite a template of a application in your project. Currently this in Django produce infinite recursion

If you don't set OVERWRITE_EXTENDS = True

file:admin/change_list.html

{% extends "admin/change_list.html" %}

{% block extrastyle %}
 {{ block.super }}
 < link rel="stylesheet" type="text/css" href="XXX" / >
{% endblock %}


Else:

file:admin/change_list.html

{% smart_extends "admin/change_list.html" %}

{% block extrastyle %}
 {{ block.super }}
 < link rel="stylesheet" type="text/css" href="XXX" / >
{% endblock %}


Patches

If you set TEMPLATE_DEBUG = True in settings.py you must patch django code. You can find the patch in the patches directoy. There are one patch for Django 1.1.X version, other for Django 1.2 and other for Django 1.3.

Last updated on December 6th, 2011

requirements

#templates inheritance #Django templates #Django #templates #inheritance #extender

Add your review!

SUBMIT