예제 #1
0
파일: dbs.py 프로젝트: jsy2046/Vealous
 def update(cls, data, title, slug, text):
     data.title = title
     data.slug = slug
     data.text = text
     data.html = markdown.markdown(text)
     data.put()
     keys = ['p/'+data.slug, 'p$all', 'html$page/'+data.slug]
     memcache.delete_multi(keys)
     return data
예제 #2
0
파일: dbs.py 프로젝트: jsy2046/Vealous
 def add(cls, title, slug, text):
     key = 'p/' + slug
     data = memcache.get(key)
     if data is not None:
         return data
     data = cls(title=title, slug=slug, text=text, html=markdown.markdown(text))
     data.put()
     memcache.set(key, data)
     keys = ['p$all']
     memcache.delete_multi(keys)
     return data
예제 #3
0
파일: dbs.py 프로젝트: jsy2046/Vealous
    def update(cls, data, title, slug, text, draft, keyword=''):
        data.title = title
        data.slug = slug
        data.text = text
        data.draft = draft
        data.keyword = keyword
        data.html = markdown.markdown(text)
        data.put()

        keys = ['a/'+data.slug, 'a$ten', 'a$archive', 'xml$atom', 'xml$rss', 'xml$sitemap', 'html/index', 'html/mobile']
        for tag in data.keyword.split():
            keys.append('a$keyword/' + tag)
        memcache.delete_multi(keys)
        return data
예제 #4
0
파일: dbs.py 프로젝트: jsy2046/Vealous
 def add(cls, title, slug, text, draft, keyword='nokeyword'):
     key = 'a/' + slug
     data = memcache.get(key)
     if data is not None:
         return data
     data = cls(
         title=title, slug=slug, text=text, draft=draft,
         keyword=keyword, html=markdown.markdown(text),
     )
     data.put()
     memcache.set(key, data)
     keys = ['a$ten', 'a$archive','xml$atom', 'xml$rss', 'xml$sitemap', 'html/mobile', 'html/index']
     for tag in data.keyword.split():
         keys.append('a$keyword/' + tag)
     memcache.delete_multi(keys)
     return data
예제 #5
0
def markitdown(eval_ctx, value):
    return markdown.markdown(value)
예제 #6
0
def markitdown(eval_ctx, value):
    return markdown.markdown(value)