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 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) |
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
# 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 |
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 | |
""" | |
Django Handler for Virtual Environments | |
Created by Christian Klein on 2010-03-10. | |
(c) 2010 HUDORA GmbH. All rights reserved. | |
""" | |
import os |
NewerOlder