Re: Adding crop and rotate to django image upload

2018-12-11 Thread 2012 . us
Thanks for the reply Mark! We are looking for a programmer who can do this for us... On Wednesday, October 24, 2018 at 5:33:02 PM UTC-6, mark wrote: > > You could look at this project for ideas on how to accomplish your crop > and rotate actions - https://github.com/matthewwithanm/django-imageki

Re: Adding crop and rotate to django image upload

2018-10-24 Thread Mark Phillips
You could look at this project for ideas on how to accomplish your crop and rotate actions - https://github.com/matthewwithanm/django-imagekit However, if you want the user to manually crop and rotate the image on your site while looking at a Django view, then you will have to use some Javascript

Adding crop and rotate to django image upload

2018-10-24 Thread 2012 . us
Hello, I confess that I have no experience with django. I have a project where the django app was written by developers and I want to add a few things to a form that uploads an image. The image currently uploads but the user cannot rotate and crop the image to their liking. The site is using

Re: Django image upload not saving

2014-06-26 Thread Darren Spruell
On Thu, Jun 26, 2014 at 10:58 AM, Bobby Gulshan wrote: > No errors when hitting upload. But the image doesn't appear where I have > indicated it ought to. Put an absolute path in MEDIA_ROOT and referenced the > same in (upload_to) param ImageField. Not sure what I am missing. > > Model: > > cl

Re: Django image upload not saving

2014-06-26 Thread Mario Gudelj
I always follow a similar pattern for media uploads and it works, so here it is: in settings.py PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'media') in your model: file = models.ImageField(upload_to='wiki') say you upl

Django image upload not saving

2014-06-26 Thread Bobby Gulshan
No errors when hitting upload. But the image doesn't appear where I have indicated it ought to. Put an absolute path in MEDIA_ROOT and referenced the same in (upload_to) param ImageField. Not sure what I am missing. Model: class FileUploadHandler(models.Model): title = models.CharF

Re: Django image upload

2011-10-06 Thread Ian
So should I put it in a try/catch block to verify it's an image? Also, how do I go about saving it as a different name (as the ID of the model, for example)? On Oct 6, 7:26 pm, Kurtis Mullins wrote: > ImageField uses PIL (Python Imaging Library) to verify if it's a valid > image, if I understand

Re: Django image upload

2011-10-06 Thread Ian
So should I put it in a try/catch block to verify it's an image? Also, how do I go about saving it as a different name (as the ID of the model, for example)? On Oct 6, 7:26 pm, Kurtis Mullins wrote: > ImageField uses PIL (Python Imaging Library) to verify if it's a valid > image, if I understand

Re: Django image upload

2011-10-06 Thread Kurtis Mullins
ImageField uses PIL (Python Imaging Library) to verify if it's a valid image, if I understand it correctly. On Thu, Oct 6, 2011 at 6:21 PM, Ian wrote: > Ah! Got it working! How do I make sure the files are only images? Is > there a way to check the extension? Also, how would I rename the > fil

Re: Django image upload

2011-10-06 Thread Ian
Ah! Got it working! How do I make sure the files are only images? Is there a way to check the extension? Also, how would I rename the file? Thanks! On Oct 6, 3:46 pm, bazaarsoft wrote: > Noticed a couple of typos in my reply: > > > I have "MEDIA_ROOT = '/Users/storefiles/' in my settings.py fo

Re: Django image upload

2011-10-06 Thread bazaarsoft
Noticed a couple of typos in my reply: > I have "MEDIA_ROOT = '/Users/storefiles/' in my settings.py folder, file, not folder > and the upload_to param in my model set to 'pluginFiles/%Y/%m/%H/%M/'. is actually 'pluginFiles/%Y/%m/%d/%H/%M/' jay On Oct 6, 2:41 pm, bazaarsoft wrote: > > Also,

Re: Django image upload

2011-10-06 Thread bazaarsoft
> Also, I'm confused whether upload_to should be set in settings.py or > models.py It's actually a mix - if you have MEDIA_ROOT defined in settings.py, then it will use that as the first part of the path. Then, what you pass in the upload_to field will be appended to that. So, in my case, I have "

Re: Django image upload

2011-10-06 Thread Ian
I can't seem to get it working. It won't let my sync the database with this code: image = ImageField(upload_to=None[, max_length=100, **options]) Also, I'm confused whether upload_to should be set in settings.py or models.py Thanks! On Oct 6, 6:11 am, BILLION Sébastien wrote: > Hi, > > http://

Re: Django image upload

2011-10-06 Thread BILLION Sébastien
Hi, http://www.nitinh.com/2009/02/django-example-filefield-and-imagefield/ It the same for ImageField BILLION Sébastien the Answer to the ultimate question of life, the universe and everything is 42 http://www.sebastienbillion.com/ Le 06/10/2011 05:22, Ia

Django image upload

2011-10-05 Thread Ian
Hey Everyone, I'm new to django, but I love it so far! I'm trying to figure out how to upload an image (restrict it to images only) and resave it as a different name. Eventually, I'll want to upload it to S3, but for now, I'm just testing it on my computer with runserver (so I'm not sure where it