Flask Tutorial Web Development with Python 16 - User Registration cont'd

preview_player
Показать описание
Welcome to part 16 of our Flask web development tutorial, in this video we discuss further how to create our user registration system.

Bitcoin donations: 1GV7srgR4NJx4vrk7avCmmVQQrqmv87ty6
Рекомендации по теме
Комментарии
Автор

The original confusion over the x variable being an int and then changing it to its length attribute was the fact if you had put "SELECT count(*) FROM this would have returned you the number of rows for your where clause....

kevinhollis
Автор

If you are getting 'not all arguments converted during string is likely down to not including a trailing comma when feeding in instances of 'thwart()' to the tuple. Even if only one value is fed in (in this case 'thwart(username)') you need to use a trailing comma in the tuple that encases the 'thwart' the comma comes immediately after the parentheses of 'thwart'.
x = c.execute("SELECT * FROM users WHERE username = (%s)",
(thwart(username), ))"

downtime-pu
Автор

i can thwart the username and insert into database. but when i try to select using the same username it says there are no users. even though it is there. so it wont show that there is a matching user. please advise.

dolodestinations
Автор

I'm getting this error after trying to register a new user: "not all arguments converted during string formatting". I've tried explicitly saying username, password, email, and tracking are strings but that did not work.

Gwith
Автор

Is it a good idea to normalize data collected here? i.e. usernames all lowercase or something like that? Will the database see the strings 'UserNamE' and 'username' as the same?

johnnysim
Автор

Hi Sentdex, i am i press register, i am getting this error message "not all arguments converted during bytes formatting", Can you please help

kwamikudawoo
Автор

are you sure, that passing "%s" in insert query is a safe way to pass variables? I read somewhere that you should use question mark for passing variables, but I dont know why or what is the security risk with "%s" passing. Thanks for possible answer and keep doing, you are awesome man!

radimkeske
Автор

Hi I have been watching your videos and i Have an error in the function def register_page(): the error is 500
and it says local variable 'username' referenced before assignment I have been trying to fix this issue for past 2 days i have tryed to isolate the error and ik it some where near username = form.username.data if you could respond to this comment I would appreciate it . also I have learned alot from your videos good work.

dasherbell
Автор

please thanks a lot for your video, but Please I use Sqlite3 and how do I import escape_string, just as you did with mysql?

boggyice
Автор

Is there any reason for not thwart()ing at variable declaration, instead of twice down the line in the other code? So username = thwart(form.username.data) and be done with it there?

Emily_Entropy
Автор

any idea what is wrong with this code  sql = c.execute("SELECT * FROM users WHERE username = '%s';", [thwart(username)])  in the error its returning there is an error in your sql near 'martin'"   where martin is the username i tried to register with

mcmalach
Автор

Why you don't use ORMs (e.g. sqlalchemy or peewee)?

igors.
Автор

my bad fixed that one only to find out that there is something wrong with if int(sql) > 0:

mcmalach
Автор

For passlib it has change its hash to handler sha2_crypt to sha_256_crypt

Glatium
Автор

Would you recommend sha512, or should I stick to 256 for some reason?

Neceros
Автор

Hey guys! Is somewhere on this channel tutorial how to connect git to python files on server?

ivanvolodin
Автор

Database is not showing the entries that i post in the form fields !
How to resolve this?

divamlehri
Автор

im getting the error "not all arguments converted during string formatting"

subodharya
Автор

ERROR- when i click on register button:::not all arguments converted during string formatting

kashyapraval
Автор

how phone_no can be added in the wtforms?

rishavgupta