Skip to content

Latest commit

 

History

History
44 lines (38 loc) · 1.88 KB

File metadata and controls

44 lines (38 loc) · 1.88 KB

Bookkeeping REST API

Prerequisites

Optionals

Project Setup

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:

  1. Clone this repository to your local machine.
  2. 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.
  3. Install the dependencies of the project by entering the following command:
$ pip install -r requirements.txt
  1. Make sure your postgresql service up and running.
$ sudo service postgresql status
  1. Login to your Postgres shell and create a database for the project.
  2. 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 the AWS S3 section as it is.
  • `
  1. 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

Usage

  1. Make sure, your virtualenv container is still activated.
  2. Run the following command to start the development server.
$ python manage.py runserver 0.0.0.0:8000
  1. Open a web browser and go to: http://localhost:8000/admin/
  2. Using the Admin credentials you on the .env file in order to login to the admin dashboard.