Saravanan666/pypi-org huggingface dataset:
Package: django-zerodowntime
# django-zerodowntime[![CircleCI](https://circleci.com/gh/rentlytics/django-zerodowntime.svg?style=svg)](https://circleci.com/gh/rentlytics/django-zerodowntime)Management commands to help Django users build & deploy their projects with low interruption for their users.  This method is often called Zero Downtime Continous Delivery, or ZDCD.Database schema migrations are the most common cause of application downtime during a deployment.  Some operations like adding a NULLed column or an entirely new table do not affect the application as it continues to run.  Other operations such as removing/renaming a column/table can cause the deployed code to fail in unexpected ways.  Ultimately you will have to remove or rename existing schema, but most deployments do not require downtime so the code can be updated without interrupting users.This project was developed for use at [Rentlytics](http://rentlytics.com), [here is a copy](./Rentlytics-ZDCD.pdf) of the presentation which brought this project to life.## Commands###check_migrationsChecks all pending migrations against the DEFAULT Django database for zero downtime deployment compatibility.  A migration is considered compatible when it contains only:CreateModel,AddField, orAlterModelOptionsoperations.  An exception is whenAddFieldis used to create a new column with a default value provided.  Providing a default value requires filling all existing rows with the value, which can be an expensive operation.###insert_git_hooksAdds or modifies the gitcommit-msghook at.git/hooks/commit-msgto executecheck_migrationsbefore each commit is saved to git’s history.  Whencheck_migrationsexits with a non-zero exit code, an error message will be output listing the incompatible migration operations.  In the event that incompatible migrations are to be allowed, you can add[allow-unsafe-migrations]to your commit message, which skips this check.## Usage Guide
* [Heroku + CircleCI](./examples/heroku/)History0.1.0 (2016-06-02)First release on PyPI.
Package: django-zeromigrations
As the project grows up, the number of migration files increases over
time. As a result, running them can consume a lot of time, specifically
when you are running your tests.zeromigrationsis a command to reset migration files. It basically runs 4 commands:migrate--fake{app_name} zerofor each app.Remove old migration files, as new migrations is going to be
generated.makemigrationsto generate initial migration file.migrate--fake-initialto fake generated initial files.But besides that, this command can make a backup to restore in case of any failure.Notethatmigrate--fakecommand only runs for your own apps and
django apps likecontenttypeand third-party apps are excluded.InstallationFirst install the package:pip3installdjango-zeromigrationsThen add it to yourINSTALLED_APPS:INSTALLED_APPS=[..."zero_migrations"]UsageFirst, run the command:python manage.py zeromigrations --backup-path=<YOUR_PATH>

I suggest to make a backups from both your migrations and django_migrations table (just in case).
1- make backup
2- restore last backup
3- just proceedIf you choose1- make backup, it would make a backup then zero
migrations.If you choose2- restore last backup, it tries to restore the latest
backup that can be found. If not backup found, it would raise an error.If you choose3- just proceed, it assumes that you already have your
own backup and start setting migrations zero.Options--backup-path: The absolute path of the dir that you want to store backups in. It should have–backup-path=<PATH>format. The default path is inside of zeromigrations app dir.--use-fake-zero: By default, deleting migrations records from DB happens directly using ORM. With this flag, you can set to usepython3 manage.py migrate app –fake zero(note that it has performance issue).
Package: django-zeropass
## Aboutdjango-zeropass allows users to login to your site without a password.A user enters their email address.
If a matching email is found in yourUsermodels, an email is
dispatched that contains a link with a token, that when clicked, is
verified and if successful the user is logged in.[![Build Status](https://travis-ci.org/obscuremetaphor/django-zeropass.png)](https://travis-ci.org/obscuremetaphor/django-zeropass)[Read the documentation][0].[0]:https://django-zeropass.obscuremetaphor.co.uk/
Package: django-zesty-metrics
Introductiondjango-zesty-metricsis a middleware suite that usesstatsdto
report important metrics to a StatD server.Out of the box, it will track:response times individually by view, and in aggregateaggregate user activity dataWith some minor configuration, it will track:individual user activity dataarbitrary metricsRequirementsDjango>= 1.4statsd== 1.0 (StatsD client;GitHub <https://github.com/jsocol/pystatsd>)Graphite server(docs)Statsd server(blog post)InstallationInstall withpip install django-zesty-metrics.Alternately, clonethe git repositoryand executepython setup.py installwithin.ConfigurationIn your Django settings:Addzesty_metricsto theINSTALLED_APPSAddzesty_metrics.middleware.MetricsMiddlewaretoMIDDLEWARE_CLASSESSet the following, as needed:
-STATSD_HOST, defaultlocalhost-STATSD_PORT, default8125-STATSD_PREFIX, defaultNone-ZESTY_TRACKING_CLASSES, default('zesty_metrics.tracking.UserAccounts',)Runsyncdb(ormigrateif you use South).Set up a cron job to run thereport_metricsdjango-admin.py
command regularly. At least once a day, but you can update it as often
as you want. This command reports metrics from the trackers that you
configure inZESTY_TRACKING_CLASSES.If you want to send metrics from the client-side, hook up the default URLs in
yoururls.py:urlpatterns = patterns(
    '',
    url(r'^metrics/', include('zesty_metrics.urls')),
    )AcknowledgementsLots of ideas were taken fromdjango-statsdanddjango-munin.CHANGELOG0.3.1:
- Added missing migrations and management commands.0.3:
- Added tests! Many things that didn’t work now work.
- Added DailyActivityRecord for tracking daily activity.0.2: Added latency tracking, myriad bug-fixes.0.1.1: Fixed “NO VALUE” error inreport_metricscommand when values were
pulled from the cache.0.1: Initial release
Package: django-zhanibek-polls
Polls is a simple Django app to conduct Web-based polls. For each
question, visitors can choose between a fixed number of answers.Detailed documentation is in the “docs” directory.Quick startAdd “polls” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'polls',
]Include the polls URLconf in your project urls.py like this:path('polls/', include('polls.urls')),Runpython manage.py migrateto create the polls models.Start the development server and visithttp://127.0.0.1:8000/admin/to create a poll (you’ll need the Admin app enabled).Visithttp://127.0.0.1:8000/polls/to participate in the poll.
Package: django-zip-code-api
Zip Code APIZip Code API is an API for zip codes (postal codes) and addresses requesting. Optimized for polish addresses, however might work as universal tool.RequirementsZip Code API requires Python 2.7 or Python 3.3 or newer and Django 1.11.InstallationTo install zip-code-api usingPIPrun command:pip install django-zip-code-apiYou can also install it directly fromGITrepo:pip install https://gitlab.com/integree/internal/zip_code_api.gitor, if you need install from branch:pip install https://gitlab.com/integree/internal/zip_code_api.git@branch-nameYou can also clone project to your local directory:cd \serwer\www
mkdir zip_code_api
git clone https://gitlab.com/integree/internal/zip_code_api.git zip_code_apiThen you can install it usingsetup.py:python setup.py installor install the package with a symlink, so that changes to the source files will be immediately reflected:python setup.py developAuthorsMade with love byIntegree Bussines Solutionsfrom Warsaw, Poland
Package: django-zipfile
A subclass ofzipfile.Zipfilethat works with Django templates.Usage:from zipfile import ZIP_DEFLATED
from django_zipfile import TemplateZipFile

def myview(request, object_id):
    obj = get_object_or_404(MyModel, pk=object_id)
    context = {
        'object': obj
    }
    response = HttpResponse(mimetype='application/octet-stream')
    response['Content-Disposition'] = 'attachment; filename=myfile.zip'

    container = TemplateZipFile(response, mode='w', compression=ZIP_DEFLATED, template_root='myapp/myzipskeleton/')

    container.write_template('mimetype')
    container.write_template('META-INF/container.xml')
    container.write_template('chapter1.html', context=context)

    container.close()
    return responseYou can also specify multiple roots for your templates:container = TemplateZipFile(response, mode='w', compression=ZIP_DEFLATED, template_root=['myapp/myzipskeleton/override/', 'myapp/myzipskeleton/default/'])as well as multiple templates when you add files:container.write_template(['override.html', 'default.html'], filename="chapter1.html")TemplateZipFile will look for templates in the specified order, first by root, then by template name. For example:myzipfile = TemplateZipFile(response, mode='w', compression=ZIP_DEFLATED, template_root=['override/', 'default/'])
myzipfile.write_template(['two.txt', 'one.txt'], filename='myfile.txt')

# Will use the first existing template from ['override/two.txt', 'override/one.txt', 'default/two.txt', 'default/one.txt']If none of the templates can be found,write_templatewill raise a TemplateDoesNotExist error.You can specify a file as optional withoptional=Truemyzipfile.write_template(['two.txt', 'one.txt'], filename='myfile.txt', optional=True)Doing so will silently swallow the TemplateDoesNotExist exception.
Package: django-zipgallery
This package is for creating galleries from .zip file with images - no need to add image one by one.Internal image names are auto-generated from image file names - keep in mind while improving your SEOQuick startDownload package viapip installdjango-zipgalleryAdd “zipgallery” to your INSTALLED_APPSRunpython manage.py migrateto create gallery models in databaseStart running your development and visitadmin panelto add new galleryCreated byMateusz Urbanczyk a.k.a TomatosoupBased onMezzaninesolution for uploading zip to gallery.
See LICENSE for more
Package: django-zipview
Django ZipViewA base view to zip and stream several files.Installationpip install django-zipviewUsage and examplesTo create a zip download view:Extend BaseZipViewimplementget_filesThat's itTheget_filesmethod must return a list of Django's File objects.Example:fromzipview.viewsimportBaseZipViewfromemailsimportEmailclassAttachmentsArchiveView(BaseZipView):"""Download at once all comments for a review."""defget_files(self):emails=Email.objects\.filter(user=self.request.user)\.exclude(attachment__isnull=True)return[email.attachment.fileforemailinemailsifemail.attachment.name]View configurationBy default, the downloaded file is nameddownload.zipyou can set a custom name
by setting thezipfile_nameparameter.classZipView(BaseZipView):zipfile_name='toto.zip'In case you need to dynamically set the filename, you can override theget_archive_namemethod. It takes the request as a parameter.defget_archive_name(self,request):importdatetimetoday=datetime.date.today()return'archive_{:%Y%m%d}.zip'.format(today)CompatibilityCurrent supported django versions are 2.2, 3.1 and 3.2.TestingDjango ZipView usestox, the testing automation
tool, to run tests.To launch tests:pip install -r requiments/test.txt
toxAuthorCrafted with love byThibault Jouannic. You can
contact him forPython / Django freelancing
gigs.
Package: django-zms-news
Django Simple News============================Installing:pip install django_simple_newsIn settings:INSTALLED_APPS = (...'ckeditor','new',...)in urls.pyurl(r'^seo_name_for_news/', include('new.urls')),Configure CKeditorhttps://github.com/shaunsephton/django-ckeditor#installationsettings.py# ckeditor configCKEDITOR_UPLOAD_PATH = MEDIA_ROOT + '/editor'CKEDITOR_CONFIGS = {'default': {'toolbar': [[ 'Source','-','Save','-', 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo', '-', 'Find','Replace','-','SelectAll'],[ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] ,'/',[ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ],[ 'Link','Unlink' ],[ 'Image','Table','HorizontalRule','SpecialChar' ],[ 'Format'],[ 'TextColor','BGColor', '-', 'Styles','Format','FontSize' ],[ 'Maximize', 'ShowBlocks','-','About' ],],'format_tags': 'p;h1;h2;h3;h4;h5;h6;pre;address;div',},}Configure easy-thumbnails for each template# easy-thumbnails confighttps://pypi.python.org/pypi/easy-thumbnails/1.2THUMBNAIL_ALIASES = {'': {'new_detail': {'size': (50, 50), 'crop': True},'new_list': {'size': (152, 152), 'crop': True},'new_index': {'size': (960, 1760), 'crop': False, 'upscale': True},},}You also can overwrite templates:/templates/new/new_detail.html for new detail/templates/new/news_index.html for a list of news/templates/new/news_list.html to get a list of news without a context to get include in custom templates.
Package: django-zombodb
Easy Django integration with Elasticsearch throughZomboDBPostgres Extension.
Thanks to ZomboDB,your Django models are synced with Elasticsearch after every transaction! Searching is also very simple: you can make
Elasticsearch queries by just calling one of the search methods on your querysets. Couldn’t be easier!DocumentationThe full documentation is athttps://django-zombodb.readthedocs.io.RequirementsPython: 3.5, 3.6, 3.7Django: 2.0, 2.1, 2.2PostgresandElasticsearch: same asZomboDB current requirementsQuickstartInstall ZomboDB (instructionshere)Install django-zombodb:pip install django-zombodbAdd theSearchQuerySetand theZomboDBIndexto your model:fromdjango_zombodb.indexesimportZomboDBIndexfromdjango_zombodb.querysetsimportSearchQuerySetclassRestaurant(models.Model):name=models.TextField()objects=models.Manager.from_queryset(SearchQuerySet)()classMeta:indexes=[ZomboDBIndex(fields=['name',]),]Make the migrations:python manage.py makemigrationsAdddjango_zombodb.operations.ZomboDBExtension()as the first operation of the migration you’ve just created:importdjango_zombodb.operationsclassMigration(migrations.Migration):dependencies=[('restaurants','0001_initial'),]operations=[django_zombodb.operations.ZomboDBExtension(),# <<< here]Run the migrations (Postgres user must be SUPERUSER to create the ZomboDB extension):python manage.py migrateDone! Now you can make Elasticsearch queries directly from your model:Restaurant.objects.filter(is_open=True).query_string_search("brazil* AND coffee~")Full ExampleCheckhttps://github.com/vintasoftware/django-zombodb/tree/master/exampleRunning TestsYou need to have Elasticsearch and Postgres instances running on default ports. Also, you need ZomboDB installed. Then just do:python runtests.pySecurityPlease checkSECURITY.rst.
If you found or if you think you found a vulnerability please get in touch via adminATvinta.com.brPlease avoid disclosing any security issue on GitHub or any other public website. We’ll work to swiftly address any possible vulnerability and give credit to reporters (if wanted).Commercial SupportThis project is maintained byVinta Softwareand other contributors. We are always looking for exciting work, so if you need any commercial support, feel free to get in touch:contact@vinta.com.brChange Log0.3.0 (2019-07-18)Support for custom Elasticsearch mappings throughfield_mappingparameter onZomboDBIndex.Support tolimitparameter on search methods.0.2.1 (2019-06-13)Dropped support for Python 3.4.Added missing imports to docs.0.2.0 (2019-03-01)Removed parameterurlfromZomboDBIndex. This simplifies the support of multiple deployment environments (local, staging, production), because the ElasticSearch URL isn’t copied to inside migrations code (seeIssue #17).0.1.0 (2019-02-01)First release on PyPI.
Package: django-zookeeper-locks
Django Zookeeper LocksAboutDjango Zookeeper
Locksprovides a
utils for using Zookeeper locks through zookeeper inDjangoapplications.Installpipinstalldjango-zookeeper-locksUsageRegister app inINSTALLED_APPSand define following settings:ZOOKEEPER_APP_NAMESPACE='some-unique-app-name'ZOOKEEPER_HOSTS=['10.32.96.201:2181']Usage example:lock=Lock('my-lock-{object_id}')withlock(object_id=123):print('so alone')try:withlock(object_id=123,timeout=9):print('so alone')exceptLockTimeout:print('unable to lock after waiting for 9s')try:withlock(object_id=123,blocking=False):print('so alone')exceptLocked:print('unable to lock immediately')ExtrasMigrationsThis package defines its version of the data migration command -migrate_with_zookeeper. Thanks to this command it is possible to quickly
and correctly perform data migration process in applications running
simultaneously on many different hosts and using the same database. The
command can be used independently or as a base class for the migrate
command in your own application. The__init__method of the defined
class accepts the optionallockargument, which allows you to define
your ownzookeeper_locks.locks.Lockobject to protect the critical section
of the migration.LicenseThe Django Zookeeper Locks package is licensed under theFreeBSD
License.
Package: django-zotero
django-zoterois adjangoapp that provides a generic formset to tag anydjangoobject withZoterometadata. Tagged object are easily exportable toZoteroin one click.InstallationFirst of all, it is needed to havepipinstalled on your system. It is strongly recommended to installvirtualenvandvirtualenvwrapperto take the most advantage ofpip.To installpip, go tohttp://www.pip-installer.org/en/latest/installing.htmlTo installvirtualenv, go tohttps://pypi.python.org/pypi/virtualenvTo installvirtualenvwrapper, go tohttp://virtualenvwrapper.readthedocs.org/en/latest/install.html#basic-installationNow installdjango-zotero:$ pip install django-zoteroUsageTo usedjango-zotero, follow the next steps:Django settings: add the app name to INSTALLED_APPS in settings.py:INSTALLED_APPS = (
    #...,
    'zotero',
)Administration side: add the following code to admin.py:Import the class TagInlineAdmin[1]:from zotero.admin import TagInlineAdminFor each model you wish to tag, add to its admin class:inlines = (
    #...,
    TagInlineAdmin,
)User side: add the following code:In views.py:Import the function get_tag_formset[2]:from zotero.forms import get_tag_formsetIn the view that manages the tagged object, instanciate the formset and save it:tag_formset = get_tag_formset(
    obj=form.instance,
    data=request.POST,
    show_labels=False,
    labels={
        'item_type': 'Document type',
        #...,
    }
)
#...
tag_formset.save()In the template that manages the object:Import the template tag zotero_inline_tags[3]:{% load zotero_inline_tags from zotero_inline_extras %}Render the formset:{% zotero_inline_tags formset %}In the template that renders the object:Import the template tag zotero_tags[4]:{% load zotero_tags from zotero_tags_extras %}RenderZoterometadata:{% zotero_tags
    object=document
    vocabulary="dc"
    output_method="meta" %}[1]TagInlineAdmin is an inline class ready to be added as inline of other admin class.[2]get_tag_formset is a function that gets the formset with Zotero tags for an object. It is based on a generic formset factory and takes four arguments:obj: object to tagdata: data to instanciate the content of the formsetshow_labels: if true, show the labels as headers on the top of the formset; if false, show the labels as placeholderslabels: set alternative labels - default labels are ‘item_type’, ‘field’ and ‘value’[3]zotero_inline_tags is a template tag that renders a formset. It takes one argument: the formset it renders.[4]zotero_tags is a template tag that renders the HTML code ofZoterometadata. It takes three arguments:object: tagged objectvocabulary: the vocabulary to code the metadata - currently it works with Dublin Core (“dc”)output_method: the method to code the metadata - currently it works HTML <meta> tags (“meta”)
Package: django-zupit-logging
A Django Middleware for logging requests and responses accordingly to Zupit Standards.InstallationInstall usingpip:pip install django_zupit_loggingConfigurationAdddjango_zupit_loggingto yourINSTALLED_APPSsetting:INSTALLED_APPS = [
    ...
    'django_zupit_logging',
]Adddjango_zupit_logging.middleware.ZupitLoggingMiddlewareto yourMIDDLEWAREsetting:MIDDLEWARE = [
    ...
    'django_zupit_logging.middleware.ZupitLoggingMiddleware',
]AddZUPIT_LOGGINGto yoursettings.pyfile:ZUPIT_LOGGING = {
    "APP_INSIGHTS_CONNECTION_STRING": env("APP_INSIGHTS_CONNECTION_STRING"),
}Useenable_zupit_logger(LOGGING)to yoursettings.pyfile:from django_zupit_logging.settings import enable_zupit_logger

if env("APP_INSIGHTS_CONNECTION_STRING"):
    enable_zupit_logger(LOGGING)UsageThe middleware will log requests and responses accordingly to Zupit Standards.
Package: django-zurb-foundation
django-zurb-foundation 5.5.0============================Django Zurb Foundation 5 package.Version of this package is equal to the version of Zurb Foundation it provides.Usage=====- Add `foundation` to your `INSTALLED_APPS`.- If you want to use the provided base template, extend from `foundation/base.html`. If you want to write one from scratch, see the example template.- If you want to test if foundation works, include `foundation.urls` in your urls.py and visit the path. You should see the Foundation test page.Including Foundation js/css/vendor files=============================================#### Note: these tags are deprecated in favor of including files directly with Django `static` tag. They will be removed in version 6.x. Templates have been updated to use the new method.To include specific Foundation js files, you can use `foundation_js` tag.For example, to include `abide` library use:{% foundation_js 'abide' %}Depending on your static url, it will replace the previous tag with something like `<script src="/static/foundation/js/foundation/foundation.abide.js"></script>`.Same works for Foundation css and vendor files, but in that case use the `foundation_css` or `foundation_vendor` tag the same way.Note that if you call `foundation_js` without any parameters, it will include `foundation.min.js` file.Foundation icons================#### Note: this tag is deprecated in favor of including files directly with Django `static` tag. It will be removed in version 6.x. Templates have been updated to use the new method.The latest Foundation icons set is now included in this package.The icons are not enabled by default. To enable them use something like this in your template:{% block css %}{% foundation_css 'foundation-icons' %}{% endblock css %}If you have added `foundation.urls` to your urls.py visit `icons/` on that path to see them.Changes=======Version 5.5.0- Updated foundation to 5.5.0Version 5.4.7- Updated foundation to 5.4.7Version 5.4.5- Updated foundation to 5.4.5Version 5.3.0.1- Added scss filesVersion 5.3.0- Updated foundation to 5.3.0- Deprecated foundation tags (they will be removed in version 6.x)- Updated templates not to use tagsVersion 5.1.1- Updated foundation to 5.1.1Version 5.0.3- Moved `js/modernizr` to `js/vendor/modernizr` and removed `js/vendor/custom.modernizr`- Moved `js/jquery` to `js/vendor/jquery`Version 5.0.2- Renamed `foundation_body` to `base_body`- Removed zepto and renamed `foundation_jquery_zepto` block to `foundation_jquery`- Included foundation icons- Renamed `foundation_include` to `foundation_js`- Added `foundation_vendor` and `foundation_css` tags- Used the tags from this package in the base template[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/amarsahinovic/django-zurb-foundation/trend.png)](https://bitdeli.com/free "Bitdeli Badge")