The Backend API for Raagahub Application, built on Django.
- Ensure Postgres Server is running locally (Use Postgres.app)
- Create database and admin user in psqlshell
postgres=# CREATE DATABASE raagahubdb;
postgres=# CREATE USER admin WITH PASSWORD 'admin123';
- Grant necessary permissions
postgres=# ALTER ROLE admin SET client_encoding TO 'utf8';
postgres=# ALTER ROLE admin SET default_transaction_isolation TO 'read committed';
postgres=# ALTER ROLE admin SET timezone TO 'UTC';
GRANT ALL PRIVILEGES ON DATABASE raagahubdb to admin;
- Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate
python -V # should indicate venv path as src
- Install all python packages
pip install -r requirements.txt
- Perform migrations
python manage.py makemigrations
python manage.py migrate
- Load Data in the following order
python manage.py loaddata chords
python manage.py loaddata melakarta_ragas
python manage.py loaddata janya_ragas
python manage.py loaddata krithis
python manage.py runserver
The following sources have been crucial to building up this database:
https://en.wikipedia.org/wiki/Chord_names_and_symbols_(popular_music) https://spinditty.com/learning/chord-building-for-musicians http://www.carnatic.com/carnatic/ragalist.htm