Ajax driven gallery field for django admin
After 2 years of slumber brought to life again
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')
from imaging.fields import ImagingField
class Somemodel(models.Model):
photos = ImagingField()
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)
IMAGING_SETTINGS = {
'image_dir' : 'funny_photos',
}
The images uploaded will be stored inside MEDIA_ROOT/funny_photos.