Skip to content
No description, website, or topics provided.
Python Shell
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
ecircdb Add camelCase renderer for APIs Jul 4, 2019
wiki-assets Update wiki-assets according to the latest db structure Sep 3, 2019
.env.stencil Integrate MySQL as the database and shift the conf variables from pyt… Jul 2, 2019
.gitignore Add scripts to migrate the database and populate the species list Jul 18, 2019 Update README Aug 16, 2019 Initialize the backend project with the core app May 25, 2019 Change fields in the model according to the latest dump Sep 2, 2019
requirement.txt Add some more plots to the species_view Aug 6, 2019


Backend for the ecircdb

Setup on your local machine

  1. Clone the Repository
$ git clone ecircdb-backend
$ cd ecircdb-backend
  1. Make virtual environment setup
$ pip install virtualenv
$ virtualenv -p python3 <env_name>
  1. Activate your environment
$ source <env_name>/bin/activate
  1. Install libmysqlclient

For example on Debian/Ubuntu you must install the package:

sudo apt-get install libmysqlclient-dev

For recent versions of debian/ubuntu (as of 2018) it is:

sudo apt install default-libmysqlclient-dev
  1. Install requirements
$ pip install -r requirement.txt
  1. Create a MySQL user and database normally, remember the name of the database and credentials for the user
  2. Configure the .env file for the project, you can clone the available .en.stencil file to checkout the format for .env file
$ cp .env.stencil .env
  1. Fill out the database name, user, password in the .env file, you can specify the host and port for the database optionally
  2. Migrate Files
$ python makemigrations
$ python migrate
  1. Create a superuser
$ python createsuperuser
  1. Start the server
$ python runserver
  1. Visit localhost:8000/control and login using the account created in above step. This is the admin panel from where data can be added, deleted or modified.
  2. Check other urls from the list at localhost:8000
You can’t perform that action at this time.