class PagemodeDict(dict):
    def __init__(self, *args, **kw):
        super(PagemodeDict, self).__init__(*args, **kw)
        self._constraint()

    def __setitem__(self, key, value):
        super(PagemodeDict, self).__setitem__(key, value)
        self._constraint()

    def setdefault(self, key, value):
        value = super(PagemodeDict, self).setdefault(key, value)
        self._constraint()
        return value

    def _constraint(self):
        sset = super(PagemodeDict, self).__setitem__
        ssetdef = super(PagemodeDict, self).setdefault
        if ssetdef('manage', False) == True:
            sset('custom_html_header', False)
» continue reading
Posted by yungyuc at 12:22, 0 comment, 0 trackback.
Change to page (10 entries in each page): 1
© hover year to navigate month: powered by django