Bit68 Python/Django developer Task



Setup Project


This project needs python 3 and PostgreSql be installed before start the setup guide


Use the project virtual environment for windows via venv

$ env\Scripts\activate.bat

Use the project virtual environment for Linux or MacOS via venv

$ source env/Scripts/activate

Or create a new env via venv and install the requirements libraries via PIP

$ python -m venv env
$ env\Scripts\activate.bat
$ pip install -r requirements.txt

Edit postgresql database in the DATABASES setting of the project settings.py

DATABASES = {
    "default": {
        "ENGINE": "django.db.backends.postgresql",
        "NAME": "database_name",
        "USER": "username",
        "PASSWORD": "password",
        "HOST": "127.0.0.1",
        "PORT": "5432",
    }
}

Make migrations for database.

$ python manage.py makemigrations
$ python manage.py migrate

Run the project test cases.

$ python manage.py test

Run the project.

$ python manage.py runserver

Import Postman collection and give it a try using Postman.