示例#1
0
def _content_parsed(obj):
    cache_key = obj.html_cache_key % obj.id
    html = cache.get(cache_key)
    if html is None:
        html = wiki_to_html(obj.content)
        cache.add(cache_key, html)
    return html
示例#2
0
def _content_parsed(obj):
    cache_key = obj.html_cache_key % obj.id
    html = cache.get(cache_key)
    if html is None:
        html = wiki_to_html(obj.content)
        cache.add(cache_key, html, CACHE_TIMEOUT)
    return html
示例#3
0
文件: models.py 项目: bituka/kitsune
def _content_parsed(obj, locale):
    cache_key = obj.html_cache_key % obj.id
    html = cache.get(cache_key)
    if html is None:
        html = wiki_to_html(obj.content, locale)
        cache.add(cache_key, html, CACHE_TIMEOUT)
    return html
示例#4
0
 def content_parsed(self):
     cache_key = self.html_cache_key % self.id
     html = cache.get(cache_key)
     if html is None:
         html = wiki_to_html(self.content)
         cache.add(cache_key, html)
     return html
示例#5
0
文件: models.py 项目: tantek/kuma
 def content_parsed(self):
     return wiki_to_html(self.content)
示例#6
0
 def content_parsed(self):
     return Markup(wiki_to_html(self.message))
示例#7
0
 def content_parsed(self):
     return wiki_to_html(self.content)