Saravanan666/pypi-org huggingface dataset:
Package: django-varnish
Varnish is a state-of-the-art, high-performance HTTP accelerator.
For more information checkoutVarnish SiteDjango Varnish works with Varnish server(s) to manage caching of object pages.
It allows you to monitor certain models and when they are updated,
Django Varnish will purge the model’s absolute_url on your frontend(s).
This ensures that object detail pages are served blazingly fast and are always up to date.
You may also go in and manually tweak things (such as your VCL configuration) using a management command.Django Varnish requires thevarnish python bindingsPutvarnishappin yourINSTALLED_APPSthen set a few more settings.VARNISH_WATCHED_MODELSis a list of installed models whose absolute_urls you want to purge from your
Varnish cache upon saving. Example:('auth.user','profiles.profile')VARNISH_MANAGMENT_ADDRSis a list of Varnish cache addresses (containing their management ports).
Example('server1:6082','server2:6082')The management commandvarnishmgtis also now available and just blindly executes passes commands and prints the results.
Example$ ./manage.py varnishmgt purge_url "/"
Package: django-vatno-validator
A Django validator that validates European VAT numbersDocumentationThe full documentation is athttps://django-vatno-validator.readthedocs.org.QuickstartInstall vatno-validator:pip install django-vatno-validatorThen use it in a project:from django.db import models
from vatno_validator.validators import VATNoValidator

class MyModel(models.Model):
    vat_no = models.CharField(validators=[VATNoValidator(allowed_countries=[
        'DE',
        'AT',
        'GB',
    ])])FeaturesValidates all 28 European member’s VAT numbers according tohttp://ec.europa.eu/taxation_customs/vies/faq.html#item_11It does not actually query the VIES, it only performs a format-checkRunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install -r requirements-text.txt
(myenv) $ python runtests.pyCreditsTools used in rendering this package:Cookiecuttercookiecutter-pypackageHistory0.1.1 (2015-12-17)Corrected PyPI package name0.1.0 (2015-12-17)First release on PyPI.
Package: django-vegetarian-cookbook
Django Vegetarian CookbookDjango application for the publication of vegetarian culinary recipes with the calculation of energy and nutrients.more images see on screenshots folderFeaturesmanage ingridients, include ingridient nutrients and energymanage additional meashuresmanage recipesrecipe categoryrecipe tagshow recipecalculate recipe energysearch recipes by many parametersInstallationpip install django-vegetarian-cookbookadd apps in settings.pyINSTALLED_APPS=[...'vegetarian_cookbook','bootstrap4','ajaximage','imagekit','ckeditor',]add url in urls.pyfromdjango.conf.urlsimportincludeurlpatterns=[path('',include('vegetarian_cookbook.urls')),path('admin/',admin.site.urls),]more info see in example apphttps://github.com/sergey-panasenko/django-vegetarian-cookbook
Package: django-vendor
Django VendorDjango App Toolkit for selling digital and physical goods online.The philosophy is "Cart to Receipt".  What you put in the cart and what you do after the purchase is up to you.  The app is opinionated within scope.Goals of the project:Drop in to existing Django Sites without requiring changes to how Django works (flow, not fight)Handle everything from the point of starting a purchase, until payment is complete.BYOPM, Bring Your Own Product Model.  Subclass your Product Model off of our base model and add whatever you want.  You are responsible for things like Catalogs and Presenting products to the user, we handle the purchasing of the products and generate a receipt you can look for.For DevelopersNOTE: It is reconmended that you first setup a virtual environment.To install the project, all you need to do is check out the project and run the following to install all the dependencies:pipinstall-rrequirements.txtFor developers, you'll need to also include a couple of dependencies that are only used in develop mode.  Run this from the root level of the project.pipinstall-e.'[dev, authorizenet]'To run the project, go into the develop folder:To setup the models:./manage.pymigrateCreate the Super user./manage.pycreatesuperuserThen load the developer fixture if you want to pre-populate the cart & catalog./manage.pyloaddatadeveloperTo run the project:./manage.pyrunserverto dump unit test data./manage.pydumpdata--indent4auth.group--natural-foreign--natural-primary>fixtures/group.json
./manage.pydumpdata--indent4auth.user--natural-foreign>fixtures/user.json
./manage.pydumpdata--indent4-econtenttypes-eauth.permission-esessions-eadmin.logentry-eaccount.emailaddress-eauth.group-eauth.user>fixtures/unit_test.jsonThe install processAdd the app to your projectCreate your Product model that inherits from the ProductModelBase base class.Change the settings.py value for VENDOR_PRODUCT_MODEL to point to your modelMake migrationsMigrate
Package: django-vendor-files
django-download-vendor-filesSetupInstall using pip:pipinstalldjango-vendor-filesAddvendor_filestoINSTALLED_APPSin your Django settings:INSTALLED_APPS=(...'vendor_files',)Put thevendordirectory inSTATICFILES_DIRSin your Django settings:STATICFILES_DIRS = (
    os.path.join(BASE_DIR, 'vendor/'), 
    ...
)Remarks:stay first if you wont load vendor libs firststay second after you own static if you wish ovveride (patch) vendor libAdd aVENDORsetting to your Django settings, and add your vendor files with URL and SNI, e.g.:VENDOR={'jquery':{'url':'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/','js':[{# final url will be: https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js'path':'jquery.min.js','sri':'sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==',}]},'bootstrap':{'url':'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/','js':[{'path':'js/bootstrap.min.js','sri':'sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa',}],'css':[{'path':'css/bootstrap.min.css','sri':'sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u',}]}}UsagePut{% load vendor_tags %}at the top of your Django template and the vendor tag , e.g.:{% vendor 'jquery' %}, somewhere in your HTML:{% load staticfiles %}
{% load vendor_tags %}<!DOCTYPE html><html><head><title>{{ request.site.name }}</title>...
        {% vendor 'jquery' %}
        {% vendor 'bootstrap' %}</head>Extended tags, extract only js or css (can be usefull example fordjango-compressor):{% vendor 'jquery' 'js' %}
# or you can use
{% vendor_js 'jquery' %}

{% vendor 'jquery' 'css' %}
# or you can use
{% vendor_css 'jquery' %}Then, you have 2 options:To use a CDN, putVENDOR_CDN = Truein your Django settings and the vendor tag will be replaced by a<link>or<script>tag using the URLs in the settings.To use a local copy, putVENDOR_CDN = False(or nothing at all) in your Django settings and the vendor tag will be replaced by a<link>or<script>tag using yourSTATIC_PATH. The files can be downloaded:python ./manage.py download_vendor_files
Package: django-venezuela
Aplicación en Django que contiene estados, ciudades, municipios y parroquias de Venezuela basada enhttps://github.com/marydn/venezuela-sqlQuick startInstala el paquete django-venezuela con el comandopip install django-venezuelaAgrega “venezuela” al setting INSTALLED_APPS en el settings.py:INSTALLED_APPS = (
    ...
    'venezuela',
)Crea la base de datos con soporte UTF8, en mysql la creamos de la siguiente manera::CREATE DATABASE db_name CHARACTER SET utf8 COLLATE utf8 utf8_general_ci;Sincroniza el modelo de datospython manage.py syncdb
Package: django-verbatim
Template block tag which renders template syntax characters within the block as normal text. This serves as an escape hatch to avoid syntax collisions when using a template language meant to be rendered on the client, not the server.This repo is just a package for PyPI, original code:https://gist.github.com/629508Django v1.5 should have compatible code included:https://code.djangoproject.com/ticket/14502
Package: django-verification
Generalized app for two-step verification.Supports Python 3.8-3.12; Django 3.2-5.0.InstallationInstall the library, for instance with pip:pip install django-verificationAdd the library to your INSTALLED_APPS of an exiting project:INSTALLED_APPS += ['verification']Add the tables to the existing project:python manage.py migrate verificationUpgradeTo 0.4.1 (needs Django 1.7+):python manage.py migrate --fake verification 0001_initialDemoCopy the entire django-verification directory somewhere, set up and enter a
virtualenv, then provided you are on some Un*x:make demoThis’ll automatically make a user “admin” with the password “demo”.The demo should now be running onhttp://127.0.0.1/Runningmake demoagain will erase the database from the previous run.TestsTo run the tests, first install the testing-requirements:pip install -r requirements/test.txtthen run the tests with:make test APP=verificationUsageCreate a KeyGroup. KeyGroups hold the config for your Keys, so you might want
to make fixtures of them.fromverification.modelsimportKeyGroupkeygroup=KeyGroup(name='activate_account',# Uniquegenerator='sha1',# See verification.generators)Create a Key on some event, for instance when a user clicks a button:fromverification.modelsimportKeyKey.generate(group=keygroup)Set Key.send_func to some callable:fromdjango.core.mailimportsend_mail# In this minimal example, the contents of the email is created earlierdefemail_key(recipient,content):subject="Activate account on FooBlog"recipient=''.join(recipient.strip().split())# Use any kind of messaging-system heresend_mail(subject,content,'noreply@example.com',[recipient])key.send_func=email_keyChoose the claim-view, make the content of the email, send it with
key.send_key():fromdjango.core.urlresolversimportreverseactivate_url=reverse('verification-claim-post-url',kwargs={'key':key,'group':key.group})content="Click on%sto activate your account on FooBlog!"%activate_urlrecipient='john.oe@example.com'key.send_key(recipient,content)Hook thekey_claimed-signal in order to do something after the key is claimed:fromdjango.dispatchimportreceiverfromverification.signalsimportkey_claimed@receiver(key_claimed)defuser_created_key_claimed(sender,**kwargs):claimant=kwargs['claimant']claimant.is_active=Trueclaimant.save()Version:1.3.1
Package: django-vernissage
# Vernissage``django-vernissage`` is a reusable gallery app for django to be usedtogether with django-filer. It allows to create image galleries fromdjango-filer image files.## Features1. Defaults for easy usage with twitter bootstrap's carousels2. Drag-and-drop ordering of the images in a gallery3. Includes ready to use [django-cms](https://www.django-cms.org/en/) plugin## DependenciesVernissage has been developed and tested with django 1.6. Usage with1.7 should be pretty straightforward, but hasn't been tested yet.You'll probably be asked to generate the new-style migrations, andthat should be it. If you want to do the migration work, please send apull request!Vernissage uses[django-admin-sortable2](http://django-admin-sortable2.readthedocs.org/)to provide drag-and-drop sorting for the images in a gallery.## Installation1. Get it with pip:```pip install django-vernissage```2. Add ``vernissage`` and ``adminsortable2`` to ``INSTALLED_APPS`````INSTALLED_APPS = (...'vernissage','adminsortable2',...)```3. run ``./manage.py syncdb`` (or ``./manage.py migrate`` if you'reusing ``south``.If you want to use the django-cms plugin, it is possible that youwon't want the Vernissage models appearing in the admin. If so, setthe ``VERNISSAGE_ADMIN`` setting to ``False``## UsageJust go to the admin and create your galleries. You can sort theimages as you want them. An extremely basic template is provided, soif you want to use your own (recommended), add your templates  to the``VERNISSAGE_TEMPLATES`` setting:```VERNISSAGE_TEMPLATES = (("vernissage/carousel.html", "Carousel"),("vernissage/thumbnails.html", "Thumbnails and modal"),)```## VersioningThe versioing is as follows: ``<major>.<minor>.<patch>``Changes in ``patch`` are bugfixes. The expected functionality won'tchange.Changes in ``minor`` usually mean new features, but nobackwards-incompatible changes. Upgrade between minor versions mightrequire database migrations.Changes in ``major`` include some API changes or changes that are forsome other reason backwards-incompatible or require some manualintervention beyond just running ``migrate`` to upgrade from.Finally, the first drafts versions will be labeled ``0.x.y`` untilsuch time when the websites this app has been originally developed forfinally get stabilized. Once we have something live, version ``1.0.0``will be released whether that means backwards-incompatibility or not.Until such time, we expect rapid development and API evolution, so ifyou're using this before v1 please pay attention.
Package: django-versatileimagefield
A drop-in replacement for django’sImageFieldthat provides a flexible, intuitive and easily-extensible interface for creating new images from the one assigned to the field.Click here for a quick overviewof what it is, how it works and whether or not it’s the right fit for your project.CompatibilityPython:3.63.73.83.9Django:3.0.x3.1.x3.2.x4.0.x4.1.x5.0.xNOTE: The 1.4 release dropped support for Django 1.5.x & 1.6.x.NOTE: The 1.7 release dropped support for Django 1.7.x.NOTE: The 2.1 release dropped support for Django 1.9.x.NOTE: The 3.0 release dropped support for Django 2.x.Pillow>= 6.2.0Django REST Framework:3.14.xDocumentationFull documentation available atRead the Docs.Codedjango-versatileimagefieldis hosted ongithub.Running TestsIf you’re running tests on Mac OSX you’ll needlibmagicinstalled. The recommended way to do this is withhomebrew:$brewinstalllibmagicNote: Some systems may also be necessary to install thenon-python Pillow build dependencies.You’ll also needtox:$pipinstalltoxTo run the entire django-versatileimagefield test matrix, that is, run all tests on all supported combination of versions ofpython,djangoanddjangorestframework:$toxIf you just want to run tests against a specific tox environment first, run this command to list all available environments:$tox-lThen run this command, substituting{tox-env}with the environment you want to test:$tox-e{tox-env}
Package: django-versatileimagefield-private
NOTE: THIS IS A CUSTOMIZED VERSION OF THE ORIGINAL PACKAGE ONLY INTENDED FOR MY PERSONAL USE. USE IT AT YOUR OWN RISK.A drop-in replacement for django’sImageFieldthat provides a flexible, intuitive and easily-extensible interface for creating new images from the one assigned to the field.Click here for a quick overviewof what it is, how it works and whether or not it’s the right fit for your project.CompatibilityPython:2.73.43.53.63.7NOTE: The 1.2 release dropped support for Python 3.3.x.Django:1.8.x1.9.x (NOTE: Django REST Framework>=3.1.x is required if using Django 1.9.x)1.10.x1.11.x2.0.x2.1.xNOTE: Python 3.7 does not have support for Django 1.x.NOTE: The 1.4 release dropped support for Django 1.5.x & 1.6.x.NOTE: The 1.7 release dropped support for Django 1.7.x.Pillow>= 2.4.0Django REST Framework:3.4.x3.5.x3.6.x3.7.xDocumentationFull documentation available atRead the Docs.Codedjango-versatileimagefieldis hosted ongithub.
Package: django-version
django-versionA middleware retrieving a project version from settings and returning it in the response headers.AppendsX-Project-Version: a.b.cto every response.Installation$pipinstalldjango-versionUsageAppenddjango_versiontoINSTALLED_APPSAppenddjango_version.VersionMiddlewaretoMIDDLEWARESet your project version into the setting keyPROJECT_VERSIONas a string
Package: django-versioncheck
# django-versioncheckPrototyping a small django app which tries to be annoying if your django version is outdated.## InstallationIf you want to install the latest stable release from PyPi:$ pip install django-versioncheckIf you want to install the latest development version from GitHub:$ pip install -e git://github.com/byteweaver/django-versioncheck#egg=django-versioncheckAdd `versioncheck` to your `INSTALLED_APPS`:INSTALLED_APPS = (...'versioncheck',...)## How to useAt the momement django-versioncheck does just provide a simple management command to display the installed djangoversion and the latest upstream version on PYPI.$ python manage.py checkversion### Web view usageHook this app into your urls.py:urlpatterns = patterns('',...url(r'^versioncheck/', include('versioncheck.urls', namespace='versioncheck')),...)WARNING: This view is not secured and exposes your current Django version, use with caution!## Python version noticeThe current version is developed to be used with Python 3 and only tested on this major version.## ChangelogSee `Changelog.md` file.## Todo & RoadmapIt is just a protoype, most features are not ready yet.https://github.com/byteweaver/django-versioncheck/issues
Package: django-versioned-static
This little apps helps to manage your staticfiles when you need to minify
them for production use. Moreover, it is capable of versioning the assets
so that whenever you need to alter the static files, users won’t be given
old file from the browser cache.InstallationStandard Django way:pip install django-versioned-staticAdd to yourINSTALLED_APPS:INSTALLED_APPS = (
    ..
    ..,
    'versioned_static',
    ...
)Configure the assets themselves:STATICS_ASSETS = {
    'css': {
        'css/mycoolproject.css': {
            'media': ('screen', 'projection', 'tv'),
            'files': ('css/jquery-ui-1.8.18.custom.css', 'css/style.css',),
            'version': 1
        },
        'css/print.css': {
            'media': ('print',),
            'files': ('css/print.css',),
            'version': 1
        }
    },
    'js': {
        'js/mycoolproject.js': {
            'files': ('js/jquery-1.7.1.min.js',
                      'js/main.js'),
            'version': 1
        }
    }
}Done!Usage in templatesVery simple. Use theassettemplate tag. Give it the static type (css or js)
and the base css alias. It will generate all the necessary HTML for you directly:{% load versioned_static_tags %}
{% asset "css" "css/mycoolproject.css" %}
{% asset "css" "css/print.css" %}
{% asset "js" "js/mycoolproject.js" %}It takes your settings in the account. In development (whenDEBUG = True),
you will be given unversioned and unminified static files. When you turn
the debug off, you will be given versioned asset links.Result with DEBUG=True:<link type="text/css" rel="stylesheet" href="/static/css/jquery-ui-1.8.18.custom.css" media="screen,projection,tv"/>
<link type="text/css" rel="stylesheet" href="/static/css/style.css" media="screen,projection,tv"/>

<link type="text/css" rel="stylesheet" href="/static/css/print.css" media="print"/>

<script type="text/javascript" src="/static/js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="/static/js/main.js"></script>Result with DEBUG=False:<link type="text/css" rel="stylesheet" href="/static/css/mycoolproject.1.css" media="screen,projection,tv"/>

<link type="text/css" rel="stylesheet" href="/static/css/print.1.css" media="print"/>

<script type="text/javascript" src="/static/js/mycoolproject.1.js"></script>Minifying the filesThis app features simple management command which helps you create the minified
files for production. Usage goes like this:django-admin.py minifystatics [(CSS/JS) ASSET_FILE]Real example for previous scenario:django-admin.py minifystatics css css/print.cssIf you want to generate all the files in your app settings, simply run the command
without any arguments:django-admin.py minifystaticsThe command will look in yourSTATIC_ROOTby default (so be sure you
ran collectstatic before the minify command) and use it as the root path.Notesdjango-versioned-static internally uses YUI library for minifying the CSS/JS assets.
Package: django-versioned-static-url
A{% versioned_static %}template tag for generating a URL for a
static file, with a version string which will be effectively unique
based on the contents of the file.Example/static/css/global.css?v=a23bd10Installation# settings.pyINSTALLED_APPS+=['django_versioned_static_url']UsageThe following template code:{% load versioned_static %}<linkrel="stylesheet"href="{% versioned_static 'css/global.css' %}"/>Outputs:<linkrel="stylesheet"href="/static/css/global.css?v=feb0d0e"/>
Package: django-version-endpoint
> Provide an endpoint to query installed python package versionsUsageInstallationInstall the package:pip install django-version-endpointInstall the application by adding it to the INSTALLED_APPS setting:INSTALLED_APPS += ('version_endpoint',)Set the package names, you’re interested in:VERSION_ENDPOINT_PACKAGE_NAMES = (
    'all',
    'interesting',
    'packages'
)Add the url to your urls.py:from django.conf.urls import include

urlpatterns += url(r'^', include('version_endpoint.urls'))Endpointsversions/You can call the “versions” endpoint to get the information about the installed
package versions.Request a content type of “application/json” and a dictionary is returned:{
    'versions': {
        'all': '1.1',
        'interesting': '2.2',
        'packages': '3.3'
    },
    'host': 'hostname'
}Otherwise a rendered html page is returned.versions/<package_name>/The versions endpoint can get a single package name as well to specifically
return the mentioned package’s version.Overwriting the templateIn order to overwrite the html template for your needs, just create a template
called “version_endpoint.html” in your project, that’s retrieved before the
default one of the application.
For example with the standard template loader and directory in the project’s
folder under a “templates” folder.
You can use the dictionary mentioned above as context for the template.If you want to override the html response for the single package endpoint, you
can do the same for the “version_endpoint_single.html” template.DevelopmentMakefileThis project uses a Makefile for various tasks. Some of the available tasks
are listed below.make clean- Clean build artifacts out of your projectmake test- Run Testsmake plain-test- Run Tests without rebuilding the projectmake sdist- Build a Python source distributionmake docs- Build the Sphinx documentationmake lint- Get a codestyle report about your codemake plain-lint- Get a codestyle report without rebuilding the projectmake- Equivalent tomake test lint docs sdist
Package: django-versionfield
django-versionfieldInstallationInstalldjango-versionfieldpipinstalldjango-versionfieldAdd toINSTALLED_APPSINSTALLED_APPS=[...'versionfield',...]Usage:fromversionfieldimportVersionFieldclassSomeModel(models.Model):version=VersionField()Sample Queries:SomeModel.objects.filter(version__gt="1.0.0")SomeModel.objects.filter(version__gt="1.0")Widgetfromversionfield.widgetsimportVersionWidgetclassSomeForm(ModelForm):some_field=VersionField(widget=VersionWidget)