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 1 year 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

Hi @frlan 👋

Thanks for reaching out. That is an excellent point, the "tutorial" (of sorts) should be exemplary. Would you care to extend the documentation yourself?

Cheers! Joe

codingjoe avatar Jul 22 '24 10:07 codingjoe

Closed due to inactivity.

codingjoe avatar Dec 14 '24 16:12 codingjoe