[color]
diff = auto
status = auto
branch = auto
[user]
name = Your Name
class CachedCountCloneProxy(object): | |
''' This allows us to monkey-patch count() on QuerySets so we can cache it and speed things up. | |
._clone is called so we have to monkey-patch that first... | |
''' | |
def __init__(self, queryset): | |
self._queryset = queryset | |
self._queryset._clone_original = self._queryset._clone | |
def __call__(self): |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import urllib2 | |
gh_url = 'https://api.github.com' | |
req = urllib2.Request(gh_url) | |
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm() |
""" | |
Author: Jeff Triplett | |
Based off: https://code.djangoproject.com/wiki/PaginatorTag | |
Thanks to Brent O'Connor for pointing it out. | |
""" | |
from django import template | |
register = template.Library() |
This guide is has moved to https://epicserve-docs.readthedocs.org/en/latest/django/ubuntu-server-django-guide.html.
#!/usr/bin/env python | |
from checkpid import pidcheck | |
from time import sleep | |
import logging | |
log = logging.getLogger("checkpid") | |
log.setLevel(logging.INFO) | |
log.setLevel(logging.DEBUG) | |
ch = logging.StreamHandler() |
$ ./pip.sh outdated | |
Fabric (1.4.3 != 1.5.1) | |
gunicorn (0.17.0 != 0.17.2) | |
$ ./pip.sh install -U gunicorn | |
Downloading/unpacking gunicorn==0.17.2 | |
Using download cache from /Users/jefftriplett/.pip/download_cache/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fg%2Fgunicorn%2Fgunicorn-0.17.2.tar.gz | |
Running setup.py egg_info for package gunicorn | |
Installing collected packages: gunicorn |