Skip to content

💻 Running Tool in Development Mode

This guide explains how to set up and run the EQIPA Django app in a development environment.


1: Copy the code to the system


2: Create and Activate a Virtual Environment

Create a Python 3 virtual environment inside the webapp folder:

python3 -m venv venv
source venv/bin/activate

3: Install Python Dependencies

Install all required packages using the requirements.txt file:

pip install -r requirements.txt

4: Configure Django Settings

Open ipa_india/settings.py and update the following:

  • ALLOWED_HOSTS
  • CSRF_TRUSTED_ORIGINS
  • BASE_URL
  • DATABASES section → add username, password, and DB name
  • GRASS_DB path → e.g., /mnt/mapdata/grassdata/ipa_india
  • GRASS_LOCATION

5: Apply Migrations & Collect Static Files

Run the following commands to prepare your database and static files:

python manage.py makemigrations webapp
python manage.py migrate
python manage.py collectstatic

6: Create a Superuser

python manage.py createsuperuser --username admin

Sample credentials:

  • Username: admin
  • Email: your-email@gmail.com
  • Password: your-pass

7: Test Local Server

Run the Django development server:

python manage.py runserver

To access from another device on the same network:

python manage.py runserver 0.0.0.0:8001

Now open your browser at:


Start Celery worker using:

celery -A ipa_india worker -l INFO

To run Celery inside a screen session:

screen -S ipa_celery
celery -A ipa_india worker -l INFO

To detach from the screen session:

Ctrl + A, then D

To reattach:

screen -r ipa_celery

📦 Screen

Learn more: How to Use Linux Screen

Use screen to manage background processes like Celery or the Django dev server:

Install Linux Screen on Ubuntu and Debian:

sudo apt update
sudo apt install screen
🔄 Attach to a screen:
screen -r <screen_name>

🔍 Check running screens:

screen -r

🔙 Detach a screen:

screen -d <screen_name>

❌ Delete (terminate) a screen:

screen -S <screen_name> -X quit

🆕 Start a new screen session:

screen -S <screen_name>

Detach from a screen

Ctrl + A, then D


Admin Site Setup

When running the server for the first time, visit:

http://ServerIP:8000/admin

Go to the "Sites" tab and update the domain to match your current host:

  • For local testing: 127.0.0.1:8000
  • For production: your domain name

This ensures correct rendering of templates during report generation.


✅ Your development server is now ready!