The platform for conducting, tracking and checking students' sports activity at Innopolis University.
pip3 install -r ./adminpage/requirements.txt
cp compose/example.env compose/.env
docker compose -f ./compose/docker-compose.yml up
docker exec -it sport_adminpanel bash
python manage.py makemigrations
python manage.py migrate
If there are problems with migrations applying, try to run the same migrate command with
--fake
option.
python manage.py createsuperuser
http://localhost/admin
[!NOTE] Server supports auto-reload on code change in debug mode
API documentation:
See compose/example.env
for reference.
The project requires a file compose/.env
with the following environment variables:
POSTGRES_USER
- Username for the dbPOSTGRES_PASSWORD
- database passwordPOSTGRES_DB
- database namePOSTGRES_SERVER
- database hostname (db
- by default)GRAFANA_DB_USER
- username for database user for grafana (will be created if not exists)GRAFANA_DB_PASSWORD
- password for database grafana userGF_SECURITY_ADMIN_PASSWORD
- admin password for Grafana DashboardSECRET_KEY
- a secret key for token verificationsPROJECT_NAME
- project titleSCHEMA
- schema of a web page (prefer https
)HOSTNAME
- hostname of a web page e.g: example.com
PORT
- port over which web page is servedPYTHON_VERSION
- which python version is to be used (specify exact version)DEBUG
- boolean flag for DEBUG mode ( true
enables fake login and Django debug)oauth_appID
- application ID for oauthoauth_shared_secret
- application secret for ouathoauth_authorization_baseURL
- an URL for user authoauth_get_infoURL
- tokeninfo URLoauth_tokenURL
- an URL to obtain tokenoauth_end_session_endpoint
- end oauth session endpointYou can leave the default values for development.
.
├── 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