add post_count in profile

This commit is contained in:
alafin 2009-01-19 21:23:53 +02:00
parent b895061918
commit 075f158999
8 changed files with 18 additions and 7 deletions

View file

@ -75,6 +75,9 @@ class AddPostForm(forms.ModelForm):
markup='bbcode',
body=self.cleaned_data['body'])
post.save()
profile = get_object_or_404(Profile, user=self.user)
profile.post_count += 1
profile.save()
return post
class EssentialsProfileForm(forms.ModelForm):