~mmcg069/+junk/sqz

« back to all changes in this revision

Viewing changes to mexicanjellyfish/templatetags/mexicanjellyfish_filters.py

  • Committer: Matthew McGowan
  • Date: 2013-09-17 10:04:56 UTC
  • Revision ID: matthew.joseph.mcgowan@gmail.com-20130917100456-ecfg4vxsd953owdy
improve browseser loading behaviour.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
register = template.Library()
3
3
 
4
4
@register.filter
 
5
def add(val, arg):
 
6
    return val + arg
 
7
 
 
8
@register.filter
5
9
def center(val, arg):
6
10
    return "%ipx" % int((float(arg)-int(val))/2)