saveload_backend/README.md

19 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2014-10-13 05:47:01 -07:00
Charting Library Save/Load Backend
2014-10-13 05:44:24 -07:00
================
2014-10-13 05:47:01 -07:00
2014-11-24 02:07:22 -08:00
This is the tiny backend implementing Charting Library charts storage.
2017-11-16 05:24:25 -08:00
## Requirements
Python 3x, pip, Django, Postgresql
## How to start
2015-05-20 07:08:38 -07:00
1. Install Python 3.x and Pip. Use virtual environment if your host has older python version and it cant be upgraded.
2. Install PostgreSQL or some other Django-friendly database engine. Also you might want to install PgAdmin or any other administrative tool for your database.
2016-02-03 00:25:24 -08:00
3. Go to your charts storage folder and run `pip install -r requirements.txt`. Unix users : you have to have python-dev package to install `psycopg2`.
2021-12-13 04:47:18 -08:00
4. Create an empty database in Postgres (using either command line or `pgadmin`). Go to `charting_library_charts` folder and set up your database connection in `settings.py` (see `DATABASES` @ line #16).
2015-05-20 07:08:38 -07:00
5. Run `python manage.py migrate`. This will create database schema without any data.
2021-12-13 04:39:35 -08:00
6. Generate a secret key by running `python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())'`
7. Set your secret key to your environment variables `export SECRET_KEY='...'`
8. Run `python manage.py runserver` to run *TEST* instance of your database. Use some other stuff (i.e., Gunicorn) for your production environment.