This web app presents a wide variety of drinks to users. Each drink includes its name, picture and recipe. The twenty cocktail presented at the landing are with in the most populars in the data base, a search by name is also an option. The recipe will be presented by cliking on details. To save any drink the user must sign up.
The user will be able to narrow down the search in the navbar by clicking in Category, Alcohol/Non Alcohol or Ingredients.
On the very bottom of the page a footer has placed, where a link to a random selection of teen cocktail will present everytime is click, a search by name is also an option in the same. The other option is clicking on select by the first letter, which will render a new temple where the user will be able to type in any of the letter or number above the imput bar.
This project consumes data from TheCocktailDB API patreon supporter version, the documentation can be found here.
You will need python3 and pip3 installed for this project. You will also need to setup a Postgres Database if you want to allow the user to save each drink, remember that in order to save the drink the user must login or signup, for that you will need a DB.
-
Clone the repo.
https://github.com/OGMorales17/Capstone-1.git
-
Create a virtual environment in the project directory.
$ python3 -m venv venv
-
Start the virtual environment.
$ source venv/bin/activate
-
Install required packages.
$ pip3 install -r requirements.txt
-
Open the secrets.py file and change the current API_SECRET_KEY and API_BASE_URL for the ones in the fields specified below.
API_SECRET_KEY = "1" API_BASE_URL = "https://www.thecocktaildb.com/api/json/v1/"
You will need to set up PostgreSQL database for this application. Once that is done you can move to the next step.
-
In the terminal.
$ createdb bartender $ ipython
-
In Ipython.
In [1]: run app.py In [2]: db.create_all() In [1]: quit()
-
Run the app.
$ flask run
-
Open web browser and run the app on the port for your server.