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
;(function($){ | |
ListFilterCollapsePrototype = { | |
bindToggle: function(){ | |
var that = this; | |
this.$filterEl.click(function(){ | |
that.$filterList.slideToggle(); | |
}); | |
}, | |
init: function(filterEl) { | |
this.$filterEl = $(filterEl).css('cursor', 'pointer'); |
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
"""Utilities for managing database sessions.""" | |
from __future__ import with_statement | |
import contextlib | |
import functools | |
@contextlib.contextmanager | |
def temp_session(session_cls, **kwargs): | |
"""Quick and dirty context manager that provides a temporary Session object | |
to the nested block. The session is always closed at the end of the block. |
NewerOlder