Django Model With Dynamic Attributes
I'm totally, completely new to programming, so please forgive what is probably a stupid question, but I've been beating my head on this for the past couple of days. I have two mod
Solution 1:
You want to override the __init__
method like you did with the save method, and call self.get_thumbs()
before you call super(Photo, self).init(*args, **kwargs)
Alternately, you could look at other peoples solution to this problem sorl.thumbnail, django-imagekit, or easy-thumbnails (which is sort of like a combination of the two)
Post a Comment for "Django Model With Dynamic Attributes"