Saravanan666/pypi-org huggingface dataset:
Package: django-versionlog
django-versionlog重要提示:master分支是开发分支，可能处于不稳定或者不可用状态。请通过releases而非master去获取稳定的软件包django-versionlog是为网站开发者提供版本日志快速接入的功能模块，支持django框架，兼容python2和python3。开发者只需在项目中进行简单的配置和维护版本日志目录中的md文件，即可在项目中向用户展示网站版本的更新迭代内容。Overview最新特性代码目录进阶使用Quick Start本节以单页面对话框版本日志为例，展示使用本功能模块最简单的流程：安装版本日志功能模块(内部仓库)：pipinstalldjango-versionlog在项目配置文件中的INSTALLED_APPS内添加version_log：INSTALLED_APPS+=('version_log')在项目的urls.py中配置路由：importversion_log.configasconfigurlpatterns=[...,url(r'^{}'.format(config.ENTRANCE_URL),include('version_log.urls',namespace='version_log')),]创建和初始化对应表：pythonmanage.pymakemigrationsversion_log
pythonmanage.pymigrate收集静态文件&启动项目：pythonmanage.pycollectstatic
pythonmanage.pyrunserver项目运行后，会在项目根目录下创建版本日志文件目录version_logs_md，该目录用于存放开发者网站版本日志文件。注意： 这里假设项目配置变量中BASE_DIR指向工程根目录。添加版本日志文件：每个版本的日志对应于一个md文件，同时md文件命名需与版本号对应。
命名格式可为版本号_版本日期.md或版本号.md。前者会以文件名中的日期作为版本日期，后者会以文件最新修改日期作为版本日期。建议版本号的规则满足正则：[vV](\d+\.){2,4}md， 如：v1.1.md, V1.2.3.md等，命名风格最好统一。
版本文件命名中的日期格式可通过FILE_TIME_FORMAT进行配置，默认为%Y%m%d，如20201104等。开发者需将准备好的版本日志文件都放到version_logs_md文件夹中，1.3.0之后版本模块不再对文件名进行强制校验，所以开发者需保证放入文件夹中的文件都是符合命名规范且可解析的版本日志文件。重启项目：pythonmanage.pyrunserver查看效果：打开链接{SITE_URL}/version_log/即可查看效果，其中{SITE_URL}为开发者网站地址。Support蓝鲸论坛联系我们，技术交流QQ群：社区版QQ交流群：495299374蓝鲸运维开发交流群：878501914BlueKing CommunityBK-CMDB: 蓝鲸配置平台（蓝鲸 CMDB）是一个面向资产及应用的企业级配置管理平台。BK-CI: 蓝鲸持续集成平台是一个开源的持续集成和持续交付系统，可以轻松将你的研发流程呈现到你面前。BK-BCS: 蓝鲸容器管理平台是以容器技术为基础，为微服务业务提供编排管理的基础服务平台。BK-PaaS: 蓝鲸 PaaS 平台是一个开放式的开发平台，让开发者可以方便快捷地创建、开发、部署和管理 SaaS 应用。BK-SOPS: 标准运维（SOPS）是通过可视化的图形界面进行任务流程编排和执行的系统，是蓝鲸体系中一款轻量级的调度编排类 SaaS 产品。BK-JOB: 蓝鲸作业平台(Job)是一套运维脚本管理系统，具备海量任务并发处理能力。Contributing对于项目感兴趣，想一起贡献并完善项目请参阅Contributing Guide。腾讯开源激励计划鼓励开发者的参与和贡献，期待你的加入。License基于 MIT 协议， 详细请参考LICENSE
Package: django-versions
Overviewdjango-versionsallows you to version the data stored in django models seamlessly. To get started all you need to do is to setVERSIONS_REPOSITORIESvariable in your settings and configure the repositories you would like to use, then just subclass your Model fromVersionsModeland start saving data:from django.db import models
from versions.models import VersionsModel

class MyModel(VersionsModel):
    text = models.TextField()InstallationDependenciesMercurial >= 1.5.2Django == 1.1.XInstalling django-versionsIf your are installing from source, you just need to run the following command from the base of thedjango-versionssource tree:python setup.py installIf you want to install the package without checking out the source you should run:pip install django-versions

# OR if you don't have pip installed (you should definitely check out pip)
easy_install django-versionsFor the time being, we need to patch Django to allow us to gain access to the related model from Manager classes. There is a patch included at the root of the source treedjango.patchthat includes the required changes. To patch django, go to the root of your checkout of django 1.1.X and run:patch -p0 < /path/to/django-versions/django.patchAddVERSIONS_REPOSITORIESto your settings file, pointing to the location where you would likedjango-versionsto create and store your model history:VERSIONS_REPOSITORIES = {
     'default': {
          'backend': 'versions.backends.hg',
          'local': '/path/to/my/projects/model/history',
          }
     }Enabling Version ManagementInstall theVersionsMiddleware:MIDDLEWARE_CLASSES = (
    ...
    'versions.middleware.VersionsMiddleware',
    ...
    )Or handle enabling editing of Versioned models manually:from versions.base import revision

@revision.commit_on_success
def my_editing_function(request):
    m = MyModel.objects.get(pk=1)
    m.save()


def my_other_editing_function(request):
    with revision:
        m = MyModel.objects.get(pk=1)
        m.save()
Package: django-version-viewer
Django Version ViewerVersion Viewer provides Django Admins (with appropriate permission)
the ability to view the Python packages and versions used within the project.This tool can be used in several ways. It provides:a template tag which inserts a link onto a template.
Clicking that link opens up a pop up modal displaying installed
Python packages.a DjangoCMS toolbar entry. When clicked, a popup will display installed
Python packages.a CSV export of installed Python packages.a queryable endpoint that displays installed Python packages.You may also configure which users have access to the link and endpoint.InstallationTo install the Django Version Viewer, simply:pip install django-version-viewerAdd the following toINSTALLED_APPSinsettings.pyINSTALLED_APPS = [
    'django_version_viewer'
]Add django_version_viewer urls and extendadmin/index.htmlDjango Version Viewer needs to extend theadmin/index.htmland append it's urls to yoururls.py. In yoururls.pyadd:admin.site.index_template = 'admin/custom_index.html'
admin.autodiscover()

urlpatterns = [
    ...
    url(r'^django_version_viewer/', include('django_version_viewer.urls')),
    ...
]

# Note that you can now make a GET request to the route `r'^django_version_viewer/'` to see
# a list of your app's installed pip dependencies returned in JSON.In yourtemplates/admin/dir, create acustom_index.html.<!-- custom_index.html -->
{% extends "admin/index.html" %}

{% load i18n pip_version_viewer_tags %}

{% block content %}
{% show_pip_package_versions %}
{{ block.super }}
{% endblock %}Django CMS integrationIf Django CMS is installed, a new menu item will be added to the CMS Toolbar
Page Menu that will allow opening the version viewer popup.PermissionsYou can set your own access permissions on the template tag and route by
defining your ownAccessorclass. This class must have aallow_accessmethod that returns aboolean. By defualt, django_version_viewer only
allows superusers access to the route and template tag.# Django Version Viewer settings:
ACCESSOR_CLASS_PATH = 'mypathto.my.AccessorClass'

# the default class only allows superusers access
django_version_viewer.mixins.SuperuserAccessorRunning Tests# in a virtualenv
pip install -e .[testing]
pip install django==2.2.27
flake8 .
ENABLE_DJANGOCMS=False coverage run ./example22/manage.py test django_version_viewerUsing the Example ProjectAn example project is provided to demonstrate the project.# in a virtualenv
cd example22/
pip install -r requirements.txt
./manage.py migrate
./manage.py createsuperuser
./manage.py runserver

# Run without DjangoCMS
ENABLE_DJANGOCMS=False ./manage.py runserver
Package: django-vertical-multi-columns
Django-Vertical-Multi-Columns (VMC) is a reusable Django application allowing you to easily display a list of items in vertically sorted side-by-side columns rather than in one long list. It supports all JSON data types … string, number, boolean, object, array, and null/empty.RequirementsPython: 3.7, 3.8, 3.9Django: 2.2, 3.0, 3.1, 3.2InstallationInstall using pip:pipinstalldjango-vertical-multi-columnsAdd ‘vertical_multi_columns’ to your INSTALLED_APPS setting.INSTALLED_APPS=[...'vertical_multi_columns',]In your Django settings, you can optionally specify a default number of columns to be generated.VERTICAL_MULTI_COLUMNS=[{NUMBER_OF_COLUMNS=3}]Why You May Need ThisDisplaying a long list of items in a template is quite easy.{% for row in rows %} ... {{row.<field>}} ... {% endfor %}This comes at a cost for your end user though. Searching through a long list can test someone’s patience if it requires a lot of scrolling or paging.What VMC DoesVMC views let you generate rows that can easily be displayed in multiple side-by-side columns in your templates. The columns retain your sort order so your users can still scan the data in a natural up-and-down way. And because the items are spread across the screen, your content takes  less vertical space, reducing the amount of scrolling/paging a user must do.You specify the number of columns you want generated.VMC views are sub-classes of ListView so all its capabilities are still available to you.View OptionsThere are 3 views available.EvenViewspreads your data across the number of columns you specify, keeping the length of the columns as even as possible.CriteriaViewlets you provide a list of functions, one per column, that VMC uses to determine which column an item will be placed in.DefinedViewlets you provide the columns you want displayed. VMC does the rest.DocumentationFor more extensive document see thedocsfolder or read it inreadthedocs.Comments & SupportIf you have questions about usage or development you can open an issue onGitHub.  You can also contactSusan Wrightdirectly.Special ThanksToGraham Wrightfor his guidance and support in publishing this.
Package: django-vestlus
Django Vestlusvestlusis a django chat app with support for private and public channels.DependenciesUse ofvestlusrequires:django-polymorphic: used to handle inheritance between message models.django-crispy-forms: used for better formatting of forms in templates.django-restframework: used to provide REST api support.django-haystack: used to handle searching across channels and messages.Those apps will need to be installed in theINSTALLED_APPStuple of your django project.ModelsThe app is split into three main models:channel: channels allow for group conversations. Any message sent to a channel
is visible to every member of the channel. Channels can be either public or private.membership: memberships allow users to join, leave, and administer channels.
Owners and admins can manage channel memberships.message: all messages are private (self to self); private (shared with somebody else); orInstallationAddvestlusto yourINSTALLED_APPSsetting like this::INSTALLED_APPS=[# other apps...'vestlus',]Alternatively, you can also add this app like so::INSTALLED_APPS=[# other apps...'vestlus.apps.VestlusConfig',]Include the polls URLconf in your project urls.py like this::path('chat/',include('vestlus.urls',namespace='vestlus')),2.1. Optionally, you can also add the api endpoints in your project urls.py like so::path('api/',include('vestlus.api',namespace='vestlus_api')),Runpython manage.py migrateto create the app models.Start the development server and visithttp://127.0.0.1:8000/admin/to start a add chat groups and messages (you'll need the Admin app enabled).Visithttp://127.0.0.1:8000/chat/to use the app. You should have the following urls added to your url schemes::http://127.0.0.1:8000/chat/
    http://127.0.0.1:8000/chat/channels/
    http://127.0.0.1:8000/chat/channels/new/
    http://127.0.0.1:8000/chat/channels/<slug:slug>
    http://127.0.0.1:8000/chat/channels/<slug:channel>/messages/<slug:slug>/delete
    http://127.0.0.1:8000/chat/channels/<slug:slug>/delete
    http://127.0.0.1:8000/chat/channels/<slug:slug>/messages/new/
    http://127.0.0.1:8000/chat/memberships/
    http://127.0.0.1:8000/chat/memberships/<slug:slug>
    http://127.0.0.1:8000/chat/memberships/<slug:slug>/new/
    http://127.0.0.1:8000/chat/messages/
    http://127.0.0.1:8000/chat/messages/<slug:slug>
    http://127.0.0.1:8000/chat/messages/<slug:slug>/delete5.1. If you've included the api urls as well, you can visit the endpoints by visiting::http://127.0.0.1:8000/api/channels
    http://127.0.0.1:8000/api/channels/<pk>
    http://127.0.0.1:8000/api/channels/<uuid>
    http://127.0.0.1:8000/api/channels/<pk>/messages
    http://127.0.0.1:8000/api/channels/<uuid>/messages
    http://127.0.0.1:8000/api/channels/me
    http://127.0.0.1:8000/api/group-messages
    http://127.0.0.1:8000/api/group-messages/<pk>
    http://127.0.0.1:8000/api/memberships
    http://127.0.0.1:8000/api/memberships/<uuid>
    http://127.0.0.1:8000/api/messages
    http://127.0.0.1:8000/api/messages/<pk>
    http://127.0.0.1:8000/api/messages/notesLicensevestlusisBSD-Licensed.Built withdjango-clite.Developed and maintained byLeo Neto
Package: django-vi-address
django-vi-addressThis is a Django project about provinces/cities, districts, wards of Vietnam. The project provides a model to store data about provinces/cities, districts and wards of Vietnam.RequirementsPython >= 3.6InstallationCreate a new project
::
mkdir new_project && cd new_projectCreate a new virtual environment for this project
::
virtualenv venv
source venv/bin/activateInstall usingpip::(venv) $ pip install django-vi-addressQuick startAdd "rest_framework", "vi_address" to your INSTALLED_APPS setting like this::
::INSTALLED_APPS = [...
 'rest_framework', # new
 'vi_address', # new
 ...]Include the "vi_address" URLconf in your project urls.py like this::
::your_project/urls.pyfrom django.urls import path, include # newurlpatterns = [
...
path('api/address/', include('vi_address.urls')), # new
]Create the models.
::
python manage.py migrateInsert data cities of Vietnam.
::
python manage.py insert_data --datatype=cityInsert data districts of Vietnam.
::
python manage.py insert_data --datatype=districtInsert data wards of Vietnam.
::
python manage.py insert_data --datatype=wardEndpointGet cities list
::
/api/address/citiesGet districts list of a city
::
/api/address/city/{city_id}Get wards list of a district
::
/api/address/district/{district_id}
Package: django-video-encoder
Simple integration with video encoding backends.For now only the remote zencoder.com is supported.Upload videos and asynchronously store the encoded videos and
the generated thumbnails.RequirementsDjango 2.2+ and Celery to asynchronously run the encoding tasks.UsageYou will need to add the following to your django settings:Adddjango_video_encodertoINSTALLED_APPSAdd generic relation fields to your video modelsformats = GenericRelation(Format)
thumbnails = GenericRelation(Thumbnail)Set theDJANGO_VIDEO_ENCODER_THUMBNAIL_INTERVALAdd the desired formats, for exampleDJANGO_VIDEO_ENCODER_FORMATS = {
    "H264 (HD)": {"video_codec": "h264"},  # full resolution if not specified
    "H264": {"video_codec": "h264", "width": 720, "height": 404},
    "VP9 (HD)": {"video_codec": "vp9"},
    "VP9": {"video_codec": "vp9", "width": 720, "height": 404},
}And specific settings using the zencoder backend:AddZENCODER_API_KEYandZENCODER_NOTIFICATION_SECRETYou may also specifyZENCODER_REGION(default: europe) to the most suitable for youDJANGO_VIDEO_ENCODER_FORMATSis a dictionary of{format_label: format_kwargs}whereformat_kwargsis a
dictionary requiringvideo_codecand where all arguments are
added to the encoding job POST. You can define width, height and
much more see theZencoder API.TestsRun tests withtoxMiscTo not be confused with the archivedtheonion/django-zencoderwhich is installed aszencoderSee also similar projectescaped/django-video-encoding
Package: django-video-play
说明Django 的视频播放器程序，现在主要是用于视频添加标记。打包cdD:\git_ldsxp\lds_spider\lds_site\django_video_play&&pythonsetup.pysdist安装# 本地安装pipinstalldjango_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)继承模型需要覆盖的内容@propertydefthumb_url(self):print('需要覆盖 thumb_url，支持预览图')return@propertydefmediabook_url(self):print('需要覆盖 mediabook_url，支持预览视频')return@propertydefvideos_model(self):print('需要覆盖 model_videos，支持视频播放')return
Package: django-video-transcoding
django-video-transcodingSimple video transcoding application for Django FrameworkInstallationSystem requirementsIn case of latest Ubuntu LTS (20.04):ffmpeg-4.x$>sudoaptinstallffmpegmediainfo$>sudoaptinstallmediainfoRabbitMQ$>sudoaptinstallrabbitmq-serverdjango-video-transcodingpipinstalldjango-video-transcodingConfigure DjangoEdit your projectsettings.pyINSTALLED_APPS.append('video_transcoding')EnvCommon env variables used in django web server and celeryDJANGO_SETTINGS_MODULE=YOUR_PROJECT.settings
VIDEO_TRANSCODING_CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:15672/Web-server-only env variables:VIDEO_DOWNLOAD_SOURCE=0
VIDEO_EDGES='http://edge-1.localhost,http://edge-2.localhost'Celery-only env variables:VIDEO_TEMP_DIR=/tmp
VIDEO_TRANSCODING_CELERY_CONCURRENCY=2
VIDEO_ORIGINS='http://origin-1.localhost/video,http://origin-2.localhost/video'Start celery worker$>celeryworker-Avideo_transcoding.celeryDevelopDevelopment environment quickstart guideTestssrc/manage.py testType checking$> pip install mypy django-stubs
$> cd src && /data/dvt/virtualenv/bin/dmypy run -- \
   --config-file ../mypy.ini -p video_transcodingTBD:travis-cisphinx docs - autodoc + manualcoveragetypingbadgesvideo hosting demo project with docker-compose, nginx and player demoProductionGraceful shutdownif you are running transcoder in docker, make sure that celery master process
has pid 1 (docker will send SIGTERM to it by default)when using separate celery app, send SIGUSR1 from master to workers to trigger
soft shutdown handling
(seevideo_transcoding.celery.send_term_to_children)
Package: django-view-acl
=======================Django Views ACL plugin=======================Views ACL plugin is a Django app that provides:- Automatic permissions generation for django views, based on urlpatterns defined in urls.py- Control Access to Django ViewsViews ACL is flexible plugin, it allows to define list of views,for which permissions will be generated, or define excluded list.Permission can be assigned for user by admin page.By default if permission for view is generated, the user doesn't have accessuntil the admin won't give permission for the user.Quick start-----------1. Add "view_acl" to your INSTALLED_APPS setting::INSTALLED_APPS = (...'view_acl',)2. Include 'view_acl.middleware.CustomViewProcessMiddleware' to MIDDLEWARE_CLASSES.3. Add ACL_ALLOWED_VIEWS variable to settings.py.Views ACL plugin generate permission for all views defined in ACL_ALLOWED_VIEWS.Only those views should be checked for access::ACL_ALLOWED_VIEWS=('polls.*',)In this case, permissions will be generated for all views from polls app.4. You can also define ACL_EXCLUDED_VIEWS in settings.py::ACL_EXCLUDED_VIEWS = ('django.*',)5. If you want to change default name and codename prefix for permission,define ACL_CODE_PREFIX and ACL_NAME_PREFIX  variables in settings.py::ACL_NAME_PREFIX = 'Myite ACL 'ACL_CODE_PREFIX = 'mysite_acl_view'6. Call method for automatic permissions generation based on urlpatterns in urls.py::view_acl.autodiscover()7. Assign view permissions to user by admin page.Default permission name:"ACL app.module.view"
Package: django-view-as
A simple middleware which allows a superuser to view the site on behalf of another user.This idea originated within Disqus, and has served quite well in helping debug user problems.InstallInstall the package:pip install django-view-asAdd the middleware:MIDDLEWARE_CLASSES = (
        'viewas.middleware.ViewAsMiddleware',
)Register the application within INSTALLED_APPS:INSTALLED_APPS = (
        'django.contrib.auth',
        'django.contrib.sessions',
        'viewas',
)Make sure the application loader is available for templates:TEMPLATE_LOADERS = (
        'django.template.loaders.app_directories.Loader',
)UsageLoad any page with an html response type, hit the tilda key (~), and you’ll see a new toolbar at the bottom of the page. Enter a username to change who you’re viewing the site as.Configure the menu toggle keyThe following configuration option could be set in your settings.py to change the default keystroke to toggle the “View as” menu. Its value is the javascript key number that will be matched in thekeydownevent handler.VIEWAS_TOGGLE_KEY = 119  # F8If you need more complex behavior (such as not binding based on the superuser attribute), check out the source the middleware is designed to be extensibile.
Package: django-viewclass-mixins
Provides some common mixin patterns for Django’s View classes.InstallationRunpip install django-viewclass-mixinsView Mixins###LoginMixin
Ensures the view is being requested by an authenticated user or redirects to the login page. It behaves the same as the function decoratorlogin_required.###StaffRequiredMixin
Ensures the view is being request by an authenticated user that is marked as staff.###SuperuserRequiredMixin
Ensures the view is being request by an authenticated user that is marked as a superuser.###OwnershipMixin
A mixin to single-object views. Ensures the view is by requested by the owner of the requested object.###DeactivateMixin
A mixin to the DeleteView. Instead of deleting an object it will mark it as inactive instead.###FilterListMixin
A mixin to the ListView. It will apply filters from the URL querystring to the underlying QuerySet before the list is returned.###ModelFormSetMixin
A mixin to the CreateView and UpdateView. It take a list of FormSets and validates and saves them along with the main model.###HttpCacheMixin
A mixin to any View. It has methods for setting HTTP cache headers likeCache-Control,Vary,ETag, andLast-Modified.###CorsMixin
A mixin to a Django Rest Framework View. It sets permissive CORS headers and handles the OPTIONS response.
Package: django-view-decorator
Django View Decoratordjango-view-decoratoris decorator aimed at bringing locality of behaviour to the connection between a URL and a view in Django.Table of ContentsInstallationLicenseInstallationpip install django-view-decoratorDevelopmentgit clonecd django-view-decoratorpip install hatchhatch run tests:covhatch run tests:typecheckLicensedjango-view-decoratoris distributed under the terms of theMITlicense.
Package: django_view_dispatch
Usagefromdjango.conf.urlsimportpatterns,urlfromdjango_view_dispatchimportdispatch,dispatch_strictfrom.importviewsurlpatterns=patterns('',url(r'^some_url/$',dispatch(get=views.my_view,post=views.my_view_for_post),name='events_json'),# you can get any keyword argument you want to specify any http verburl(r'^some_url/$',dispatch(get=views.my_view,put=views.create,foo=views.another_view,bar=views.baz),name='events_json'),# by default, if a request has an HTTP verb that hasn't been specified in# the dispatch() function, it will be redirected to the GET view if presenturl(r'^some_url/$',dispatch(get=views.will_get_everything_thats_not_put,put=views.stuff),name='events_json'),# you can change this behavior this wayurl(r'^some_url/$',dispatch(get=views.stuff,put=views.will_get_everything_thats_not_get,default="put"),name='events_json'),# if "default" is set to None, this behavior is disabled and and# HttpResponseNotAllowed will be returnedurl(r'^input/$',dispatch(post=views.my_view_for_post,default=None),name='events_json'),# behave like @require_POST# a more explicit way to do that is provided with "dispatch_strict" which behave exactly like dispatch with default set to Noneurl(r'^input/$',dispatch_strict(post=views.my_view_for_post),name='events_json'),)Installationpip install django_view_dispatchWhySomething that you learn as you progress in programming is that
conditional are “bad” (as in “should be avoided”) because theyincrease
the complexity of your
codeand are a
potential source of bugs.For example, mixing POST and GET handling in the same view can be a good
terrain for bug and for a more complex code while spliting it gives aKISSsituation where
you have two views that do only one thing and do it well.Django doesn’t provide an easy nor standard way to do this so this
library is trying to address that.Can I use string like in the url function?No, since django 1.8, using string to target views in patternsis
depreciated,
therefor there is no point in supporting this feature.Also, to be honest, I have not idea on how to do that and haven’t really
made any research about it. That would also make the code way more
complex.Running testspip install pytest
py.test test.pyLicenceBSD.