Code Monkey home page Code Monkey logo

django-imaging's Introduction

django-imaging v 1.0

Ajax driven gallery field for django admin

[Screenshot] 1

After 2 years of slumber brought to life again

Requirements

  • Django >= 1.2
  • Django Imagekit >= 1.0.0
  • Python PIL

Installation

  • Install imaging using easy_install or pip
    pip install django-imaging
  • Put the contents of the media folder in your project's MEDIA_ROOT. Make sure the imaging_photos folder has 777 permissions.

  • Add "imaging" to your INSTALLED_APPS tuple in settings.py

  • Include imaging in your urls.py

urlpatterns = patterns('',
(...)
(r'^imaging/', include('imaging.urls')),
(...)
)

Or include('myappname.imaging.urls')

  • Add ImagingField to desired model
from imaging.fields import ImagingField

class Somemodel(models.Model):
    photos = ImagingField()
  • Optionally add a related model field for easy image fetching
from django.contrib.contenttypes import generic
from imaging.fields import ImagingField
from imaging.models import Image

class Somemodel(models.Model):
   photos = ImagingField()
   photos_set = generic.GenericRelation(Image)
  • Optionally add a custom imaging config to your settings.py
IMAGING_SETTINGS = {
    'image_dir' : 'funny_photos',
}

The images uploaded will be stored inside MEDIA_ROOT/funny_photos.

  • Syncdb to create proper imaging tables.

Limitations

  1. Currently only one ImagingField? per model.
  2. Drag'n'drop doesn't work properly in Opera (jquery.ui.sortable related problem)
  3. No orphaned images management
  4. ManyToMany? relation with an Image not supported
  5. Need to add a GenericRelation? field manually, I can't figoure out how to autoadd it
  6. Exceptions not handled too well

django-imaging's People

Contributors

pielgrzym avatar robotdisco avatar linux2400 avatar

Watchers

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