By default, in the change list page, the 'Add Object' button is in right side. Is it possible to move it to the left side? Do I need to do any change in the following lines in change_list.html?
{% block object-tools %}
{% 开发者_开发知识库if has_add_permission %}
<ul class="object-tools">
<li>
<a href="add/{% if is_popup %}?_popup=1{% endif %}" class="addlink">
{% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %}
</a>
</li>
</ul>
{% endif %}
{% endblock %}
{% block content %}
<div id="content-main">
<style type="text/css">
/* Moving the ADD buttons to the left side using CSS */
.object-tools {
font-size: 10px;
font-weight: bold;
font-family: Arial,Helvetica,sans-serif;
padding-left: 0;
float: left;
position: relative;
margin-top: 0.5em;
margin-bottom: -2em;
}
</style>
{% block object-tools %}
{% if has_add_permission %}
<ul class="object-tools">
<li>
<a href="add/{% if is_popup %}?_popup=1{% endif %}" class="addlink">
{% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %}
</a>
</li>
</ul>
{% endif %}
{% endblock %}
<br> <br>
精彩评论