An administrative web console for Dalgo (https://dalgo.in/).
Dalgo is an open-source data platform for the social sector. Since it is open-source, anyone is free to run their own instance of the platform.
The dalgo-admin
application allows you to monitor your instance of Dalgo to get an overview of
- infrastructure usage
- client accounts
Project Tech4Dev runs an instance of Dalgo as a paid subscription service, and features for dalgo-admin
are primarily driven by the use-cases we encounter.
To install and run this app locally, you need to have Python v3.10, django v4.2, docker, postgres v14 or more and pip installed on your machine.
- First, fork the repository and then clone the repository from GitHub using the following command on your local system:
git clone <repository_url>
- Now change directory to the dalgo-admin project and take a look around
cd .\dalgo-admin
- Run virtual environment, install the required packages.
pip install -r requirements.txt
- now change directory to the dalgo_admin
cd .\dalgo_admin
Note: you can setup postgres for the django in any way you want (it is considered easier using docker)
- Install docker on your system
For help refer: docker docs
- Now install postgres official image on docker and create an instance of it
For help refer: this link or docker docs
or any other article on web
-
run the postgres instance from docker desktop or CLI
-
Create a database and user in this instance from the Postgres prompt
for example,
CREATE DATABASE dalgo_db;
CREATE USER dalgo_user WITH PASSWORD '**********';
GRANT ALL PRIVILEGES ON DATABASE dalgo_db TO dalgo_user;
- create a .env file in root directory
- Inside the .env file add the environment variables for the database with values you created above (check the .env.template for variables)
- Now apply the database settings to your django app
python manage.py makemigrations
python manage.py migrate
- get your django secret-key value by following command and paste in .env file
python manage.py shell -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"
- run the server
py manage.py runserver
- Paste the given url on browser and see the app running