Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/305.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/90.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
修改了python django中带有图标的select_Python_Html_Css_Django - Fatal编程技术网

修改了python django中带有图标的select

修改了python django中带有图标的select,python,html,css,django,Python,Html,Css,Django,关于PythonDjango模板,我有一个问题,我不知道如何做。 有谁能帮我调整一下{{poll_form.category}}的css,这是选项列表和{{poll_form.rating_option}选项列表。我想将和图标放在选项的顶部,例如在facebook中: 当我点击微笑图标时,我的{{poll_form.category}会有一个下拉选项 以下是当前我的表单的外观: 哦。有人有任何关于这方面的想法或教程,请帮助或给我的链接 先谢谢你 这是我在home.html中的表单:

关于PythonDjango模板,我有一个问题,我不知道如何做。 有谁能帮我调整一下{{poll_form.category}}的css,这是选项列表和{{poll_form.rating_option}选项列表。我想将和图标放在选项的顶部,例如在facebook中:

当我点击微笑图标时,我的{{poll_form.category}会有一个下拉选项

以下是当前我的表单的外观:

哦。有人有任何关于这方面的想法或教程,请帮助或给我的链接

先谢谢你

这是我在home.html中的表单:

               <div class="panel panel-default">
                <div class="panel-body" >
                    {% for error in poll_form.non_field_errors %}
                    <div class="alert alert-danger alert-dismissable">
                        {{ error }}
                    </div>
                    {% endfor %}
                    {% for field in poll_form %}
                    {% if field.errors %}
                    <div class="alert alert-danger alert-dismissable">
                        {{ field.label }} : {{ field.errors }}
                    </div>
                    {% endif %}
                    {% endfor %}

                    <form role="form" action="{% url 'home' %}" name="poll" method="post" enctype="multipart/form-data">
                    {% csrf_token %}
                    <div class="row">
                        <div class="col-sm-4">
                            <p>
                                <label>Poll Category</label>
                                {{ poll_form.category }}
                            </p>
                        </div>
                        <div class="col-sm-10">
                            <div class="tab-pane active" id="tab-en">
                                <p>{{ poll_form.question_en }}</p>
                            </div>
                        </div>
                        <div class="col-sm-4 col-xs-6">
                            <p>
                                <label>Rating Options</label>
                                {{ poll_form.rating_option }}
                            </p>
                        </div>
                        <div class="col-sm-4 col-xs-6">
                            <p>
                                <label>Poll Privacy</label>
                                {{ poll_form.privacy }}
                            </p>
                        </div>
                        <div class="col-sm-4 col-xs-6">
                            <p>
                                <label>Image</label>
                                {{ poll_form.image }}
                            </p>
                        </div>
                        <div class="col-sm-4 col-xs-6">
                            <p>
                                <br />
                                <button type="submit" class="btn btn-danger btn-sm " name="poll">Launch and Share</button>
                            </p>
                        </div>
                    </div>
                    </form>
                    </div>
                </div>

            </div>