Changes between Initial Version and Version 1 of Ticket #28712, comment 7


Ignore:
Timestamp:
Oct 25, 2017, 10:45:57 AM (7 years ago)
Author:
Stephen Swatman

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28712, comment 7

    initial v1  
    11Replying to [comment:6 Tim Graham]:
    22> I still don't find the example in the documentation particularly compelling. Instead of adding CSS classes for that case, I would use CSS [value=x] selectors.
    3 The particular case that inspired me to create this issue is that I had a model and I wanted to create a choice widget for that model. I wanted each option to be styled such that it had a background image served from a different server such that I needed to construct an attribute of the form `style="background-image: url(https://somewhere.com/images/[id].png)"` where the ID was the model's ID. The problem was solved by extending the `Select` class and overriding the `create_option()` method. However, I feel it would have been more easily solved had the pull request I created been in place.
     3The particular case that inspired me to create this issue is that I had a model and I wanted to create a choice widget for that model. I wanted each option to be styled such that it had a background image served from a different server such that I needed to construct an attribute of the form `style="background-image: url(https://somewhere.com/images/[id].png)"` where the ID was the object's ID. The problem was solved by extending the `Select` class and overriding the `create_option()` method. However, I feel it would have been more easily solved had the pull request I created been in place.
    44
    55Still, I absolutely understand if you think this is too niche. Thus, if I haven't convinced you please feel free to close the issue!
Back to Top