django-表单之手动渲染(五)

2020-08-26 10:50:30 浏览数 (1)

代码语言:javascript复制
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{{title}}</title>
    <style>
        .custom-textinput{
            border: 5px solid blue;
            border-radius: 5px;
        }
    </style>
    <link rel="stylesheet" href={% static 'css/index.css' %}

</head>
<body>
    <!--{% include 'header.html'%}-->
    <div class="content">
        <!--<h1>这是主界面</h1>-->
        <form action="" method="post">
            <table>
                <!--as_p,as_ul-->
                <!--{{forms.as_table}}-->
                <hr>
                <ul>
                    <li style="list-style-type: none">
                        <span style="color: blue">{{forms.username.label}} : </span>
                        <span>{{forms.username}}</span>
                        <span style="margin-left: 10px">{{forms.username.help_text}}</span>
                    </li>
                </ul>
                <hr>
                <tr>
                    <td><input type="submit" value="submit" name="submit"></td>
                </tr>
            </table>
        </form>
        <!--{% block content %}-->
        <!--{% endblock %}-->
    </div>
    <!--{% include 'footer.html'%}-->
</body>
</html>

0 人点赞