Choose a language that suits you
This is what I have done through Django’s Embed Video library which can be of great help to anyone using it as a simple guide for this textbook.
The use of this technology provides great convenience for the programmer.
Install the requirments.txt file to view the program
Download Django Embed Video Library
pip install django-embed-video
pip install git+https://github.com/jazzband/django-embed-video
View the code of the program in the HTML file
{% load embed_video_tags %}
<!-- The video tag: -->
{% video item.video as my_video %}
URL: {{ my_video.url }}
Thumbnail: {{ my_video.thumbnail }}
Backend: {{ my_video.backend }}
{% video my_video "large" %}
{% endvideo %}
<!-- Or embed shortcut: -->
{% video my_video '800x600' %}
Location in the model.py file in your program
from django.db import models
from embed_video.fields import EmbedVideoField
class Item(models.Model):
video = EmbedVideoField() # same like models.URLField()
Read more about Django Embed Video Library Github
Read more about Django Embed Video Library documentation
Bu men Djangoning Embed Video kutubxonasi orqali qilgan ishim, bu darslik uchun oddiy qo'llanma sifatida ishlatgan har bir kishiga katta yordam berishi mumkin.
Ushbu texnologiyadan foydalanish dasturchi uchun katta qulaylik yaratadi.
Dasturni ko'rish uchun requirements.txt faylini o'rnating
Django Embed video kutubxonasini yuklab oling
pip install django-embed-video
pip install git+https://github.com/jazzband/django-embed-video
HTML faylida dastur kodini ko'ring
{% load embed_video_tags %}
<!-- The video tag: -->
{% video item.video as my_video %}
URL: {{ my_video.url }}
Thumbnail: {{ my_video.thumbnail }}
Backend: {{ my_video.backend }}
{% video my_video "large" %}
{% endvideo %}
<!-- Or embed shortcut: -->
{% video my_video '800x600' %}
Dasturingizdagi model.py fayildagi joylashuvi
from django.db import models
from embed_video.fields import EmbedVideoField
class Item(models.Model):
video = EmbedVideoField() # modellar bilan bir models.URLField()
Django Embed Video kutibhonasi haqida ko'proq o'qing
Django Embed Video Library hujjatlari haqida ko'proq o'qing