Source

django-imaging /

Filename Size Date modified Message
imaging
134 B
17.7 KB
1.2 KB
1.0 KB
1.1 KB

Quick start

  1. pip install -e hg+https://bitbucket.org/emacsway/django-imaging#egg=django-imaging

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

  3. Include imaging in your urls.py:

    urlpatterns = patterns('',
    (...)
    (r'^imaging/', include('imaging.urls')),
    (...)
    )
    
  4. Add ImagingField? to desired model:

    from imaging.fields import ImagingField
    
    class Somemodel(models.Model):
       photos = ImagingField()
    
  5. 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)
    
  6. Syncdb to create proper imaging tables.

Have fun :) 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. Exeptions not handled too well