Exemplo n.º 1
0
    def form_valid(self, form):
        title = form.cleaned_data['title']
        body = form.cleaned_data['body']

        article = ArticleModel.create(title, body, self.request.user)
        self.key = article.put()

        return super(AddArticleView, self).form_valid(form)