2
ファイルアップロードボタンを表示できません。 は、私は、私は〜profile.htmlは、その一部を示さなかった、ファイルアップロードボタンを表示できません
<form action="{% url 'accounts:upload_save' %}" method="POST" enctype="multipart/form-data">.
のようなマルチパート/フォームデータタグを書いた。しかし
{% extends "registration/accounts/base.html" %}
{% block content %}
user.username: {{ user.username }}<hr>
user.is_staff: {{ user.is_staff }}<hr>
user.is_active: {{ user.is_active }}<hr>
user.last_login: {{ user.last_login }}<hr>
user.date_joined: {{ user.date_joined }}
{% endblock %}
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>UPLOAD</title>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
{% block body %}
<div class="container">
<form action="{% url 'accounts:upload_save' %}" method="POST" enctype="multipart/form-data">
<input type="file" name="files[]" multiple>
<input type="hidden" value="{{ p_id }}" name="p_id">
{% csrf_token %}
<input type="submit">
</form>
</div>
{% endblock %}
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
</body>
</html>
ようprofile.htmlに書いています。
{%extends "registration/accounts/base.html"%} 〜{%endblock%}のみが表示されています。
どうすれば修正できますか?
あなたは上下関係をどういう意味ですか?プラス良いことはbase.htmlも表示することです –
@RajeshYogeshwar thx、ur comments.I私のコード情報を追加しました。 – lili