Building the video-sharing web application
Previously, we created a desktop application using the PySide library. This time, we’re going to build a web application using the Django library. We’re using the same Python virtual environment that we used to write the smart contract. So, make sure the aioipfs
library is installed before going through the following steps:
- Without further ado, let’s install Django:
(.venv) $ pip install Django
- We also need the OpenCV Python library to get the thumbnails of our videos:
(.venv) $ pip install opencv-python
- Now, let’s create our Django project directory. This will create a skeleton Django project, along with its settings files:
(.venv) $ django-admin startproject decentralized_videos Inside this new directory, create the static directory and the media directory: (.venv) $ cd decentralized_videos (.venv) $ mkdir static media
- In the same directory, create a Django application named
videos
:(.venv) $ python...