Skip to content

Instantly share code, notes, and snippets.

View zacharysarah's full-sized avatar

Sarah Corleissen zacharysarah

View GitHub Profile
@mattrobenolt
mattrobenolt / gist.py
Created July 27, 2011 16:28
Django templatetag for embedding GitHub gists
from django.template import Library, Node, TemplateSyntaxError, Variable, VariableDoesNotExist
from django.core.cache import cache
from django.utils.hashcompat import md5_constructor
import urllib2
register = Library()
class GistNode(Node):
def __init__(self, gist_id, filename=None, *args):