Code Monkey home page Code Monkey logo

django-admin-comments's Introduction

Django Admin Comments

image1 image2 image3 image4

A reusable Django application that adds simple admin-panel comments to any model, allowing Django Administrators to communicate on certain objects more easily.

image5

Quickstart

  • Install Django Admin Comments:

    $ pip install django-admin-comments
    
  • Add it to your INSTALLED_APPS:

    INSTALLED_APPS = (
        ...
        'admin_comments',
        ...
    )
  • Run database migrations

    $ manage.py migrate
  • Now, simply add the CommentInline to any ModelAdmin

    from admin_comments.admin import CommentInline
    
    class MyModelAdmin(admin.ModelAdmin):
        model = MyModel
        inlines = [CommentInline,]

Settings

  • ADMIN_COMMENTS_SHOW_EMPTY: Should the comment forms display an empty form field by default? (Default: False)

    Example:

    ADMIN_COMMENTS_SHOW_EMPTY = True
  • ADMIN_COMMENTS_FORM_CLASS: Override the default class used for the comment form. (Default: "admin_comments.forms.CommentInlineForm")

    Example:

    ADMIN_COMMENTS_FORM_CLASS = "myapp.forms.MyCustomCommentForm"
  • ADMIN_COMMENTS_FORMSET_CLASS: Override the default class used for the comment formset. (Default: "admin_comments.forms.CommentInlineFormset")

    Example:

    ADMIN_COMMENTS_FORMSET_CLASS = "myapp.forms.MyCustomCommentFormSet"

Features

  • Generic comment model to add comments to any object
  • Simple configuration without the overhead of the Django Comments Framework
  • Overridable Form and Formset classes

Support

Python

  • 2.7
  • 3.4
  • 3.5
  • 3.6

Django

  • 1.8
  • 1.9
  • 1.10
  • 1.11
  • 2.0

Running Tests

Does the code actually work?

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install -r requirements_dev.txt
(myenv) $ pip install -r requirements_test.txt
(myenv) $ tox

Credits

Original inspiration from Dryice Liu's answer on the following post:

https://stackoverflow.com/a/30338979/3768332

Tools used in rendering this package:

django-admin-comments's People

Contributors

haard avatar jamiecounsell avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.