在django avatar中,我想使用template标签添加一个自定义CSS类,但它不起作用。你知道吗
我的模板:
{% load avatar_tags %}
<li>
<span class="userhome">
{% avatar user 50 class="mmb-img" id="user_avatar" %}
Welcome : {{ user.username }}
</span>
</li>
呈现的HTML是:
<li>
<span class="userhome">
<img src="https://www.gravatar.com/avatar/4bbcb352e5bdbe63fe8f9a5786ea9d69/?s=50" alt="cpoudevigne" width="50" height="50">
Welcome : cpoudevigne
</span>
</li>
自定义类不会出现。有什么问题?你知道吗
这可能是因为应用程序caches the output of those template tags:
更改
AVATAR_CACHE_ENABLED
设置或清除缓存。你知道吗同样的问题,无法设置^{cl1}$也不知道发生了什么,所以暂时只能通过JavaScript/JQuery进行设置。你知道吗
JQuery查询:
相关问题 更多 >
编程相关推荐