jdriscoll / django-imagekit

Automates image processing for Django models. Resize, process and cache multiple versions of your image files. Access newly created files with a standard API. Supports alternate storage schemes such as Amazon S3.

Clone this repository (size: 135.6 KB): HTTPS / SSH
$ hg clone http://hg.driscolldev.com/django-imagekit
follow

#21 Delete does not remove specs

Reported by Anonymous, created 8 months ago, last edited unknown.

Delete does not remove specs...

Status: invalid Responsible: nobody Type: bug
Milestone: none Component: none Version: none

Attachments

No attachments added for this issue yet.

Comments and changes

#1

Justin Driscoll / jdriscoll

→ Changed status from new to invalid.

If you mean the additional images generated and saved according to your specs, than yes, yes it does actually. If you have a specific case where this is not working properly you can open a new issue describing the issue in better detail.


#2 Anonymous

written 4 months ago, last edited unknown.

I have the same issue

#models.py

class Image(ImageModel):
    title = models.CharField(_(u"Titel"), max_length=100)
    original = models.ImageField(_(u"Bilddatei"), upload_to='user/images')
    num_views = models.PositiveIntegerField(editable=False, default=0)
    

    class IKOptions:
        spec_module = 'mysite.media.specs'
        cache_dir = 'user/images/cache'
        image_field = 'original'
        save_count_as = 'num_views'
        admin_thumbnail_spec = 'thumbnail_image'

#specs.py


class ResizeThumb(processors.Resize): 
  width = 100 
  height = 75 
  crop = True


class ResizeDisplay(processors.Resize):
  width = 600 


class EnchanceThumb(processors.Adjustment): 
  contrast = 1.2 
  sharpness = 1.1 


class Thumbnail(ImageSpec): 
  access_as = 'thumbnail_image' 
  pre_cache = True
  processors = [ResizeThumb, EnchanceThumb] 


class Display(ImageSpec):
  increment_count = True
  processors = [ResizeDisplay]

#settings.py

MEDIA_ROOT = 'static/'
MEDIA_URL = '/static/'
ADMIN_MEDIA_PREFIX = '/static/admin/'

Add comment / attachment

Show/hide preview

Verification: Please write the text from the image in the box (letters only)

captcha

Is that you, Humanoid? Is this me?