Code Monkey home page Code Monkey logo

favors-game's People

Contributors

amikami102 avatar briankinney avatar bsargent98 avatar duncs77 avatar llpuckett avatar luseleafpaper avatar yjtan avatar

Watchers

 avatar  avatar  avatar  avatar

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.