Re: ImageField always calling update_dimensions_fields

2016-12-04 Thread ggilley
What I see is that when I load my page, it calls update_dimension_fields for every image. The model is simple. class Photo(models.Model): width = models.PositiveIntegerField(blank=True, null=True, editable=False, default="0") height = models.PositiveIntegerField(blank=True, null=True, e

ImageField always calling update_dimensions_fields

2016-12-03 Thread ggilley
I needed to get to the width and height of an image. After discovering that doing so on an ImageField loads the file, I added width_field and height_field to my model. I did a migration and starting using the new model. However, it *always* seems to call update_dimension_fields every time the

Format of arrays in multipart forms?

2016-08-26 Thread ggilley
I'm trying to create an iOS app that can post multipart forms to Django. (JSON is trivial, wish it worked with file uploads. :-) What is the proper format for the HTTP request when passing arrays of values? (Strings is all I care about at the moment) I think PHP has the follow style. What is th