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
{% block body %} | |
{% block body_full_upper %}{% endblock %} | |
<div class="width-1000 body-title-outer"> | |
<div class="body-title">{% block body_title %}{% endblock %}</div> | |
{% block body_content %}{% endblock %} | |
</div> | |
{% block body_full_lower %}{% endblock %} | |
{% endblock %} | |
{% block footer %} |
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
app = angular.module 'myApp', [] | |
tweetify = (-> | |
linkToUrl = (url) -> | |
url.link url | |
linkToUser = (match, atUser, user) -> | |
atUser.link twitterUrl + "/#!/" + user | |
linkToTag = (match, hashTag, tag) -> | |
hashTag.link twitterUrl + "/search/?q=%23" + tag | |
twitterUrl = "https://twitter.com" |
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 | |
# -*- coding: utf-8 -*- | |
from datetime import datetime, timedelta | |
from django.template.defaultfilters import date, timesince | |
from django.template import Library | |
from django.utils.translation import ugettext | |
register = Library() |
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
import urlparse | |
from django import http | |
from django.conf import settings | |
from django.contrib.redirects.models import Redirect |
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
def do_sometag(parser, token): | |
""" | |
{% tagname arg1 arg2 arg3 ... with kwg1=v kwg2=v kwg3=v ... as varname %} | |
""" | |
argv = token.contents.split() | |
# get the index of 'as' or the total length of the arguments | |
a = 'as' in argv and argv.index('as') or len(argv) | |
# get the index from 'with' to 'as' or the total length of arguments |
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.core.management.base import BaseCommand, CommandError | |
from suds.client import Client | |
from optparse import make_option | |
WSDL = "https://soap.llnw.net/PurgeFiles/PurgeService.asmx?WSDL" | |
class Command(BaseCommand): | |
help = '''Purge a files from limelight\nUsage: purge_file url [url..] [-r] [-d]''' | |
option_list = BaseCommand.option_list + ( | |
make_option('-d', |
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
def update(): | |
""" | |
Cause the site to pull in the latest changes to its code and touch the | |
wsgi file so it reloads | |
""" | |
global site_path | |
with cd(site_path): | |
extra_msg = run('git pull --all') | |
reload() | |
send_convore_update(msg="Push Live", extra=extra_msg) |