This app uses
These dependencies must be installed before you can run the app. The easiest way to do so is by using pip. Simply run the following commands:
pip install Flask
pip install SQLAlchemy
pip install Flask-GoogleLogin
As the app uses Google for authentication as the next step you have to obtain a client id and client secret from Google:
- Go to the Google Developer Console.
- Create a new project.
- Go to APIs & auth - Consent screen and select a valid Email address.
- Go to APIs & auth - Credentials and create a new Client ID.
- Enter http://localhost:8000/oauth2callback/ in the Authorized redirect URIs field.
- Open the project.py file and replace the <Client ID> and <Client Secret> placeholders with your client id and your client secret.
Next you have to create the categories. To do so run
python database_setupy.py
To start the app simply run
python project.py
- The app uses Jasny Bootstrap's file input widget for the picture upload.
- The pictures are stored in the database.
- The app uses nonces to prevent cross-site request forgeries (CSFR) when creating, updating and deleting items.
- The app offers two API endpoints:
- JSON: /catalog.json
- XML: /catalog.xml
- The app uses a (slightly modified) dashboard.css stylesheet from Bootstrap's Dashboard sample page.
- The app is not optimized for small devices (smartphones etc.).