mscerts.net
 
Adaptive Technologies
Adobe AIR Apps
Artistic Software
Communications
Database
Desktop Environment
Documentation
Education
Games
Home Automation
Information Management
Internet
Multimedia
Office
Printing
Programming
Religion
Science
Science and Engineering
Security
System
Terminals
Text Editing&Processing
Utilities
 
 
myGengo 1.2.0
corejet.jira 1.0 Alpha 1
jsoncmd 0.0
correct_pycountry 0.12.2
Monsters 1.0
corejet.core 1.0 Alpha 1
Scope::Container::DBI 0.04
DBIx::DataModel 1.27
Word Golf 0.2.1
Plack::Middleware::LogWarn 0.001002
 
 
 

django-classy-tags 0.1.3

Class based template tags for Django

django-classy-tags's goal is to create a new way of writing Django template tags which is fully compatible with the current Django templating infrastructure. This new way should be easy, clean and require as little boilerplate code as possible while still staying as powerful as possible.

For the impatient

This is how a tag looks like using django-classy-tags:

from classytags.core import Tag, Options
from classytags.arguments import Argument
from django import template

register = template.Library()

class Hello(Tag):
 options = Options(
 Argument('name', required=False, default='world'),
 'as',
 Argument('varname', required=False, no_resolve=True)
 )

 def render_tag(self, context, name, varname):
 output = 'hello %s' % name
 if varname:
 context[varname] = output
 return ''
 return output

register.tag(Hello)


That's your standard hello world example. Which can be used like this:

 * {% hello %}: Outputs hello world
 * {% hello "classytags" %}: Outputs hello classytags
 * {% hello as myvar %}: Outputs nothing but stores hello world into the template variable myvar.
 * {% hello "my friend" as othervar %}: Outputs nothing but stores hello my friend into the template variable othervar.

Here are some key features of "django-classy-tags":

· Class based template tags.
· Template tag argument parser.
· Declarative way to define arguments.
· Supports (theoretically infinite) parse-until blocks.
· Extensible!

Requirements:

· Python
· Django

  Other
-   pastables 0.0
-   More Snooze 1.0.4
-   EHTip 2.4.0
-   Send and receive all mail from all accounts 0.1
-   Turkmen spell checker 0.01
-   Lingala spell checker 0.02
-   Tag Dialog 1.0.5
-   OpenOTH r2
-   crawlzilla 0.2
-   dae 0.1
-   django-push 0.3
-   django-mediagenerator 0.1
-   feedgenerator 1.2.1
-   pelican 1.1.1
-   waskr 0.0.8
-   NoseDjango 0.8.1
-   django-url-methods 0.1.0
-   zope2instance 1.0
-   django-improved-inlines 1.0.0
-   django-versions 1.0.1
 
 
                mscerts.net