z. [LEGACY] Installation - nollidnosnhoj/travel2change GitHub Wiki

Quick Start

1. In your terminal (or command prompt), navigate to the folder you want to place your project

  • I have mine at c:\Development\

2. Clone the repository

  • git clone https://github.com/nollidnosnhoj/travel2change.git

  • There should be a new travel2change folder.

3. Navigate inside the travel2change folder

  • cd travel2change

4. Make sure you have Python 3.6 installed

5. Create a virtual environment

  • Windows: python -m venv env

  • Linux/OSX: python3 -m venv env

  • Please note that env is the name of the folder where your virtual environment is stored. This can be named to whatever. However, in these steps, the virtual environment will be called env

  • Some versions of Debian and Ubuntu may have errors. Please refer to this article.

6. Activate your virtual environment

  • Make sure you're in your travel2change folder.

  • Windows: env\Scripts\activate

  • Linux/OSX: source env/bin/activate

  • You know you've activated your virtual environment when you see the prompt in your console is prefixed with (env).

7. (Optional) Upgrade your pip

  • python -m pip install --upgrade pip

8. Install all the packages and its dependencies

  • python -m pip install -r requirements.txt.

  • If you having issues in this section, please refer to this article.

9. Upload secrets.json file in the src folder

  • The secrets.json file contains secret keys needed for the website to be functional.

  • You can obtain the secret key in the Google Drive folder. DO NOT SHARE IT

10. Migrate the database (Optional but recommended)

  • You may not need to do this, but just for good measures.

  • In the terminal, insert python manage.py migrate. This will handle all the migrations in the project.

11. Run server

  • python manage.py runserver

12. (Optional) Create super user

  • python manage.py createsuperuser

  • Input your email address, first and last name, and password.

13. (Optional) Delete project.db file

  • If you want to start with a fresh database, you can delete the database file, and type the command below to migrate database.

  • python manage.py migrate.

If you are having issues with installing this project, please create an issue on this Github repository, or discuss the issue on the Slack channel. We will try our best to solve your issue. Also, please refer to the article linked below.

References https://tutorial.djangogirls.org/en/django_installation/