Files
youdu-devops-learn/templates/user_add.html
2025-11-12 10:57:01 +08:00

18 lines
607 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>添加用户</title>
</head>
<body>
<h2>创建用户</h2>
<form action="/myapp/user/" method="post">
{% csrf_token %} <!-- 关键添加这行代码新版默认自带安全组件提交时要提交csrf的token -->
姓名: <input type="text" name="name"> <br>
城市: <input type="text" name="city"> <br>
性别: <input type="text" name="sex"> <br>
年龄: <input type="text" name="age"> <br>
<input type="submit" value="提交"> <br>
</form>
</body>
</html>