-
flaskext
had no__init__.py
after install on MWS. I had to add one. -
.wsgi
expected to contain afrom --- import app as application
Creating a Web App From Scratch Using Python Flask and MySQL
Some problems in this guide
-
Import
Flask-MySQL
withimport flaskext.mysql
-
Stored procedure in database limited entries to 20 characters! Emails can be longer, and hashed passwords much longer. I increased to 45 characters for the former; 120 characters for latter.
-
conn.close()
andcursor.close()
could happen before declaration. I wrapped inwith
statements instead. But then we have this issue, that the__enter__()
method for connections returns a cursor, so I switched this back.
On MWS I use the following .htaccess
AddHandler wsgi-script .wsgi
Options FollowSymlinks ExecCGI MultiViews Indexes
MultiviewsMatch Handlers
RewriteEngine on
RewriteBase /
RewriteRule ^(signin(/)?)$ /signin/signin.wsgi [L,QSA]
Answered questions so far: ygp2, hmb59, ap948
mysql -u root -p
Enter root password
GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost' IDENTIFIED BY 'mysuperpwd';
UPDATE mysql.user SET Password=PASSWORD('your_new_password') WHERE User='root'; ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. mysql> SET PASSWORD = PASSWORD('your_new_password');
\q
to quit
mysql -u al200 -p
Enter new user password
CREATE DATABASE tqm_register;