Questions tagged [register]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
27 views

CS50 Finance Register

I was able to figure out the POST and /register, but I am confused on how to use INSERT a new user into users. Any help would be appreciated. Thank you. From application.py @app.route("/...
0
votes
2answers
34 views

Finance Register Checking for Duplicate Username Not Working

I've looked at lots of other questions with people who have code for register, and my SQL code is exactly the same as most of them, but when I register, it lets multiple people have the same username. ...
0
votes
1answer
34 views

CS50 Finance Internal Server Error RuntimeError: near “' '”: syntax error

I'm working on the register section of application.py. When I've typed in the username and password and hit register, I get an internal server error. I'm assuming that pbkdf2:sha256:150000$uJ2F7qcX$...
0
votes
1answer
33 views

Finance: Ensuring no duplicate usernames

I've implemented the following code in my "/register" route: def register(): """Register user""" if request.method == "GET": return render_template("register.html") else: #...
0
votes
1answer
104 views

Problem Set 8 / Web Track - Finance (RuntimeError: UNIQUE constraint failed)

y'all. My register function seems to work just fine when inputting new and different usernames. However, when I tested it for the 403 error (ie the one which checks if there is an already existing ...
0
votes
0answers
18 views

Register showing username is not defined and outputting INTERNAL SERVER ERROR

def register(): """Register user""" session.clear() if request.method == "POST": passhash = generate_password_hash(request.form.get("password")) if not request.form.get("username"): ...
0
votes
0answers
307 views

cs50 finance register function

Could someone please explain how the script code works in register.html if a username is already taken in the database? Basically, if the username exists, i don't want to pass the 'apology' function, ...
0
votes
1answer
159 views

flask register, issue with importing cs50 module

Im trying to run a flask app locally with also using the cs50 module but i keep getting an error: NoAppException: While importing "application", an ImportError was raised: Traceback (most recent ...
0
votes
0answers
88 views

failure at recreating register Flask --> NoAppException: Could not import “application”

Im trying to recreate the register app on my locally, however it seems the my application does not get pass importing the modules ? This is my application code: from cs50 import SQL from flask ...
0
votes
1answer
47 views

Finance check50: /register & /check return “expected status code 200, but got 400”

My Finance program works, python and javascript both, however, I continue to receive errors when running check50. This seems to be related to my registration function. After looking at various ...
0
votes
0answers
174 views

FINANCE [UNIQUE constraint failed: users.username] Error encountered using check50

I have finally got my entire program working for PSET8 Finance. I receive no errors in my dev console and all functions are working correctly after registering 15 users. For some reason, though I get ...
0
votes
1answer
111 views

Finance pset, register will not insert user data

I've completed register page html, and it works as expected. However, it won't insert the data from the user into the database. There are no errors. I can't seem to find how to debug python/flask ...
0
votes
1answer
72 views

PSet 8, Finance, cannot submit or reset button on register

I keep getting TypeError: document.getElementById(…).submit is not a function when i try and use document.getElementById("mysubmit").submit(); I've searched a lot and the biggest reason is that ...
0
votes
1answer
57 views

Finance register function does not insert data in database

I am trying to finish the register function but something goes wrong. I get an error message " It seems that although registration is claimed to be ok (from check50) nothing is actually added in the ...
0
votes
1answer
90 views

finance, how can I keep user log in

I'm confused with the walkthrough, how can I keep the user is logged in status? I tried to save it into session['user_id'] = results[0]['id'] But it doesn't work
0
votes
1answer
68 views

Getting an error in register. Can someone help? Better explanation below

I am getting an error in register. Can someone explain why? Here is what the database looks like. Here is the error code. flask run * Serving Flask app "application.py" (lazy loading) * ...
0
votes
1answer
38 views

in the register function, I need help understanding why db insert works to get id for session[“user_id”]

username_form = request.form.get("username") id_db = db.execute("SELECT id from users where username=username_form") I understand why session["user_id"] = id_db[0]["id"]doesn't work to get the id. ...
1
vote
1answer
1k views

Pset8 Finance Check error

I consistently get this error when running check50 on pset8 Finance problem from CS50 when I assume it tries to add a new user that isn't in the user database. However when I enter a new user myself, ...
0
votes
1answer
135 views

Pset7: Logging in as registered user succeeds with TypeError: 'NoneType' object is not subscriptable login

I have completed pset7 and all functionality appears to be working as intended. However, check50 produces the following error: Since I am unable to find an issues through testing, I am having ...
0
votes
1answer
288 views

pset7 finance: index not working after register

I have an issue with my index function after a user newly registers. After registering, a new row is created in the table users with a cash value set to 10000 by default. After registering, the user ...
0
votes
1answer
610 views

pset7 finance register and index check50 error

I have implemented all functions. However when i run check50, it gets following errors The errors might come from my index code. I am not sure. Below are my code for register and index. Any ...
0
votes
1answer
543 views

pset7 finance register function check 50

after I run check50 I get following comments: Below are my code for register: @app.route("/register", methods=["GET", "POST"]) def register(): """Register user""" session.clear() if request.method =...
0
votes
1answer
119 views

The predefined login function does not seem to be working in finance

All the registered ids are not able to log in. Even though the username and password are correct the website returns 400 error def login(): """Log user in""" # Forget any user_id session.clear() # ...
0
votes
1answer
94 views

pset7 Internal Server Error register… 'ValueError' object has no attribute 'name'

I am getting an Internal Server error whenever I click on "Register"... However, the terminal window points me to a line that is not part of my code (this section: def errorhandler(e): """Handle ...
1
vote
1answer
116 views

how do I correct this error? pset7

File "/home/ubuntu/workspace/pset7/finance/application.py", line 267, in register session["user_id"] = result[0]["id"] TypeError: 'int' object is not subscriptable if request.method == "POST": ...
0
votes
2answers
58 views

help ! I am getting an error and I dunno why …register (pset7)

if request.method == "POST": if not (request.form.get("password") or request.form.get("confirmation") or request.form.get("username")): return apology("please enter all details", 403) ...
0
votes
1answer
64 views

How do you store the user's ID

I keep getting an Internal Server Error after trying to register and I don't think I am storing the user ID correctly. Please can someone tell me what I'm doing wrong. # User reached route via POST (...
0
votes
1answer
375 views

Check50 returning error pset7 register

I get this error in register in pset7/finance when I run check50: :) application.py exists :) application starts up :) register page has all required elements :( registering user succeeds expected ...
0
votes
2answers
69 views

After trying to use the register function, nothing happens

I'm trying really hard to get register to work, it seems like when I try to use register, it doesn't do anything after I hit submit. I'm not sure why it does this or how to fix it but any help would ...
0
votes
3answers
389 views

Register Route failing check50 but is working (expected status code 200 but got 400)

I have looked over this code multiple times, looking for misplaced variable names or attempts to hash the wrong thing. I have tested my code multiple times in many ways and I can't get it to fail. ...
0
votes
1answer
140 views

Pset 7 - CS50 Finance: “Quote” keeps redirecting me to a register error

When I enter a symbol (stockticker) on my quote page, when I click "submit" the website redirects me to a register page error (403: Must Provide Username) Why would this happen? I don't even see any ...
1
vote
1answer
915 views

CS50 Finance (pset7) - register function is not working for application.py in the latest CS50 question

In the latest CS50 - pset7 - CS50 Finance, it is advised to use generate_password_hash instead of pwd_context.encrypt. Also, in the template, there is a change where instead of url_for('register'), /...
0
votes
2answers
703 views

Pset7 Finance Register - Works fine but error in check50

I'm struggeling with this bug for several days now and don't know how to fix it. I didn't find an answer in all the previous questions. Except my personal touch I finished pset7. If I start flask ...
0
votes
1answer
427 views

Pset7 Finance register NameError: name 'pwd_context' is not defined

def register(): session.clear() if request.method == "POST": if not request.form.get("username"): return apology("Missing Username!") elif not request.form.get("...
1
vote
1answer
331 views

Pset7 - CS50 Finance - Register - returns the same apology each time

When im testing my code by entering in blank entries in username or password, i expect the site to show me the apologies like "Must provide username" or "Must provide password", but it only shows the ...
0
votes
1answer
157 views

Password confirmation not working

I know this is probably just a question of not understanding the documentation, but when registering a user, my password confirmation redirects to the apology, "both passwords must match". Following ...
0
votes
1answer
188 views

Please rectify my C$50 Finance/register

I am getting an error message by debugger which is : builtins.TypeError TypeError: 'int' object is not subscriptable.
0
votes
1answer
120 views

Strange sudden error in pset7 staff implemented login (key error 'id')

I'm currently working on pset7, cs50 finance. I just implemented the buy method, and when I went to login on my site, I encountered a key error, pointing to 'id' in the following line in the login ...
0
votes
2answers
429 views

Pset7 cs50 finance register method not displaying register.html

As the title says, I am working on the register method of cs50 finance. When I click on the register tab of the site, my login template seems to be popping up instead. I tried returning the register ...
0
votes
1answer
204 views

register function not returning expected apology results

I'm working on the register() method for Pset7. I've written a new html template register.html which seems to work - when I run Flask and click on the register link, I get my newly-created register ...
-1
votes
1answer
891 views

Pset7 CS50x2017 CS50 Finance register route

Could someone please point to where I can see how to check in the register route if a username already exists in the database and also whether the user entered the same password in the confirmation ...
1
vote
1answer
1k views

confusion on session[“user_id”] = rows[0][“id”] pset7

so the original code given for login in application.py had rows = db.execute("SELECT ...) and then session["user_id"] = rows[0]["id"] and the explanation said that that db.execute returns a key which ...
0
votes
1answer
425 views

For register in pset 7 where I am doing wrong?

Here is my code for register user in database but it is not working, What is my mistake @app.route("/register", methods=["GET","POST"]) def register(): if request.form["username"] == "" or request....
0
votes
1answer
191 views

register.php in Problem Set 7 - How to let user enter cash other than 10000.0000

For register.php, how do I handle situations where the user enters a value other than 10,000.0000 for cash? I'm sorry if this is a stupid question or if it seems like I just want the answer on a ...
0
votes
1answer
131 views

pset7 - register.php error, but new user inserted in database

my register.php code seems to work (at least I do find the new user in the database table), however instead of reaching index.php, I get this errormessage: https://ide50-felderer.cs50.io/register.php ...
0
votes
1answer
210 views

PSET7 Register not redirected to index.php

I am having some issues getting redirected to index.php after adding the user to the database. Everything seems to be running just fine but I am not being redirected. Do I have to implement more parts ...
0
votes
2answers
321 views

Pset 7 | C$50 Finance: query() undefined in register.php

I'm having an issue with register.php. When I try to run the file on my web server and press submit (no matter the inputs) I get this fatal error message: ( ! ) Fatal error: Call to undefined ...
1
vote
2answers
363 views

Pset7 Finance: register.php gives me an error

Haven't started my implementation of register but I followed the spec up to creating register.php and copying the contents on the specs over. When I navigate to register.php I get this error: Is this ...
0
votes
1answer
143 views

User not logging in automatically after registration

Everything else works, except this. <?php // configuration require("../includes/config.php"); // if user reached page via GET (as by clicking a link or via redirect) if ($_SERVER["REQUEST_METHOD"...
0
votes
1answer
135 views

I am working on pset7. register.php is working fine. But it always give back an error“id is not defined”?

<?php // configuration require("../includes/config.php"); // if user reached page via GET (as by clicking a link or via redirect) if ($_SERVER["REQUEST_METHOD"] == "GET") { ...