Skip to content

Instantly share code, notes, and snippets.

View cklein's full-sized avatar

Christian Klein cklein

  • Hamburg, Germany
View GitHub Profile
def get_unique_object(model, pk, handlers=None):
"""Get object or call exception handler"""
def call_handler(exception):
"""Get handler for exception"""
name = exception.__class__.__name__
if name in handlers:
fnc, args, kwargs = handlers[name]
fnc(*args, **kwargs)
# encoding: utf-8
"""
Django template loader for loading templates from a CouchDB.
Created on 2010-03-06 by Christian Klein.
(c) 2010 Christian Klein. All rights reserved.
"""
from urlparse import urljoin
#!/usr/bin/env python
"""
Django Handler for Virtual Environments
Created by Christian Klein on 2010-03-10.
(c) 2010 HUDORA GmbH. All rights reserved.
"""
import os