You can setup your local developement environment using the following steps. Before you start, make sure to install the virtualenv package to complete the steps.
Steps:
- Clone this repository to your local machine.
- From the root directory of the repository, create a virtualenv container and activate it. For more information on how to create & activate a virtualenv container, click here.
- Install the dependencies of the project by entering the following command:
$ pip install -r requirements.txt
- Make sure your postgresql service up and running.
$ sudo service postgresql status
- Login to your Postgres shell and create a database for the project.
- In the root directory, you will find a file called
.env.example. Copy it and rename to.env. This file will hold all your environmental varaiable that are needed by the project. Make sure to update it accordingly. Note: For your local development environment, you can leave theAWS S3section as it is.
- `
- Run the following commands to setup the database tables and initial data:
$ python manage.py migrate --no-input
$ python manage.py loaddata business_types
$ python manage.py defaultsuperuser
- Make sure, your virtualenv container is still activated.
- Run the following command to start the development server.
$ python manage.py runserver 0.0.0.0:8000
- Open a web browser and go to: http://localhost:8000/admin/
- Using the Admin credentials you on the
.envfile in order to login to the admin dashboard.