polyledger/connect

Pre-populate database data with Django fixtures

Closed this issue · 1 comments

Description

On a fresh install or deploy of the portfolio app, the developer has to create an admin user via Django CLI and add a bunch of data including:

  • Sites (localhost:8000 for dev, portfolio.polyledger.com for production)
  • Coins (for price fetching e.g. BTC, ETH, LTC, XRP, ...)
  • Whitelisted emails

We should seed the above data and perhaps enable user input when the script is run. See providing data with fixtures.

A fixture for the development environment has been added in c95111f.

Here's how to load the fixture:

  1. Get the polyledger_server container id:
docker ps
  1. Load the fixture:
docker exec -it <container_id> python manage.py loaddata initial_data.json