django-video-play


Namedjango-video-play JSON
Version 0.1.8 PyPI version JSON
download
home_pagehttps://github.com/ldsxp
SummaryDjango 的视频播放器程序
upload_time2022-08-06 06:55:04
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/3f/ef/fb84c4303c12c7b57374094ef3065c3746ca8af6f3de89aaebbacd525b53/django_video_play-0.1.8.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.8",
    "split_keywords": [
        "play",
        "video"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "6c943313b548bfceaac001a1fca725e5",
                "sha256": "efd15d80061ef947f107869e50742cce2a96ab99d2c87c33f065c1c01ae22923"
            },
            "downloads": -1,
            "filename": "django_video_play-0.1.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6c943313b548bfceaac001a1fca725e5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 534035,
            "upload_time": "2022-08-06T06:55:00",
            "upload_time_iso_8601": "2022-08-06T06:55:00.377725Z",
            "url": "https://files.pythonhosted.org/packages/71/15/0e88c105bc050724ce0817f5dc97b388aba7e395a8968317feb311863691/django_video_play-0.1.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "15b8a64e5f1536a83efdde1d4f4d1bee",
                "sha256": "17f5af315eccfe5ade28b1216f55b277ff41f66d7e70eb94246aa830c815f98f"
            },
            "downloads": -1,
            "filename": "django_video_play-0.1.8.tar.gz",
            "has_sig": false,
            "md5_digest": "15b8a64e5f1536a83efdde1d4f4d1bee",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 526559,
            "upload_time": "2022-08-06T06:55:04",
            "upload_time_iso_8601": "2022-08-06T06:55:04.067368Z",
            "url": "https://files.pythonhosted.org/packages/3f/ef/fb84c4303c12c7b57374094ef3065c3746ca8af6f3de89aaebbacd525b53/django_video_play-0.1.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-08-06 06:55:04",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "django-video-play"
}
        
lds
Elapsed time: 0.51147s