git clone https://github.com/Gunabana/CityByte
python -m venv venv
On Mac/Linux:
source venv/bin/activate
On Windows:
venv\Scripts\activate
pip install -r requirements.txt
(NOTE): IF YOU ARE ON THE LATEST VERSION OF PYTHON SOME OF THE MODULES WILL NOT WORK. YOU COULD EATHER A: EDIT THE REQUIREMENTS.TXT AND CHANGE THE VERSION OF SAID MODULES TO THE LATEST VERSION OR B: RUN PYTHON 3.8 ON THE VENV
GEODB_X_RAPID_API_KEY=""
GEODB_X_RAPID_API_HOST=""
AMADEUS_API_KEY=""
AMADEUS_API_SECRET_KEY=""
UNSPLASH_API_KEY=""
FOURSQUARE_API_KEY=""
WEATHER_BIT_X_RAPID_API_KEY=""
WEATHER_BIT_X_RAPID_API_HOST=""
Create an account in the below websites to Fetch API keys and use them in the above template.
- Log in to https://console.cloud.google.com
- Create a new Project
- Navigate to APIs & Services
- Select "Create Credential" > "OAuth client ID"
- For the application type, choose "Web application" and enter a name for it
- For authorized JavaScript origins, enter "http://localhost", "http://localhost:8000", and "http://127.0.0.1:8000"
- For authorized redirect URIs, enter "http://localhost:8000/auth-receiver"
- After this, you will be shown your Client ID and Client secret
- Add
GOOGLE_OAUTH2_ID=""
andGOOGLE_OAUTH2_SECRET=""
to the .env file with the Client ID and Client secret within their respective quotes - Add the Client ID to
data-client_id=""
in login.html - Follow the guide for registering for Google Maps API access. (While it does require credit card registration, they will not let you exceed the free limit unless you prepay or enable charges to your account; the free version allows $200 in credit each month)
- Add
GOOGLE_API_KEY=""
to the .env file with the new API key
- Follow the instructions in Getting Started to Install Redis in your local environment.
- Start the Redis Server: Open a terminal and run the following command:
redis-server
- Open another terminal to start the REDIS CLI:
redis-cli
Now, you can run the application.
python manage.py migrate
python manage.py runserver
The server starts at http://127.0.0.1:8000