Skip to content

skip-pay/django-user-comments

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

User comments

Prologue

User comments adds model for commenting django model instances for example in the administration. It's simpler version of django-contrib-comments

Prerequisites

  • skip-django-chamber~=0.6.16.3

Installation

pip install skip-django-user-comments

Configuration

For using django-user-comments you just add add user_comments to INSTALLED_APPS setting:

INSTALLED_APPS = (
    ...
    'user_comments',
    ...
)

Django-is-core

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_fieldset

The 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%