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

django-tagconstants

Define constants in your settings file, that are then made available in your templates.

Installation

From the command line:

pip install django-tagconstants

Add tagconstants to your installed apps:

INSTALLED_APPS = (
    ...
    'tagconstants',
    ...
)

Create a TAG_CONSTANTS dictionary in your settings.py file:

TAG_CONSTANTS = {}

Usage

For security purposes, tagconstants is designed so that you create a whitelist of variables to make available in your templates. For more information see the Design and Security section.

To use a constant in your templates, first add the constant to your TAG_CONSTANTS setting:

TAG_CONSTANTS = {
    'CONSTANT': 'SOME STRING',
}

Then in your templates, you can recall these constants with the {% constant ... %} template tag:

{% load tagconstants %}

{% constant "CONSTANT" %}
    {# renders to 'SOME STRING' #}

{% constant "CONSTANT" as "variable_name" %}
    {# loads the template variable variable_name="SOME STRING" #}
    {# into the template context #}

Contributing

Pull, fork, do whatever you’d like with the code.

Release History

Release History

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-tagconstants-0.1.zip (9.4 kB) Copy SHA256 Checksum SHA256 Source Mar 20, 2015

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