Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Image incorrectly added to property #28

Open
tristanlatr opened this issue Sep 28, 2020 · 13 comments
Open

Image incorrectly added to property #28

tristanlatr opened this issue Sep 28, 2020 · 13 comments
Labels
enhancement New feature or request high priority Directly linked with the collective workflow to-discuss Further clarification is needed

Comments

@tristanlatr
Copy link
Collaborator

From tiagovaz/saskatoon#127

Are there certain image file constraints to follow? If yes, this should be clear to the user.

Saskatoon property #196 has an invalid image for instance.

@tristanlatr tristanlatr added enhancement New feature or request question labels Sep 28, 2020
@2ynn
Copy link
Collaborator

2ynn commented May 25, 2021

What is the state of this? I don't see any field to add image(s) in the PropertyForm: http://localhost:8000/property/create

Regarding the image file constraints I think we could use a clean method to get cleaned_data = super(PropertyImageForm, self).clean() from PropertyImageForm and then resize / convert the image to a specific size / format using PIL

E.g. https://stackoverflow.com/questions/15519716/how-can-i-resize-an-image-file-uploaded-with-django-using-an-imagefield-model

Note: I added a HarvestImageInline in admin (same as PropertyImageInline): see 5ecc0ef

@tristanlatr
Copy link
Collaborator Author

Hi Qynn,

The older version of saskatoon allows images to be uploaded, most probably, the images are still somewhere in database.
On the Property view, there was a button "Add image" button:
by default 2021-05-25 at 5 43 11 PM

This is the link to the property with an invalid image: https://saskatoon.lesfruitsdefendus.org/harvest/property/196 .

If you don't have an account, I'll create one for you, just tell me.

So I guess this feature still needs to be implemented in this version :D

@2ynn
Copy link
Collaborator

2ynn commented May 25, 2021

@tristanlatr Ok thanks! yea I've seen there were images in the database through the admin panel (using .sql dump from saskatoon-prod)

No I don't have an account yet on https://saskatoon.lesfruitsdefendus.org, I'd appreciate if you could create one, thanks!

@tiagovaz
Copy link
Member

tiagovaz commented May 26, 2021

Hi, the backend supports images for properties. I didn't code the frontend for that in the new system because [cof cof] no property image has even been uploaded as far as I can tell :-) So I just removed it from my priority list. It'd be nice to have it back at some point though.

@tristanlatr
Copy link
Collaborator Author

I think there is a couple of properties that have images. But true that it's really not common.

We've been telling the PL to upload the pictures of theirs picks though!

@tristanlatr tristanlatr added high priority Directly linked with the collective workflow good first issue Good for newcomers labels Mar 30, 2022
@khabdrick
Copy link
Contributor

@tristanlatr
I'd like to work on this. Is there something I'll need to complete this?

@tristanlatr
Copy link
Collaborator Author

I think that first of all, we should include the images in the new property view and add a button to add a image.
I don't think these exists at the moment.
After we'll look at image removing and ensuring that they fit the screen.

@khabdrick
Copy link
Contributor

khabdrick commented Apr 8, 2022

when you said this " include the images in the new property view", do you mean the preview of the images selected when creating a new property?
or do you just mean I should add the button then display it in the property view details?
@tristanlatr

@tristanlatr
Copy link
Collaborator Author

Hi @khabdrick, this issue affects the older version of Saskatoon, since the property photo is simply not a part of the view for now, the first step would be to work on that. Then, work on #20.

when you said this " include the images in the new property view", do you mean the preview of the images selected when creating a new property?

Not really, I mean showing images in the property page view, no thumbnail previews for now.

or do you just mean I should add the button then display it in the property view details?

No, no buttons heres, only the pictures with a carousel when there are more than one.

by default 2022-04-08 at 12 13 27 PM

@khabdrick
Copy link
Contributor

Ohh okay, I'll do this

@khabdrick
Copy link
Contributor

@tristanlatr please I have an issue here. I could not at least retrieve the images saved, I don't know why.
I have completed all the required settings to display media files, but it's not working, can you help?
2022-04-10_12-56_1
2022-04-10_12-56
2022-04-10_12-55
I used about.html just so I can view the images

@khabdrick
Copy link
Contributor

Never mind, I figured it out.

@tristanlatr tristanlatr removed the good first issue Good for newcomers label Apr 15, 2022
@tolusolaadeyemi
Copy link

@tristanlatr, I see that this issue is connected with #208 and #20, I have been able to add an 'Add Image Button' as well as create a view for it, my current dilemma moving forward is whether to find a way to integrate this with the PropertyUpdateView or leave it as a separate view. I have added screenshots below. Thanks very much
Screen Shot 2022-04-19 at 10 31 32 PM (2)
Screen Shot 2022-04-19 at 10 31 57 PM (2)

.

@2ynn 2ynn added to-discuss Further clarification is needed and removed question labels Mar 12, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request high priority Directly linked with the collective workflow to-discuss Further clarification is needed
Projects
None yet
Development

No branches or pull requests

5 participants