Mercurial > public > sg101
diff gpp/forums/forms.py @ 469:3b30286adba5
Smarter search index updating for forums. This work is for #227.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 17 Aug 2011 01:02:08 +0000 |
parents | 2ff5f4c1476d |
children | bbbc357ac5f3 |
line wrap: on
line diff
--- a/gpp/forums/forms.py Sun Aug 07 03:38:42 2011 +0000 +++ b/gpp/forums/forms.py Wed Aug 17 01:02:08 2011 +0000 @@ -1,5 +1,6 @@ """ Forms for the forums application. + """ from django import forms from django.conf import settings @@ -9,6 +10,7 @@ from forums.models import Post from forums.attachments import AttachmentProcessor import forums.permissions as perms +from forums.signals import notify_new_topic, notify_new_post class NewPostForm(forms.Form): @@ -55,6 +57,7 @@ user_ip=ip) post.save() self.attach_proc.save_attachments(post) + notify_new_post(post) return post @@ -131,6 +134,9 @@ self.attach_proc.save_attachments(post) + notify_new_topic(topic) + notify_new_post(post) + return topic