Skip to content

Instantly share code, notes, and snippets.

View narfdotpl's full-sized avatar

Maciej Konieczny aka narf narfdotpl

View GitHub Profile
@narfdotpl
narfdotpl / jc.py
Created August 15, 2011 09:58
invalidate Johnny Cache
#!/usr/bin/env python
# encoding: utf-8
"""
Invalidate Johnny Cache's cache for given models outside "normal Django"
(e.g. in a management command).
"""
from johnny.cache import invalidate
from johnny.middleware import QueryCacheMiddleware
@konradhalas
konradhalas / fabfile.py
Created April 25, 2012 18:41
fabfile - simple django app deploy
import os
from fabric.api import run, cd, env, abort
from fabric.contrib.console import confirm
from fabric.context_managers import prefix
from fabric.tasks import Task
env.hosts = ['[email protected]']
env.settings = ['staging', 'production']