django-pictures icon indicating copy to clipboard operation
django-pictures copied to clipboard

Django 5.0.x warnings with examples from documentation

Open frlan opened this issue 7 months ago • 1 comments

When I just adopted the examples given in the README like

    logo = PictureField(
        upload_to='logo',
        blank=True,
        null=True)

I got thiese warnings:

`WARNINGS:
techtree.Item.logo: (fields.E101) width_field and height_field attributes are missing
	HINT: Please add two positive integer fields to 'techtree.Item' and add their field names as the 'width_field' and 'height_field' attribute for your picture field. Otherwise Django will not be able to cache the image aspect size causing disk IO and potential response time increases.

Inside example app I see there is some more code – but would be nice if the simplest examples in the README doesn't produce a warning ;)

frlan avatar Jul 21 '24 14:07 frlan