Steps to install a Django project

In this tutorial, we’ll see typical steps needed to install a Django project from its repo in a testing environment. For this purpose, we’ll utilize https://github.com/SohailSal/mzerp2 repo which comprise of our new Django based accounting project. This tutorial assumes that you already have Python3 along with git installed in your system. Let’s open the terminal and execute following command to clone the GitHub repo locally:

git clone https://github.com/SohailSal/mzerp2

Then, go inside the newly created folder:

cd mzerp2

Assuming python3-venv package is installed, run following command to create virtual environment:

python3 -m venv .env

Then activate the virtual environment:

source .env/bin/activate

If you are on Windows, you’d use .\.env\Scripts\activate command. (Once virtual environment is activated, you’ll use ‘python‘ instead of ‘python3‘ command)

Now install project dependencies by executing following command:

pip install -r requirements.txt

Then, execute following command to run migrations:

python manage.py migrate

Next, create the super user by executing:

python manage.py createsuperuser

When asked, enter username, email and password…remember them.


The above-mentioned project also includes data seeders. So, let’s seed the data by executing:

python manage.py loaddata base/sample ledger/sample

Finally run development server by executing:

python manage.py runserver

Go to localhost:8000/dashboard…enter above username and password when asked for login. Now enjoy a Django based full-fledged accounting software 😉