Mercurial > agora-palash
comparison apps/treecomments/forms.py @ 196:134f726fd62c
Removed extrawhitespaces and moved comments template files to templates folder
author | Ahsan Ali Shahid <ahsan.ali.shahid@gmail.com> |
---|---|
date | Thu, 04 Jul 2013 15:45:50 +0500 |
parents | 50ba20441122 |
children |
comparison
equal
deleted
inserted
replaced
195:baf8776dc44d | 196:134f726fd62c |
---|---|
3 from django.contrib.comments.forms import CommentForm | 3 from django.contrib.comments.forms import CommentForm |
4 from apps.treecomments.models import TreeComments | 4 from apps.treecomments.models import TreeComments |
5 | 5 |
6 class TreeCommentsForm(CommentForm): | 6 class TreeCommentsForm(CommentForm): |
7 parent = forms.ModelChoiceField(queryset=TreeComments.objects.all(), required=False, widget=forms.HiddenInput) | 7 parent = forms.ModelChoiceField(queryset=TreeComments.objects.all(), required=False, widget=forms.HiddenInput) |
8 | |
9 def get_comment_model(self): | 8 def get_comment_model(self): |
10 return TreeComments | 9 return TreeComments |
11 | |
12 def get_comment_create_data(self): | 10 def get_comment_create_data(self): |
13 data = super(TreeCommentsForm,self).get_comment_create_data() | 11 data = super(TreeCommentsForm,self).get_comment_create_data() |
14 data['parent'] = self.cleaned_data['parent'] | 12 data['parent'] = self.cleaned_data['parent'] |
15 return data | 13 return data |