pip install -e hg+https://bitbucket.org/emacsway/django-imaging#egg=django-imaging
Add "imaging" to your INSTALLED_APPS tuple in settings.py
Include imaging in your urls.py:
urlpatterns = patterns('', (...) (r'^imaging/', include('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)
Syncdb to create proper imaging tables.
Have fun :) Limitations
- Currently only one ImagingField? per model.
- Drag'n'drop doesn't work properly in Opera (jquery.ui.sortable related problem)
- No orphaned images management
- ManyToMany? relation with an Image not supported
- Need to add a GenericRelation? field manually, I can't figoure out how to autoadd it
- Exeptions not handled too well