favors-game's People
favors-game's Issues
Remove all string format usage when building queries
There are several instances of this pattern:
query = f"select * from table where {where_clause}"
database_connection.execute(query)
When the where clause is built based on user input, this creates a sql injection vulnerability. We need to replace this with a different pattern:
query = f"select * from table where search_column = :search_condition"
database_connection.execute(query, search_condition=user_input)
Error: Failed to find Flask application or factory in module 'application'.
I can't run favors-game on PyCharm without renaming "application.py". For now I have a band-aid solution (i.e. rename the file to anything but "application.py"), but I would appreciate any insight into why this is happening.
Here is the error message when I run "application.py" (as is stored in main
branch).
FLASK_APP = application.py
FLASK_ENV = development
FLASK_DEBUG = 0
In folder /Users/amikami/Documents/GitHub/favors-game
/Users/amikami/Documents/GitHub/favors-game/venv/bin/python -m flask run
Usage: python -m flask run [OPTIONS]
Try 'python -m flask run --help' for help.
Error: Failed to find Flask application or factory in module 'application'. Use 'application:name' to specify one.
Process finished with exit code 2
After I duplicate "application.py" and rename it "app.py", I am able to move past the error message.
FLASK_APP = app.py
FLASK_ENV = development
FLASK_DEBUG = 0
In folder /Users/amikami/Documents/GitHub/favors-game
/Users/amikami/Documents/GitHub/favors-game/venv/bin/python -m flask run
Debugging: running from /Users/amikami/Documents/GitHub/favors-game
* Serving Flask app 'app.py'
* Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on http://127.0.0.1:5000
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.