Skip to content

Noorain464/attendance-backend

 
 

Repository files navigation

attendance-backend

Code contribution

Lint & Formatting

We use flake8==6.1.0 as a linter and black==23.11.0 as a code formatter

Install

pip install flake8==6.1.0 black==23.11.0

Run black

black .

Run flake8

flake8 .

Setup

Using python.

Make sure that you have +python3.8 installed.

pip install -r ./requirements.txt

For sure you will get some errors after running above step fix those and then continue.

python manage.py makemigrations
python manage.py makemigrations attendance
python manage.py migrate
python manage.py runserver

After that you have to create superuser and create some dummy data. Dummy data can be created using django Fixtures if you are interested raise a PR for that.

To build an image.

docker build -t attendance-backend .

To run the container and listen on localhost.

docker run --network=host attendance-backend

Now you can access the server at http://localhost:8000

if anything is missed visit docker-cheetsheet

To run test file

To run all test

python manage.py test

To run a specific testfile

python manage.py test attendance.test.models.test_classattendancewithgeolocationTest

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 87.2%
  • HTML 6.8%
  • JavaScript 4.3%
  • CSS 1.5%
  • Shell 0.2%