This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

A version of {% include %} that accepts multiple template names.

Usage

Add multiple_include to INSTALLED_APPS.

Then, in your template:

{% load multiple_include %}

{% multiple_include "template1.html" "template2.html" "template2.html" with object=item %}

The templatetag will include the first existing template from the list. This allows more interesting uses as:

{% load multiple_include %}

{% with "story_"|add:object.category_slug|add:".html" as category_template %}
{% multiple_include category_template "news/story_default.html" %}
{% endwith %}

Note: For a cleaner string concatenation, you can use the capture tag shipped with Django Basic Apps:

In your settings:

INSTALLED_APPS += ('basic.tools')

Template:

{% load multiple_include capture %}

{% capture as category_template %}
    story_{{ object.category_slug}}.html
{% endcapture %}

{% multiple_include category_template "news/story_default.html" %}
Release History

Release History

0.0.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-multiple-include-0.0.1.tar.gz (6.5 kB) Copy SHA256 Checksum SHA256 Source May 13, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting