KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am displaying a list of images. If the user has uploaded an image, I want to keep its opacity 0.5 and in the list of images, the images uploaded by others should have full opacity. I have done it as follows, is there a better way to do it?? {% if request.user == obj.shared_by %} <div class="item-image" style="opacity:0.5;filter:alpha(opacity=50);"> {% else %} <div class="item-image"> {% endif %} ......Some code here.... </div> Thanks!
Tags (comma-separated)
Save Edits
Cancel