Skip to main content

说明

Django 的视频播放器程序,现在主要是用于视频添加标记。

打包

cd D:\git_ldsxp\lds_spider\lds_site\django_video_play && python setup.py sdist

安装

# 本地安装
pip install django_video_play-0.0.1.tar.gz

添加设置

INSTALLED_APPS = [
    ...
    'video_play',
    ...
]

模型设置的例子

VIDEO_MARKER_MODEL = 'video.Marker'
VIDEO_PLAY_MODEL = 'video.Videos'
VIDEO_PLAY_MODEL_USING = 'video'
VIDEO_PLAY_DIR = VIDEO_DIR / 'video'
# 设置快速添加的标签名字
TAGS_READONLY = '标签1,标签1,其他标签'
# 后台编辑的链接
VIDEO_PLAY_ADMIN_EDIT_URL = '/admin/video_play/videosplay/{}/change/'

urls 设置

urlpatterns = [
    ...
    path('video_play/', include('video_play.urls')),
    ...
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

继承模型需要覆盖的内容

    @property
    def thumb_url(self):
        print('需要覆盖 thumb_url,支持预览图')
        return

    @property
    def mediabook_url(self):
        print('需要覆盖 mediabook_url,支持预览视频')
        return

    @property
    def videos_model(self):
        print('需要覆盖 model_videos,支持视频播放')
        return

Release files for django-video-play 0.1.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-video-play 0.1.10
File Size Uploaded
django_video_play-0.1.10.tar.gz 526.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-video-play 0.1.10
File Interpreter ABI Platform
django_video_play-0.1.10-py3-none-any.whl Python 3 none any Details

Total release size: 1.1 MB

Release files / django_video_play-0.1.10.tar.gz

Download URL django_video_play-0.1.10.tar.gz
Size 526.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c52865c19008342db67330e82f66bfd022d290eaebcfa7f2ebf798384a457f60
BLAKE2b-256 checksum
How to use checksums
ef8c9487f8578edb3436e9be4fa6749e20ac34fa0cebff91e1681b912560674b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release files / django_video_play-0.1.10-py3-none-any.whl

Download URL django_video_play-0.1.10-py3-none-any.whl
Size 534.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
954d2a2501e2857f51268f7499eb49d414d3ddeb5d5d6fc0d6421f6eff1713ab
BLAKE2b-256 checksum
How to use checksums
29c1c9076d2438c85cf406d84dae545301f0045b32f2acbcc6638fdd5bb23906
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.1.10 This release

2 release files

0.1.9

2 release files

0.1.8

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page