質問するログイン新規登録

質問編集履歴

1

htmlの追加

2021/10/13 09:09

投稿

art35
art35

スコア13

title CHANGED
File without changes
body CHANGED
@@ -122,4 +122,49 @@
122
122
  )
123
123
  ---以下、省略---
124
124
 
125
+ ```
126
+ ```
127
+ template
128
+
129
+ signup.html
130
+
131
+ <body class= "text-center">
132
+ <main class="form-signin">
133
+ <form class="form-signin" method="POST">{% csrf_token %}
134
+ {{ error }}
135
+ <h1 class="h3 mb-3 fw-normal">Please sign in</h1>
136
+ <!-- comment out<label for="inputEmail" class="visually-hidden">Email address</label> -->
137
+ <input type="text" id="inputEmail" class="form-control" placeholder="username" name='username' required autofocus>
138
+ <label for="inputPassword" class="visually-hidden">Password</label>
139
+ <input type="password" id="inputPassword" class="form-control" placeholder="Password" name='password' required autofocus>
140
+ <button class="w-100 btn btn-lg btn-primary" type="submit">Sign in</button>
141
+ <p class="mt-5 mb-3 text-muted">&copy; 2017-2021</p>
142
+ <p><a href="{% url 'login' %}">login</a></p>
143
+ </form>
144
+ </main>
145
+ </body>
146
+ ```
147
+ ```
148
+ login.html
149
+
150
+ <body class="text-center">
151
+ <div class="container">
152
+ <form method="POST">{% csrf_token %}<form>
153
+ <h1 class="h3 mb-3 fw-normal">Please login</h1>
154
+ {{ error }}
155
+
156
+ <div class="form-floating" style="width:25%; margin:auto;" >
157
+ <input type="text" class="form-control" id="floatingInput" placeholder="Username" name='username'>
158
+ <label for="floatingInput">username</label>
159
+ </div>
160
+ <div class="form-floating" style="width:25%; margin:auto;">
161
+
162
+ <input type="password" class="form-control" id="floatingPassword" placeholder="Password" name='password'>
163
+ <label for="floatingPassword">Password</label>
164
+ </div>
165
+ <button class="btn btn-lg btn-success" type="submit" style="width:20%">login</button>
166
+ <p class="mt-5 mb-3 text-muted">&copy; 2017-2021</p>
167
+ </form>
168
+ </div>
169
+ </body>
125
170
  ```