/online-school-database

Third year CS project

Primary LanguagePythonMIT LicenseMIT

BOOKIE

Getting Started

To get a copy of the project up and running on your local machine for development and testing purposes,

  1. clone this repository

    git clone https://github.com/KarenNgala/online-school-database
    
  2. Install and actvate a virtual environment

    $ python3.6 -m venv --without-pip virtual
    
    $ source virtual/bin/activate
  3. Install pip and project dependencies

    (virtual) $ curl https://bootstrap.pypa.io/get-pip.py | python
    virtual) $ pip install -r requirements.txt
  • See deployment for notes on how to deploy the project on a live system.

Database requirements

  1. To get a development env running, use the .env.example file to create your own .env file.
  2. Create a postgres db and add the credentials to the .env file
(virtual)$ psql
pc-name=#  CREATE DATABASE <name>;
  1. Apply initial migrations
(virtual) $ python manage.py migrate 
  1. Run migrations to your database
(virtual) $ python manage.py makemigrations application
(virtual) $ python manage.py migrate
  1. Create admin account
(virtual) $ python manage.py createsuperuser
  1. Start development server
 (virtual) $ python3 manage.py runserver

Running the tests

Run automated tests for this system

(virtual) $ python3 manage.py test application

Deployment

With all environment variables changed to suit your local copy of this repository, deploy the application to Heroku to see it live

Built With

License

This project is licensed under the MIT License - see the LICENSE.md file for details