This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
from os.path import abspath, dirname, join | |
from django.core.management import execute_manager | |
try: | |
from settings import active as settings | |
except ImportError: | |
sys.stderr.write("Error: Can't find the module 'active' in the directory containing %r. \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django import template | |
from django.template.defaultfilters import stringfilter | |
register = template.Library() | |
@register.filter(name='prepend') | |
@stringfilter | |
def prepend(value, arg): | |
""" | |
Prepends value with arg if value exists, else returns '' |
NewerOlder