Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install django-gizmo

How to install django-gizmo

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install django-gizmo
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.0.2
0.0.4Never BuiltWhy not?
0.0.3 Failed View build log
0.0.2 Available View build log
0.0.1 Available View build log
Windows (64-bit)
0.0.2
0.0.4Never BuiltWhy not?
0.0.3 Failed View build log
0.0.2 Available View build log
0.0.1 Available View build log
Mac OS X (10.5+)
0.0.2
0.0.4Never BuiltWhy not?
0.0.3 Failed View build log
0.0.2 Available View build log
0.0.1 Available View build log
Linux (32-bit)
0.0.2
0.0.4Never BuiltWhy not?
0.0.3 Failed View build log
0.0.2 Available View build log
0.0.1 Available View build log
Linux (64-bit)
0.0.4 Available View build log
0.0.3 Failed View build log
0.0.2 Available View build log
0.0.1 Available View build log
 
License
BSD
Dependencies
Depended by
Lastest release
version 0.0.4 on Jan 9th, 2014

Django Gizmo

Django app allowing for configurable targetting of template inclusion tags.

Installation
  1. Add gizmo to your INSTALLED APPS setting.

  2. Add ROOT_GIZMOCONF value to your projects settings file. This specifies the module in which your configured your gizmos, i.e.:

    System Message: WARNING/2 (<string>, line 12)

    Literal block expected; none found.

ROOT_GIZMOCONF = 'project.gizmos'

In this case we have a module called project containing a gizmos.py file.

  1. Create your gizmos config (in this cased named gizmos.py) file in the form:

    System Message: WARNING/2 (<string>, line 18)

    Literal block expected; none found.

gizmos = ( ('<loader name>', '<tag name>', '<slot name>', [['<url_name'>, ]]), )

With:

  • <loader name> being the name you would normally pass to Django's load tag, i.e. myapp_inclusion_tags for {% load myapp_inclusion_tags %}.
  • <tag name> being the name of the tag you want to include, i.e. advert for {% advert %}.
  • <slot name> being the name of the slot you want the tag to show up in, i.e. home.
  • <url_name> optional being the names of the urls you want the tag to show up in, i.e. home.
Usage

Gizmos are stock standard Django inclusion tags. The only diffirence is that instead of specifying tags within a template you specify tags from a distance by using a gizmo conf file in conjunction with the gizmos tag.

For example, lets say we have an advert tag specified in myapp's inclusion tags which we only want to call in the gizmo slot named advert for the url named home:

  1. Create your tags as normal.

  2. Create your gizmos config file in the form:

    System Message: WARNING/2 (<string>, line 40)

    Literal block expected; none found.

gizmos = ( ('myapp_inclusion_tag', 'advert', 'advert', ['home', ]), )

  1. In your template for the home view load the gizmo inclusion tags and include a gizmos tag with a slot name of advert:

    System Message: WARNING/2 (<string>, line 46)

    Literal block expected; none found.

{% load gizmo_inclusion_tags %}

...some html...

{% gizmos 'home_advert' %}

...some more html...

Authors

Praekelt Foundation
  • Shaun Sephton
  • Jonathan Bydendyk

Changelog

0.0.4
  1. Fix manifest file.
0.0.3
  1. Bring packaging up to standard.

Subscribe to package updates

Last updated Jan 9th, 2014

Download Stats

Last month:2

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.