Giter Club home page Giter Club logo

ratheeshspiral09 / django_image_moderator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sibim024/django-image-moderator

0.0 2.0 0.0 36 KB

Django Imagemoderator is used to moderate images uploaded from any model. It recognizes image fields from any model and provides a provision to approve / reject them from the django-admin backend. It also provides an API to view approved images. Rejected images will not be rendered in the API.

Python 100.00%

django_image_moderator's Introduction

Django Imagemoderator

Django Imagemoderator is used to moderate images uploaded from any model. It recognizes image fields from any model and provides a provision to approve / reject them from the django-admin backend. It also provides an API to view approved images. Rejected images will not be rendered in the API.

Requirements

django_imagemoderator requires the following:

Python 2.7
Django 1.8+

Installation

Install package dependency:

$ sudo apt-get install libjpeg-dev
$ sudo apt-get install libjpeg8-dev
$ pip install sorl-thumbnail
$ pip install Pillow

Add 'sorl.thumbnail', 'image_moderator' to your INSTALLED_APPS settings file:

INSTALLED_APPS = (
    ...
    'sorl.thumbnail',
    'image_moderator',
)

Add middleware class to MIDDLEWARE_CLASSES setting:

MIDDLEWARE_CLASSES = [
    ...
    'image_moderator.middleware.ImageModeratorMiddleware',
]

Add the following urlpattern to your root urls.py file:

urlpatterns = [
    ...
    url(r'^image_moderator/', include('image_moderator.urls'))
]

Example

In your App's models.py, specify image field as ImageModeratorField() instead of models.ImageField():

from image_moderator.models import ImageModeratorField

class MyModel(models.Model):
    image = ImageModeratorField(upload_to="assets/", blank=True, null=True)

Now you can call the image API:

django_image_moderator's People

Contributors

sibim024 avatar

Watchers

James Cloos avatar Ratheesh kumar R 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.