A system for uploading videos and tracking the progress using Websockets In Django
- install packages in requirements.txt with
pip install -r requirements.txt
- Create database based on the values specified in .env file.
- Go to the app directory
cd app
- run migrations:
python manage.py migrate
- run the app
daphne -v 2 app.asgi:application
- Admin
- username: admin
- password: mjhcHt7eFfpAH[;HJmx#
- user1 (not admin):
- username: user1
- password: 1111
Upload Video page: To upload video and check video progress check this address: http://127.0.0.1:8000/api/video/upload/
username and password is hardcoded in html file because the only purpose of this page is checking the websocket functionality
The swagger page address: http://127.0.0.1:8000/api/docs/
I have created an instance of keycloak on Cloud-IAM and the credentials are in .env file.
An app named keycloakAuth is added to the project to handle authentication and authorization. You can get accesss token from this endpoint: http://127.0.0.1:8000/api/keycloakAuth/simple-login/ and then add it to the endpoints as Bearer Token.