UDPlatforms Assignment APIs

Django follows the Model View Template (MVT) architecture.
Model = Database, View = Controller, Template = Rendering


Installation and Running

Commands may differ depending on OS. I'm using Ubuntu 20.04 LTS

git clone https://github.com/siyam04/udplatforms-assignment-apis.git
  • Go to the repository directory
cd udplatforms-assignment-apis
  • Create virtual environment using python
python3 -m venv myenv
  • Activate virtual environment
source myenv/bin/activate

venv

  • Install project requirements
pip3 install -r requirements.txt

requirements

  • Create the database
python manage.py makemigrations
python manage.py migrate

db-1

  • Create the superuser (admin) & provide credentials
python manage.py createsuperuser
  • Start the local server
python manage.py runserver

root

admin-01

  • Generate fake dummy data
python fake_data.py

faker

  • Run test cases (Unit Testing) See More
python manage.py test

Success

test-case

Failed

test-case-F