def build_post(self,form,user): # print 'after validate' # print 'Logged in as %s' % user u = UserDT() u.first_name = user u.last_name = "b" u.email = user + "@here.com" p = Post() p.title = form.title.data p.body = form.content.data p.creator = u print ' post - post build ' return p
def build_thread(self,form,user): print 'after validate' # print 'Logged in as %s' % user u = UserDT() u.first_name = user u.last_name = "b" u.email = user + "@here.com" p = Post() p.title = "thread description" p.body = form.content.data p.creator = u print ' post - post build ' pe = PostArrayEl() pe.key="1" pe.post=p t = Thread() t.title = form.name.data t.creator = u t.posts.append(pe) print ' thread - post build ' t.postcnt=1 return t