예제 #1
0
파일: database.py 프로젝트: dcoles/ivle
    def _cache_data_xhtml(self, invalidate=False):
        # Don't regenerate an existing cache unless forced.
        if self._data_xhtml_cache is not None and not invalidate:
            return

        if self.format == u'rst':
            self._data_xhtml_cache = rst(self.data)
        else:
            self._data_xhtml_cache = None
예제 #2
0
파일: database.py 프로젝트: dcoles/ivle
    def _cache_description_xhtml(self, invalidate=False):
        # Don't regenerate an existing cache unless forced.
        if self._description_xhtml_cache is not None and not invalidate:
            return

        if self.description:
            self._description_xhtml_cache = rst(self.description)
        else:
            self._description_xhtml_cache = None