Backend for the ecircdb
- Clone the Repository
$ git clone https://github.com/EnsemblGSOC/ecircdb-backend.git ecircdb-backend
$ cd ecircdb-backend- Make virtual environment setup
$ pip install virtualenv
$ virtualenv -p python3 <env_name>- Activate your environment
$ source <env_name>/bin/activate- Install
libmysqlclient
For example on Debian/Ubuntu you must install the package:
sudo apt-get install libmysqlclient-devFor recent versions of debian/ubuntu (as of 2018) it is:
sudo apt install default-libmysqlclient-dev- Install requirements
$ pip install -r requirement.txt- Create a MySQL user and database normally, remember the name of the database and credentials for the user
- Configure the .env file for the project, you can clone the available
.en.stencilfile to checkout the format for .env file
$ cp .env.stencil .env- Fill out the database name, user, password in the .env file, you can specify the host and port for the database optionally
- Migrate Files
$ python manage.py makemigrations
$ python manage.py migrate- Create a superuser
$ python manage.py createsuperuser- Start the server
$ python manage.py runserver- Visit
localhost:8000/controland login using the account created in above step. This is the admin panel from where data can be added, deleted or modified. - Check other urls from the list at
localhost:8000