User comments adds model for commenting django model instances for example in the administration. It's simpler version of django-contrib-comments
- django-chamber~=0.4.6
pip install django-user-commentsFor using django-user-comments you just add add user_comments to INSTALLED_APPS setting:
INSTALLED_APPS = (
...
'user_comments',
...
)You can use user comments with django-is-core framework:
from is_core.main import UIRESTModelISCore
from user_comments.contrib.is_core.cores import CommentISCoreMixin
class UserCore(CommentISCoreMixin, DjangoUiRestCore):
model = User
form_fieldsets = (
(None, {
'fields': 'username', 'first_name', 'last_name'
})
) + CommentCoreMixin.notes_form_fieldsetThe CommentISCoreMixin only sets form_class attribute and contains notes_form_fieldset setting.
If you need change form of the core. You must extend from user_comments.contrib.is_core.cores.CommentUIForm
from user_comments.contrib.is_core.cores import CommentUiForm
e
class UserForm(CommentUiForm):
...
class UserCore(CommentCoreMixin, DjangoUiRestCore):
model = User
form_class = UserForm
form_fieldsets = (
(None, {
'fields': 'username', 'first_name', 'last_name'
})
) + CommentCoreMixin.notes_form_fieldset