Code Monkey home page Code Monkey logo

django-allmedia's Introduction

Django AllMedia

All Media for Django>=1.6.1

Images, Videos, Attachments. All of them can be related to any django model instance (thought generic foreign key). Image and Video tagging support. Image thumbnail processing.

Changelog

0.3.5

Fixes for compatibility with Django 1.8.

0.3.4

Fix in 'upload-to' configuration usage for docs.

0.3.3

Allowed 'upload-to' configuration for media and docs.

0.3.2

Calling form method save_m2m to fix bug. Implemented form class AttachmentAjaxUploadForm

0.3.1

Allow decorated model forms to have additional kwargs (besides 'commit') if overwritten.

0.3.0

Support for file validations by js and django

0.2.1

Support for on demand thumbnail generation (if indicated by settings)

0.2.0

Support for ajax file uploads

0.1.0

PENDING...

Notes

PENDING...

Usage

  1. Run python setup.py install to install.

  2. Modify your Django settings to use media:

  3. Make sure you have compiled and installed PIL with support for jpeg.

  4. Setup your thumbs generation process (optional)

    Example:

    In django settings:

    MEDIA_THUMBNAIL_SIZES = {

    'usage_1': [('51x51', 'scale'), ('392x392', 'scale'), ('60x60', 'crop'), ('74x74', 'crop'), ('64x64', 'crop')], 'usage_2': [('392x392', 'scale'), ('150x150', 'scale'), ('500x500', 'scale'), ('267x200', 'scale')],

    }

    In code: When u need to execute the thumbs generation, just call the create_thumbnails function (passing in the image_path and usage params). This may be done either in synchronous or asynchronous way (as a celery task).

  5. If you want to use (Ajax Upload and File Validations), you need to use also bootstrap file input component and jQuery.

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.