diff gpp/forums/forms.py @ 108:80ab249d1adc

Forums: quoting existing posts.
author Brian Neal <bgneal@gmail.com>
date Sat, 26 Sep 2009 03:55:50 +0000
parents cb72577785df
children c329bfaed4a7
line wrap: on
line diff
--- a/gpp/forums/forms.py	Tue Sep 22 03:36:39 2009 +0000
+++ b/gpp/forums/forms.py	Sat Sep 26 03:55:50 2009 +0000
@@ -8,15 +8,6 @@
 from forums.models import Post
 
 
-def bump_post_count(user):
-    """
-    Increments the forum_post_count for the given user.
-    """
-    profile = user.get_profile()
-    profile.forum_post_count += 1
-    profile.save()
-
-
 class NewPostForm(forms.Form):
     """Form for creating a new post."""
     body = forms.CharField(label='', widget=forms.Textarea)
@@ -45,7 +36,6 @@
         post = Post(topic=self.topic, user=user, body=self.cleaned_data['body'],
                 user_ip=ip)
         post.save()
-        bump_post_count(user)
         return post
 
 
@@ -96,14 +86,12 @@
                 body=self.cleaned_data['body'],
                 user_ip=ip)
         post.save()
-
-        bump_post_count(self.user)
         return topic
 
 
 class PostForm(forms.ModelForm):
     """
-    Form for editing an existing post.
+    Form for editing an existing post or a new, non-quick post.
     """
     body = forms.CharField(label='', widget=forms.Textarea)