How to run the code
-
make sure to install Flask and Flask Migrate to for web developing.
-
run init_db.py to create a database table
-
run Business_list.py to insert example business lists
-
run code_generator.py to get a access code
-
In code_generator.py at line "business_id = 1 # Change this ID to match an existing business" changing the id will change the business
id 1 {'name': 'Joe's Coffee Shop'}, id 2 {'name': 'The Gourmet Bistro'}, id 3 {'name': 'Tech Haven'}, id 4 {'name': 'Urban Fitness Center'}, id 5 {'name': 'The Book Nook'}, id 6 {'name': 'Green Leaf Organic Market'},
For exampe, if id 3 code generated, that code can only by valid for "Tech Haven" business.
- run app.py then click on the local link to start the web.
- Register then login
- If code is invalid, the review will not go through.
- To test another access code, close app.py and generate another code, then start app.py again.