Flask dev series vid 14 mysqldb / pymysql

by: kingfitz, 10 years ago

Last edited: 10 years ago





You must be logged in to post. Please login or register an account.



WOW fixed my issue, after over a week of frustration - godamnit.  With python3 I had to use a relative import, otherwise it wouldnt work:  YAY!

from .dbconnect import connection

-kingfitz 10 years ago
Last edited 9 years ago

You must be logged in to post. Please login or register an account.


Yep, will be a different module, but should work ALMOST the same. Fundamentally, connections, inserts.....etc, all that remains the same.

-Harrison 10 years ago

You must be logged in to post. Please login or register an account.




-kingfitz 10 years ago
Last edited 10 years ago

You must be logged in to post. Please login or register an account.

It sounds to me like you're hitting your else statement. username isn't admin or attempted password isnt "password."

Did the flashes produce what you expected?

What about in the exception? That may also be getting hit. You are passing an error in both cases, but I am not sure if you are actually producing the errors on page or not. One of the render templates is being hit, either based logically, or because of an error you have.

-Harrison 10 years ago

You must be logged in to post. Please login or register an account.


Ok I fixed the redirect issue, I just had to import redirect after url_for, NICE.

-kingfitz 10 years ago
Last edited 10 years ago

You must be logged in to post. Please login or register an account.