Mercurial > public > sg101
diff news/views.py @ 997:19b86e684cc2
WIP on news v2.0.
Initial model changes and submit news functions.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 17 Nov 2015 21:01:20 -0600 |
parents | 79a71b9d0a2a |
children | e2c3d7ecfa30 |
line wrap: on
line diff
--- a/news/views.py Sun Nov 15 20:44:27 2015 -0600 +++ b/news/views.py Tue Nov 17 21:01:20 2015 -0600 @@ -142,11 +142,7 @@ if request.method == "POST": add_form = AddNewsForm(request.POST) if add_form.is_valid(): - pending_story = add_form.save(commit=False) - pending_story.submitter = request.user - pending_story.short_text = _clean_html(pending_story.short_text) - pending_story.long_text = _clean_html(pending_story.long_text) - pending_story.save() + add_form.save(request.user) return HttpResponseRedirect(reverse('news.views.submit_thanks')) else: add_form = AddNewsForm()