one-zero-eight / sport

InnoSport platform at Innopolis University. Students check in for sport classes, instructors manage the schedule and collect attendance.
https://sport.innopolis.university
MIT License
8 stars 11 forks source link
adminpanel django grafana python sports

InnoSport website

Tests Production deploy

The platform for conducting, tracking and checking students' sports activity at Innopolis University.

Requirements:

How to start coding

  1. Install dependencies: pip3 install -r ./adminpage/requirements.txt
  2. Copy environment variables: cp compose/example.env compose/.env
  3. Start services: docker compose -f ./compose/docker-compose.yml up
  4. Make migrations and create superuser:
    • Enter shell: docker exec -it sport_adminpanel bash
    • Autocreate migration files: python manage.py makemigrations
    • Apply migrations to db: python manage.py migrate

      If there are problems with migrations applying, try to run the same migrate command with --fake option.

    • Create a new superuser: python manage.py createsuperuser
  5. View admin panel at http://localhost/admin

[!NOTE] Server supports auto-reload on code change in debug mode

API documentation:

Environment Variables

See compose/example.env for reference.

The project requires a file compose/.env with the following environment variables:

You can leave the default values for development.

Project structure

.
├── adminpage - Django project
│   ├── adminpage - main django app
│   │   ├── settings.py
│   │   ├── swagger.py
│   │   ├── urls.py
│   │   └── wsgi.py
│   ├── api
│   │   ├── crud - directory with database queries
│   │   ├── fixtures - database tools for testing
│   │   ├── serializers - DRF serializers
│   │   ├── tests
│   │   │   ├── api - endpoints tests
│   │   │   └── crud - database queries tests
│   │   └── views - api endpoints
│   ├── sport
│   │   ├── admin - django adminpage classes
│   │   ├── dumps - database dumps for tests
│   │   ├── migrations - django database migrations
│   │   ├── models - django database models
│   │   ├── signals - django ORM signal handlers
│   │   ├── static - static files for app (css, fonts, images, js)
│   │   │   └── sport
│   │   │       ├── css
│   │   │       ├── fonts
│   │   │       ├── images
│   │   │       └── js
│   │   ├── templates - django templates for app pages
│   │   └── views - app pages url handlers
├── compose - compose for the project
│   └── docker-compose.yml
├── nginx - load balancer and proxy
│   ├── access.d
│   ├── conf - configuration folder
│   ├── Dockerfile
│   └── logs - log folder
└── README.md