I'm not looking to add inline styles to the comment field in my comment form. I'm looking for a way to add the placeholder attribute to my field. What's the proper way to do this?
I was searching for a way to add/modify the widgets for the get_comment_create_data method.
This is how my current form looks:
# forms.py
...
class PostComment(CommentForm):
"""
A lighter comment form.
"""
def get_comment_create_data(self):
"""
This needs to be overwritten to remove the fields from the class
"""
return dict(
content_type = ContentType.objects.get_for_model(self.target_object),
object_pk = force_unicode(self.target_object._get_pk_val()),
comment = self.cleaned_data['comment'],
submit_date = datetime.datetime.now(),
site_id = settings.SITE_ID,
is_public = True,
is_removed = False,
)
...