Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@freddylimpens
Copy link
Contributor

Apologies: I'v modified the indentation on this PR also, so there's a lot to sort out to see the actual modfications. Nevertheless, most of it lies in the directive isotope-on-load that whatch for thumbnail images to be loaded before applying isotope.

@freddylimpens
Copy link
Contributor Author

@glibersat : j'ai regardé pour exposer la hauteur des thumbnails du cote de l'API, et il me vient 2 options:
A) j'aurai aimer l'exposer au moment de renvoyer le thumbnail, style dans le header de la réponse que la vue thumbnail renvoie, mais ça me parait un peu compliqué d'après ce que j'ai vu.
B) autre sol: ajouter un champ thumbnail_heights dans le model de BucketFile qui serait un dictionnaire donnant la hauteur correspondant à chaque largeur. PB: il faut théoriquement passer par un objet tiers en ForeignKey, ou bien travailler avec un champ JSON sérialisé et pour ça j'ai trouvé https://github.com/bradjasper/django-jsonfield.
Je penche pour utiliser un champ JSON, vue qu'on c'est ce qu'on veut servir au final, ça me semble moins lourd que de passer par un FK, etc. T'aurais un avis ?
B)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant