0

I am using Django ImageKit And I have absolutely no idea how to go about implementing a user uploaded image for a profile the user will have. I have it here list in my models. All attempts I have worked out have failed. Can any please guide me to steps on how to go about this? Thank you in advance!

Models.py

from imagekit.models import ProcessedImageField
from imagekit.processors import ResizeToFill

class Account(models.Model):

    user = models.OneToOneField(AUTH_USER_MODEL, related_name="account", verbose_name=_("user"))
    real_name = models.CharField(max_length=50,blank=True)
    birthday = models.DateField(null=True, blank=True)
    city = models.CharField(max_length=50, blank=True)
    state = models.CharField(max_length=2,blank=True)
    image_thumbnail = ProcessedImageField(upload_to='img/user_images/main',
                                           processors=[ResizeToFill(100, 50)],
                                           format='JPEG',
                                           null=True, 
                                           blank=True,
                                           options={'quality': 60})
Amechi
  • 742
  • 3
  • 11
  • 32
  • I am sure you have read this: https://github.com/matthewwithanm/django-imagekit/blob/develop/README.rst. Just make sure you are not missing any steps. It is quite comprehensive. – karthikr Mar 25 '14 at 03:11
  • Can you be more specific about the problem you're having and what you've tried? Your model looks fine at first glance. Is it just that you're unsure how to tie a form to it? – matthewwithanm Mar 25 '14 at 11:44

0 Answers0