pytition / Pytition

Django app for self-hosted privacy-friendly online petitions
https://pytition.org
BSD 3-Clause "New" or "Revised" License
100 stars 28 forks source link

Can users add a photo to appear in the image box of their petition instead of the pencil and pad? #249

Closed mukberty closed 4 years ago

mukberty commented 4 years ago

I wished to know if users can add a photo to appear in the image box of their petition instead of the pencil and pad? If yes, how? I felt doing so would make the site more attractive and petitions stand out. Thanks.

fallen commented 4 years ago

You can upload a picture by going in the edit page of your petition, then go to "Social Network" tab, the "Twitter image" will be used on social networks when posting the petition link, it will also be used as a replacement for the pencil/pad picture on the petition site :) I know this is not very well designed, the whole edit/creation page will need to be entirely rewritten to show a better and understandable design to better explain what is the purpose of each field.

fallen commented 4 years ago

An example of a Pytition instance using such pictures: https://petition.antipub.org

mukberty commented 4 years ago

Thanks a lot. i) What part of the code deals with this? ii) What about changing the objective/aim (500 by default)?

Thanks again :)

fallen commented 4 years ago

i) You mean, the code that deals with the picture upload? Or the code that deals with exposing the HTML OpenGraph tags? ii) Changing the objective is possible, in the petition edit page, first tab. Or maybe that was not your question?

mukberty commented 4 years ago

i) Yes, the code that deals with the picture uploads. ii) Thanks. Again, not so intuitive. :)

fallen commented 4 years ago

HTML+js code is there: https://github.com/pytition/Pytition/blob/master/pytition/petition/templates/petition/edit_petition.html#L46 Python part is in the handling of the form: https://github.com/pytition/Pytition/blob/master/pytition/petition/views.py#L1215

fallen commented 4 years ago

Do you have more questions or do we close this ticket? :)