-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ThreadedCommentForm - title field label doesn't get translated #22
Comments
title field label doesn't get translated Closed by 6f97065 Thanks sq9mev |
The original solution from sq9mev works for me, but the committed change does not. I am getting a "KeyError at /comments/post/ 'title' " for line 33:
rbas in issue #25 is having the same problem (https://github.com/ericflo/django-threadedcomments/issues#issue/25) and he has a fix here rbas@b3b7b3e |
I'm having the same problem as jonlesser; self.cleaned_data doesn't appear to have the key 'title'. Reopen or new issue? |
Thanks sq9mev
Solution is (forms.py):
def init(self, target_object, parent=None, data=None, initial=None):
self.base_fields.insert(
self.base_fields.keyOrder.index('comment'), 'title',
forms.CharField(
label = _('Title'),
required=False,
max_length=getattr(settings, 'COMMENTS_TITLE_MAX_LENGTH', 255)
)
)
The text was updated successfully, but these errors were encountered: