Skip to main content

django-smart-extends

https://api.travis-ci.org/goinnn/django-smart-extends.png?branch=master https://badge.fury.io/py/django-smart-extends.png https://pypip.in/d/django-smart-extends/badge.png

django-smart-extends is a Django application that allows improve the extension system of Django templates.

It is distributed under the terms of the license write in the same directory, in the file COPYING.LGPLv3

Dependencies

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

This is an example with django.contrib.admin app, but django-smart-extends works with any application, this is not only to the admin site. This is very useful if you use reusable django apps or any CMS implemented in django.

If you 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 %}

Patche

If you set TEMPLATE_DEBUG = False in settings.py you must patch the django code. You can find the patch in the patches directoy:

patch -p2 -N -d my/path/of/django/ < ./patches/patch.diff

Reported

0.7.0 (2013-10-05)

  • Move the repository to github

  • Add example project

  • Add unit tests

  • Improvements in the code (for each branch)

  • Improvements in the patches (for each branch

  • Integration with Travis

  • Details

0.6 (2012-11-07)

  • Compatible with Django 1.4 (need Django patches when DEBUG_TEMPLATE is False)

0.5.1 (2011-12-03)

  • Compatible with Django 1.2 and Django 1.3 (need Django patches when DEBUG_TEMPLATE is False)

0.5.0 (2011-01-11)

  • Initial version

Metadata

Release files for django-smart-extends 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-smart-extends 0.7.0
File Size Uploaded Provenance
django-smart-extends-0.7.0.tar.gz 7.7 kB Without provenance Details

Release files / django-smart-extends-0.7.0.tar.gz

Download URL django-smart-extends-0.7.0.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
65c0bf780432a97886e60f74880143b1a78fa0368b4c5dcdc97f744ea310f2c5
BLAKE2b-256 checksum
How to use checksums
9e839909218450f76c0bb8693a77e50c9af87a4491b8cdc0934f3ae644d5e632
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-smart-extends 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page