Esempio n. 1
0
def newComic(handler):
    nextc=ComicForm(handler.request.POST).save(commit=False)
    
    nextc.text=nextc.text.replace('\n', '<br />')
    
    lastc=comic.Comic.get(handler.request.get('comickey'))
    
    nextc.last=lastc
    nextc.put()
    
    return nextc
Esempio n. 2
0
def editComic(handler):
    edited=ComicForm(handler.request.POST).save(commit=False)
    
    edited.text=edited.text.replace('\n', '<br />')
    
    thisc=comic.Comic.get(handler.request.get('comickey'))
    
    thisc.name=edited.name
    thisc.text=edited.text
    thisc.tip=edited.tip
    
    thisc.put()
    
    return thisc