パスワードを入力してログインできるようにしたいんですがどうすればいいですか?
下のコードでは入力画面までは表示されるのですが、肝心のパスワードをどこに書けばいいのかわからないので、入れません。どこにどう書けばいいですか?
パスワードは「open」とする予定です。
html
1<!DOCTYPE html> 2 3<html> 4 5 6 7<head> 8 9<meta charset='utf-8'/> 10 11<meta name='viewport' content='width=device-width, initial-scale=1'/> 12 13<title>moderator login | simplechan</title> 14 15<style type='text/css'> 16 17body { font-family : arial,helvetica,sans-serif; color:rgb(30,30,30); font-size:14px; background-color:rgb(240,240,240); } 18 19#main {text-align:center;} 20 21#footer {font-size:10px; text-align:center; padding : 40px 20px;} 22 23</style> 24 25</head> 26 27 28 29<body> 30 31<div id='main'> 32 33<form action='/mod_login/' method='post'> 34 35<label><strong>Password</strong></label> 36 37<input type='password' name='password' required> 38 39<button type='submit'>Login</button> 40 41</form> 42 43</div> 44 45 46 47<div id='footer'> 48 49Those who are not moderators, go away! This is a secret area for moderators only. 50 51</div> 52 53</body> 54 55</html>
https://github.com/blobmon/simplechan
上のサイトのmod_loginというのをしたいのですが、どこにパスワードを追記すればいいのかわかりません。
あるとすれば、simplechan/sql/functions_moderator.sqlやsimplechan/app/app/handler_mod.py やsimplechan/app/app/templates/mod_login.html に書いてあると思って、みたのですがどこにもそういったのはかかれていませんでした。
あと、psqlで
psql
1simplech_db=# select * from moderator_list; 2 username | password_md5 | session_id | expire_ts | actions_per_hour 3----------+--------------+------------+-----------+------------------ 4(0 rows) 5
とうって、userがなかったので、こちらをつくったほうがいいんでしょうか?
回答1件
あなたの回答
tips
プレビュー