Skip to main content

Questions tagged [flask]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
432 views

How to pre-populate sell() and buy() forms from index - Pset7

I'd like to allow users to buy and sell shares they already own from the index page. I've created a button for this on the index, and I simply want to send the user to the /buy.html or /sell.html page ...
Matt Friend's user avatar
1 vote
1 answer
186 views

C$50 PSET7 Flask blank form question

I am attempting to implement quote, buy and sell on the same page, called trade. I believe it would be a more user friendly way of doing things and good experience. However, I am having trouble ...
Sameer Malik's user avatar
0 votes
1 answer
514 views

PSET7 C$50 Flask flashing message categories

I'm in the early stages of pset7. On register, I'm looking to implement flashing messages instead of having the apology redirects, since they look and act more userfriendly. I understand that flash ...
Sameer Malik's user avatar
1 vote
1 answer
5k views

Pset7, Index: How to use loops in Python and Jinja?

I felt like I could understand the for loops great in c, but seem to be hitting a wall here. Some generic conceptual questions before i get into it: 1) ANSWERED. what sequence does the program run, ...
nvs0000's user avatar
  • 179
0 votes
1 answer
138 views

Pset7, Index, why does it not show other stocks i own?

I'm trying to get all stocks to just show up on my index screen, but can't seem to get my head around the jinja template + Python + SQL commands. Can someone tell me why is it that only my last ...
nvs0000's user avatar
  • 179
0 votes
1 answer
50 views

Pset 7: Passing basic values between from python to HTML print

I've been trying to pass in some very basic python values into HTML placeholders {{ }}, which ZYMAYLA has mentioned here. I'm doing what she has mentioned but there it doesn't go through, even for ...
nvs0000's user avatar
  • 179
0 votes
1 answer
740 views

Pset 7, why does session["user_id"] not take a variable?

I am able to solve the "register" part of the question by doing this: session["user_id"] = db.execute("SELECT * FROM users WHERE username = :username", username=request.form.get("username"))[0]["id"]...
nvs0000's user avatar
  • 179
2 votes
2 answers
817 views

Using jinja to render template based on previous url - pset7 finance

For the finance website homepage, I want to render index.html differently based on the previous url. For example, if I logged in I want to render a panel saying 'logged in', but if I registered I want ...
user34304's user avatar
  • 141
0 votes
1 answer
170 views

Rectify implementation of register function in pset7 - finance (Flask)

def register(): """Register user.""" if request.method == "POST": if not request.form.get("username"): return apology("must provide username") elif not request....
user34304's user avatar
  • 141
0 votes
1 answer
291 views

"No name 'redirect' in module 'Flask'

I am attempting to run the program from lecture 8, but I am experiencing errors with statements on line 1 and 9. I am using the CS50 IDE on Cloud9. I have tried the following: Downloaded my ...
Haugum's user avatar
  • 1
1 vote
0 answers
58 views

NoAppException in PSET8: Mashup

I am unable to start working on PSET8 Mashup, when I view the web page after running flask I get what appears here: Although I am running flask in the directory of mashup. So I don't know why it can'...
Mohamed Ahmed's user avatar
0 votes
2 answers
159 views

Setting up PSET8 on local machinne

I want to work on PSET8: Mashup on my local machine, not Cloud9 IDE; because I am having an issue with flask on cloud9; when I type 'flask run' on cloud9 IDE, I get: bash: /usr/local/bin/flask: ...
Mohamed Ahmed's user avatar
0 votes
1 answer
588 views

Pset7 'No application seems to be running here'

I've been on and off, coding away at CS50 projects for some years now and I was really excited seeing the course moving away from PHP and into the elegant Python. Now, I want to recreate C$50 Finance ...
MrBobJamesBob's user avatar
0 votes
1 answer
126 views

pset8 - /search - I'm not getting any json outputs

In my SQL table I stored the postal_code as INTEGER and place_name as TEXT. So whenever I type a number or text, it will match accordingly. The problem is that I'm not getting anything as JSON output. ...
tadm123's user avatar
  • 215
2 votes
1 answer
403 views

IndexError in initial state of pset6 Sentiments

I am working on Pset 6, Sentiments and followed the steps to create my app on twitter. I added keys, installed requirements.txt and did everything in order, but when I type "flask run" and visit the ...
devwanderer's user avatar
0 votes
1 answer
68 views

Flask column order randomly changes whenever I refresh local host

Whenever, I hit ctrl + s / close and re-open IDE, and then reload my local page for CS50 finance, I seem to experience a very weird issue of randomly changing column order. This happens without me ...
idol2k's user avatar
  • 5
0 votes
1 answer
83 views

PSet 7: Issues with flask table output - hint needed

I am trying to produce table headings using loop in flash but I get new lines after each: {% extends "layout.html" %} {% block title %} Portfolio overview {% endblock %} {% block main %} {% ...
idol2k's user avatar
  • 5
5 votes
1 answer
4k views

cs50 finance / pset-7 confused on index() table

I am trying to work on pset7, but am having a problem printing it out to the screen in the table format. I have all the values I need (the values I have are correct), but just can't figure out how to ...
Chris Koro's user avatar
0 votes
1 answer
103 views

pset7: CS50 Finance, ide and flask say syntax is incorrect what am I doing wrong that I don't see?

In the "buy" function of applications.py, no matter what I type, the CS50 IDE and flask both say I have a syntax error in my program. I don't see it and have tried removing parts, checked the syntax ...
Donald Jones's user avatar
0 votes
2 answers
63 views

PS7: Please give me a hint on flask loop usage

Despite reading documentation I cannot figure out why my loop is not functioning properly and is only dynamic for stock symbol? Am I meant to be using multiple nested loops passing all prices, holding ...
idol2k's user avatar
  • 5
0 votes
1 answer
432 views

"flask run" error in pset6 sentiments

When I press "flask run" command I am getting the following error ~/workspace/2017/flask/ $ flask run * Serving Flask app "application" * Forcing debug mode on Traceback (most recent call last): ...
Srikar Tadiparthi's user avatar

1 2
3