django-video-play


Namedjango-video-play JSON
Version 0.1.10 PyPI version JSON
download
home_pagehttps://github.com/ldsxp
SummaryDjango 的视频播放器程序
upload_time2023-04-15 13:58:42
maintainer
docs_urlNone
authorlds
requires_python
licenseGNU GPL 3
keywords play video
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 说明

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

## 打包

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

## 安装

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

添加设置

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

模型设置的例子

```python
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 设置

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

继承模型需要覆盖的内容

```python
    @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
```




            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ldsxp",
    "name": "django-video-play",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "play,video",
    "author": "lds",
    "author_email": "85176878@qq.com",
    "download_url": "https://files.pythonhosted.org/packages/ef/8c/9487f8578edb3436e9be4fa6749e20ac34fa0cebff91e1681b912560674b/django_video_play-0.1.10.tar.gz",
    "platform": "any",
    "description": "# \u8bf4\u660e\n\nDjango \u7684\u89c6\u9891\u64ad\u653e\u5668\u7a0b\u5e8f\uff0c\u73b0\u5728\u4e3b\u8981\u662f\u7528\u4e8e\u89c6\u9891\u6dfb\u52a0\u6807\u8bb0\u3002\n\n## \u6253\u5305\n\n```sh\ncd D:\\git_ldsxp\\lds_spider\\lds_site\\django_video_play && python setup.py sdist\n```\n\n## \u5b89\u88c5\n\n```sh\n# \u672c\u5730\u5b89\u88c5\npip install django_video_play-0.0.1.tar.gz\n```\n\n\u6dfb\u52a0\u8bbe\u7f6e\n\n```python\nINSTALLED_APPS = [\n    ...\n    'video_play',\n    ...\n]\n```\n\n\u6a21\u578b\u8bbe\u7f6e\u7684\u4f8b\u5b50\n\n```python\nVIDEO_MARKER_MODEL = 'video.Marker'\nVIDEO_PLAY_MODEL = 'video.Videos'\nVIDEO_PLAY_MODEL_USING = 'video'\nVIDEO_PLAY_DIR = VIDEO_DIR / 'video'\n# \u8bbe\u7f6e\u5feb\u901f\u6dfb\u52a0\u7684\u6807\u7b7e\u540d\u5b57\nTAGS_READONLY = '\u6807\u7b7e1,\u6807\u7b7e1,\u5176\u4ed6\u6807\u7b7e'\n# \u540e\u53f0\u7f16\u8f91\u7684\u94fe\u63a5\nVIDEO_PLAY_ADMIN_EDIT_URL = '/admin/video_play/videosplay/{}/change/'\n```\n\nurls \u8bbe\u7f6e\n\n```python\nurlpatterns = [\n    ...\n    path('video_play/', include('video_play.urls')),\n    ...\n] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)\n```\n\n\u7ee7\u627f\u6a21\u578b\u9700\u8981\u8986\u76d6\u7684\u5185\u5bb9\n\n```python\n    @property\n    def thumb_url(self):\n        print('\u9700\u8981\u8986\u76d6 thumb_url\uff0c\u652f\u6301\u9884\u89c8\u56fe')\n        return\n\n    @property\n    def mediabook_url(self):\n        print('\u9700\u8981\u8986\u76d6 mediabook_url\uff0c\u652f\u6301\u9884\u89c8\u89c6\u9891')\n        return\n\n    @property\n    def videos_model(self):\n        print('\u9700\u8981\u8986\u76d6 model_videos\uff0c\u652f\u6301\u89c6\u9891\u64ad\u653e')\n        return\n```\n\n\n\n",
    "bugtrack_url": null,
    "license": "GNU GPL 3",
    "summary": "Django \u7684\u89c6\u9891\u64ad\u653e\u5668\u7a0b\u5e8f",
    "version": "0.1.10",
    "split_keywords": [
        "play",
        "video"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "29c1c9076d2438c85cf406d84dae545301f0045b32f2acbcc6638fdd5bb23906",
                "md5": "82030d0cc75757829285deccb87ad2b6",
                "sha256": "954d2a2501e2857f51268f7499eb49d414d3ddeb5d5d6fc0d6421f6eff1713ab"
            },
            "downloads": -1,
            "filename": "django_video_play-0.1.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "82030d0cc75757829285deccb87ad2b6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 534053,
            "upload_time": "2023-04-15T13:58:38",
            "upload_time_iso_8601": "2023-04-15T13:58:38.326685Z",
            "url": "https://files.pythonhosted.org/packages/29/c1/c9076d2438c85cf406d84dae545301f0045b32f2acbcc6638fdd5bb23906/django_video_play-0.1.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ef8c9487f8578edb3436e9be4fa6749e20ac34fa0cebff91e1681b912560674b",
                "md5": "618843286583669d8c0bcf3d0515f819",
                "sha256": "c52865c19008342db67330e82f66bfd022d290eaebcfa7f2ebf798384a457f60"
            },
            "downloads": -1,
            "filename": "django_video_play-0.1.10.tar.gz",
            "has_sig": false,
            "md5_digest": "618843286583669d8c0bcf3d0515f819",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 526762,
            "upload_time": "2023-04-15T13:58:42",
            "upload_time_iso_8601": "2023-04-15T13:58:42.633092Z",
            "url": "https://files.pythonhosted.org/packages/ef/8c/9487f8578edb3436e9be4fa6749e20ac34fa0cebff91e1681b912560674b/django_video_play-0.1.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-15 13:58:42",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "django-video-play"
}
        
lds
Elapsed time: 0.17054s