<div dir="ltr">You may find `check_password_hash` from werkzeug helpful.<div><br></div><div>Just modify this code snippet a little so it pulls the hash from your config.py file: <a href="http://flask.pocoo.org/snippets/54/">http://flask.pocoo.org/snippets/54/</a><br><div><br></div><div>If you're just trying to lockdown the entire application, you can just set a password in nginx or apache. Or use nginx/apache to password protect in everything in /admin. It's a little more brittle since you're managing password security in a different piece of software, but for quick and dirty when you just need to protect a prototype before it goes live it's probably faster. </div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 22, 2015 at 8:28 AM, David Baumgold <span dir="ltr"><<a href="mailto:david@davidbaumgold.com" target="_blank">david@davidbaumgold.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">Does this help? <a href="https://github.com/maxcountryman/flask-bcrypt" target="_blank">https://github.com/maxcountryman/flask-bcrypt<br></a></div> <div></div> <div style="color:black"><br>From: <span style="color:black">itsmeshantanu</span> <a href="mailto:itsmeshantanu@hotmail.com" target="_blank"><itsmeshantanu@hotmail.com></a><br>Reply: <span style="color:black">itsmeshantanu</span> <a href="mailto:itsmeshantanu@hotmail.com" target="_blank"><itsmeshantanu@hotmail.com>></a><br>Date: <span style="color:black">July 22, 2015 at 11:27:19 AM</span><br>To: <span style="color:black"><a href="mailto:flask@python.org" target="_blank">flask@python.org</a></span> <a href="mailto:flask@python.org" target="_blank"><flask@python.org>></a><br>Subject: <span style="color:black"> [Flask] [flask][bcrypt] Help with Password hash <br></span></div><br> <blockquote type="cite"><span><div><div></div><div><div><div class="h5">







<div>Hello,</div>
<div>I am trying to using bcrypt  to hash my password for an
application. Right now i am just comparing the password in the form
directly with a string 'default' but i want to make an admin
password with hash. Where should this configuration be? I have a
config.py where csrf and secret key are located and i think this is
the file where i could keep a default password for anyone to access
the app for now. </div>
<div>I went through the documentation but i am
confused. </div>
<div><br></div>
<div><br></div>
<div><br></div>
<div><br></div>
<div><br></div>
<div>
<div style="font-size:75%;color:#575757">Sent from Samsung
mobile</div>
</div></div></div>


_______________________________________________
<br>Flask mailing list
<br><a href="mailto:Flask@python.org" target="_blank">Flask@python.org</a>
<br><a href="https://mail.python.org/mailman/listinfo/flask" target="_blank">https://mail.python.org/mailman/listinfo/flask</a>
<br></div></div></span></blockquote></div><br>_______________________________________________<br>
Flask mailing list<br>
<a href="mailto:Flask@python.org">Flask@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/flask" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/flask</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><b><br>Jeff Widman</b></div><div><a href="http://www.jeffwidman.com/" target="_blank">jeffwidman.com</a> | <a value="+15102897784" style="color:rgb(17,85,204)">740-WIDMAN-J (943-6265)</a> </div><div><><</div></div></div>
</div>