Saravanan666/pypi-org huggingface dataset:
Package: django-volt-admin
Django Volt AdminDjango Volt is a django admin customization forhttps://github.com/themesberg/volt-bootstrap-5-dashboardSamplesQuick startAdd "volt" to your INSTALLED_APPS setting like this::INSTALLED_APPS=[...'volt',]Include Templates from the volt admin customizationTEMPLATES=[{'BACKEND':'django.template.backends.django.DjangoTemplates','DIRS':[BASE_DIR/'volt/templates',],'APP_DIRS':True,'OPTIONS':{'context_processors':['django.template.context_processors.debug','django.template.context_processors.request','django.contrib.auth.context_processors.auth','django.contrib.messages.context_processors.messages',],},},]Start the development server and visithttp://127.0.0.1:8000/admin/to view (you'll need the Admin app enabled).
Package: django-vote
Django Votedjango-voteis a simple Django app to conduct vote for django model.This project was inspired bydjango-taggitQuick startInstalldjango-voteby pippipinstalldjango-voteAdd'vote'to yourINSTALLED_APPSsetting like thisINSTALLED_APPS=(...'vote',)AddVoteModelto the model you want to votefromvote.modelsimportVoteModelclassArticleReview(VoteModel,models.Model):...Run migratemanage.pymakemigrations
manage.pymigrateUse vote APIreview=ArticleReview.objects.get(pk=1)# Up vote to the objectreview.votes.up(user_id)# Down vote to the objectreview.votes.down(user_id)# Removes a vote from the objectreview.votes.delete(user_id)# Check if the user already voted (up) the objectreview.votes.exists(user_id)# Check if the user already voted (down) the object# import UP, DOWN from vote.modelsreview.votes.exists(user_id,action=DOWN)# Returns the number of votes for the objectreview.votes.count()# Returns the number of down votes for the objectreview.votes.count(action=DOWN)# Returns a list of users who voted and their voting datereview.votes.user_ids()# Returns all instances voted by userReview.votes.all(user_id)Use tags templateThere are two template tags you can use in template:vote_countto get vote count for a model instancevote_existsto check whether current user vote for the instance{% load vote %}<ol>{% for comment in comments %}<li>{{comment.content}} - up:{% vote_count comment "up" %} - down: {% vote_count comment "down" %} - exists_up:
        {% vote_exists comment user "up" %} - exists_down: {% vote_exists comment user "down"%}</li>{% endfor %}</ol>UseVoteMixinfor REST APIInstalldjango-rest-frameworkfromrest_framework.viewsetsimportModelViewSetfromvote.viewsimportVoteMixinclassCommentViewSet(ModelViewSet,VoteMixin):queryset=Comment.objects.all()serializer_class=CommentSerializerPOST/api/comments/{id}/vote/
POST/api/comments/{id}/vote/{"action":"down"}DELETE/api/comments/{id}/vote/
Package: django-voter
django-voter##############Application for Django framework that contains generic rating\vote system. Requires modifications in the model, that will be used for voting, to optimize number of database queries... contents::Quick overview==============More later.Requirements==============- python >= 2.5- pip >= 0.8- django >= 1.2- django-misc (https://github.com/ilblackdragon/django-misc)Installation=============**Django voter** should be installed using pip: ::pip install git+git://github.com/ilblackdragon/django-voter.gitSetup============- Add 'blog' to INSTALLED_APPS ::INSTALLED_APPS += ( 'ratings', )- Add RatingField to models you want to allow voting for: ::from ratings.models import RatingFieldclass SomeModle(models.Model):...rating = RatingField()Configure django-voter===============Will be later.Contributing============Development of django-voter happens at github: https://github.com/ilblackdragon/django-voterPlease, if you have any insight how to patch existing models - let me know. At this point, having a rating field at model that this field will be required at is the best solution I see from point of number database queries.License============Copyright (C) 2013 Illia PolosukhinThis program is licensed under the MIT License (see LICENSE)
Package: django-vouch
django-vouch============extension to django.contrib.auth as an identity manager with wide range of auth mechanism support.Continuous Integration----------------------.. image:: https://ci.teracy.org/buildStatus/icon?job=django-vouch-develop:alt: Teracy CI:target: https://ci.teracy.org/job/django-vouch-develop/Usage-----Installation------------Add ``vouch`` application into your requirements file:::django-vouchOr with ``pip``:::$ pip install django-vouchOr with ``setuptools``:Download the source code at https://code.teracy.org/projects/DJ/repos/vouch and:::$ python setup.py installTo download the latest snapshot development version with ``pip``:::pip install -i http://pypi.teracy.org/teracy/public/+simple/ django-vouch --preConfiguration-------------Contributing------------1. File issues at https://issues.teracy.org/browse/VOUCH2. Follow workflow at http://dev.teracy.org/docs/workflow.html3. Notices:Make sure to resolve the dependency requirements:::$ make resolveMake sure to check the coding style:::$ make check-styleMake sure to run tests:::$ make testMake sure to check the coverage report:::$ make report-coverageAuthors and contributors------------------------- Hoat Le: http://github.com/hoatleLicense-------BSD License::Copyright (c) Teracy, Inc. and individual contributors.All rights reserved.Redistribution and use in source and binary forms, with or without modification,are permitted provided that the following conditions are met:1. Redistributions of source code must retain the above copyright notice,this list of conditions and the following disclaimer.2. Redistributions in binary form must reproduce the above copyrightnotice, this list of conditions and the following disclaimer in thedocumentation and/or other materials provided with the distribution.3. Neither the name of Teracy, Inc. nor the names of its contributors may be usedto endorse or promote products derived from this software withoutspecific prior written permission.THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ANDANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIEDWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AREDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FORANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ONANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THISSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Package: django-vouchers
This is a simple app to add vouchers support to your Django Project.The idea is to define Forms for any kind of voucher that you want and add them to settings.VOUCHERS variable.e.g:
VOUCHERS = [(‘tshirt’, ‘project.vouchers.VoucherTShirtForm’)]and then define in project/vouchers.py something like:TSHIRT_SIZE = ((‘s’, ‘S’), (‘m’, ‘M’), (‘l’, ‘L’), (‘xl’, ‘XL’), (‘2xl’, ‘XXL’))class VoucherTShirtForm(forms.Form):token = forms.Charfield(max_length=50)
size = forms.ChoiceField(choices=TSHIRT_SIZE)
address = forms.CharField(max_length=200)
email = forms.EmailField()
Package: django-vr-pay
Django VR Payment Copy + PayImplementation ofVR Payment Copy + Pay.
The following doc explain how to set up the VR Payment Copy + Pay base tutorial.Quick startAdd "django_vr_payment" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [
...
'django_vr_payment',
](optional) Include the vr-payment URLconf in your project urls.py like this::path('vr-payment/', include('django_vr_payment.urls')),Runpython manage.py migrateto create the vr-payment models.Prepare a checkout:fromdjango_vr_payment.wrapperimportVRPaymentWrappervr_payment_wrapper=VRPaymentWrapper()basic_payment=vr_payment_wrapper.create_checkout(amount=<Decimal>,payment_type=<VRPaymentBasicPayment.PAYMENT_TYPE>,merchant_transaction_id=<UNIQUE_ID>)# the checkout_id for the VR Payment Copy&Pay form can be obtained through `checkout_id`checkout_id_for_forms=basic_payment.checkout_idPay via a payment form of your choice. A working example can be seen inVRPaymentBasicCheckoutViewGet the payment status:On return toVR_PAYMENT_SHOPPER_RESULT_URL_NAME, the app tries to get the status of a checkout object. You can also query VR Payment yourself:fromdjango_vr_payment.modelsimportVRPaymentBasicPaymentfromdjango_vr_payment.wrapperimportVRPaymentWrappervr_payment_wrapper=VRPaymentWrapper()basic_payment=VRPaymentBasicPayment.objects.get(checkout_id=<CheckoutID>)# get 'initial' status querying the checkout apipayment_status=vr_payment_wrapper.get_checkout_status(basic_payment)# or query transaction api either by vr_payment_checkout.payment_id or vr_payment_checkout.merchant_transaction_idpayment_status=vr_payment_wrapper.get_transaction_by_merchant_transaction_id(basic_payment)Copyright and licenseCopyright 2020 Particulate Solutions GmbH, under MIT license.
Package: django-vr-payment
Django VR Payment Copy + PayImplementation ofVR Payment Copy + Pay.
The following doc explain how to set up the VR Payment Copy + Pay base tutorial.Quick startAdd "django_vr_payment" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [
...
'django_vr_payment',
](optional) Include the vr-payment URLconf in your project urls.py like this::path('vr-payment/', include('django_vr_payment.urls')),Runpython manage.py migrateto create the vr-payment models.Prepare a checkout:fromdjango_vr_payment.wrapperimportVRPaymentWrappervr_payment_wrapper=VRPaymentWrapper()basic_payment=vr_payment_wrapper.create_checkout(amount=<Decimal>,payment_type=<VRPaymentBasicPayment.PAYMENT_TYPE>,merchant_transaction_id=<UNIQUE_ID>)# the checkout_id for the VR Payment Copy&Pay form can be obtained through `checkout_id`checkout_id_for_forms=basic_payment.checkout_idPay via a payment form of your choice. A working example can be seen inVRPaymentBasicCheckoutViewGet the payment status:On return toVR_PAYMENT_SHOPPER_RESULT_URL_NAME, the app tries to get the status of a checkout object. You can also query VR Payment yourself:fromdjango_vr_payment.modelsimportVRPaymentBasicPaymentfromdjango_vr_payment.wrapperimportVRPaymentWrappervr_payment_wrapper=VRPaymentWrapper()basic_payment=VRPaymentBasicPayment.objects.get(checkout_id=<CheckoutID>)# get 'initial' status querying the checkout apipayment_status=vr_payment_wrapper.get_checkout_status(basic_payment)# or query transaction api either by vr_payment_checkout.payment_id or vr_payment_checkout.merchant_transaction_idpayment_status=vr_payment_wrapper.get_transaction_by_merchant_transaction_id(basic_payment)Copyright and licenseCopyright 2020 Particulate Solutions GmbH, under MIT license.
Package: django-vrsns
Django versionsProvides an endpoint that lists versions of installed packages. The endpoint is
only activated ifDEBUGis set totrue.UsageAdd the package to your installed apps:INSTALLED_APPS.append('django_vrsns')Add the shipped ulrpatterns to your urlpatterns:fromdjango_vrsns.urlsimporturlpatternsasdvurlpatternsurlpatterns=dvurlpatterns+urlpatterns
Package: django-vtex
django-vtexStartingThese instructions will allow you to install the library in your python project.Current featuresGet tracking info.Pre-requisitosPython >= 3.7Django >= 3requests >= 2InstallationTo get the latest stable release from PyPi:pip install django-vtexorFrom a buildgit clone https://gitlab.com/linets/ecommerce/oms/integrations/django-vtexcd {{project}}python setup.py sdistand, install in your project djangopip install {{path}}/django-vtex/dist/{{tar.gz file}}Settings in django projectDJANGO_VTEX = {
    'VTEX': {
        'BASE_URL': '<VTEX_BASE_URL>',
        'APP_KEY': '<VTEX_APP_KEY>',
        'APP_TOKEN': '<VTEX_APP_TOKEN>',
    }
}UsageGet orders:from vtex.handler import VtexHandler

handler = VtexHandler()
response = handler.get_orders(<offset>)Get order detail:from vtex.handler import VtexHandler

handler = VtexHandler()
response = handler.get_order_detail(<identifier>)Create instance to be sent in create_invoiceimport json
from collections import namedtuple

dict_ = {
    'invoice_number': 'NFe-00001',
    'courier': '',
    'tracking_number': '',
    'tracking_url': '',
    'items': [
      {
          'id': '345117',
          'quantity': 1,
          'price': 9003
      }
    ],
    'total_value': 9508
}

instance = namedtuple('VtexInstance', dict_.keys())(*dict_.values())Create invoice:from vtex.handler import VtexHandler

handler = VtexHandler()
response = handler.create_invoice(<identifier>, <instance>)Update order status:from vtex.handler import VtexHandler

handler = VtexHandler()

response = handler.update_order_status(<identifier>, <status>)Update tracking status:from vtex.handler import VtexHandler

handler = VtexHandler()

# events = [] default
# is_delivered = False default
response = handler.update_tracking_status(
    <identifier>, <wms_reference>, <events>, <is_delivered>)
Package: djangovue
djangovueA set of helper tags and form widgets for making django and vue play nicely.InstallationpipinstalldjangovueTags ExampleclassIndexView(TemplateView):template='index.html'defget_context_data(self,**kwargs):context=super().get_context_data(**kwargs)context['message']='Hello from Django'returncontext{% load djangovue %}

{% load_vuejs %}

{% djangovue on %}<divid="app"><p>{{ message }}</p>{% djangovue off %}<p>{{ message }}</p>{% enddjangovue off %}</div><script>newVue({el:'#app',data:{message:'Hello from Vue'}});</script>{% enddjangovue%}Widgets ExamplefromdjangoimportformsfromdjangovueimportwidgetsclassUserForm(forms.Form):username=forms.CharField(max_length=30,widget=widgets.TextInput(model="user.username",modifier=widgets.TextInput.LAZY,attrs={":disabled":"disable"},),)first_name=forms.CharField(max_length=30,widget=widgets.TextInput(model="user.first_name",attrs={":disabled":"disable"}),)last_name=forms.CharField(max_length=30,widget=widgets.TextInput(model="user.last_name",attrs={":disabled":"disable"}),)gender=forms.ChoiceField(choices=[("male","Male"),("female","Female")],widget=widgets.RadioSelect(attrs={"v-model":"user.gender",":disabled":"disable"}),)disable=forms.BooleanField(required=False,widget=widgets.CheckboxInput()# v-model will automatically be set to `disable`)DevelopmentShould you wish to develop the library there are some helper functions within the Makefile to get you started.makeinstall# Installs the project dependencies including the node modules required for the DjangoVue Vue pluginmakebundle# Transpiles and bundles the DjangoVue.ts filemaketest# Runs testsmakeblack# Applies black formatting to the projectOnce installed run the following to view the examples:cddjangovue/examples
poetryrun./manage.pyrunserverNote this project usesPoetryfor packaging and managing dependencies.
Package: django-vueformgenerator
A package to help bridge the gap between Django’s Forms and VueFormGenerator’s Schemas using DjangoRestFramework.DocumentationThe full documentation is athttps://django-vueformgenerator.readthedocs.org.QuickstartInstall Django-VueFormGenerator:pip install django-vueformgeneratorThen use it in a project:from django_vueformgenerator.schema import Schema
from django import forms
import json

class TestForm(forms.Form):
    title = forms.CharField(max_length=128)
    content = forms.TextField(max_length=1280)

form = TestForm()  # or TestForm(data={'title':'My Title'})
schema = Schema().render(form)
print(json.dumps(schema))FeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install -r requirements_test.txt
(myenv) $ python runtests.pyCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.2.3 (2016-11-03)Add support for dotted models. Use this feature by defining your Form with a
field that has a name with double-underscores (e.g. “foo__bar__baz”, which
will become “foo.bar.baz” in the schema’s model field).0.2.2 (2016-11-01)Fix implementation of using initial data in forms. Previously, if you usedCharField(initial=’foo’)then this information would not be preserved when
creating the schema.0.2.1 (2016-10-27)Fix bug in tests so that the tests run successfully in Python 2.7.0.2.0 (2016-10-25)Add ability to use existing data in formDEPRECATED: Any code which previously usedSchema().render(MyForm)should
now useSchema().render(MyForm())(in other words,render()accepts an
instance of a form, rather than a form itself). To check if you are calling
the function against contract, you can run your code withpython -Wd(e.g.python -Wd manage.py runserver).0.1.1 (2016-10-18)Add additional tests for schema generationAdd components for numbers and for selecting between choicesAdd Python 2 supportAdd better documentationFix exception raised on bad widget0.1.0 (2016-10-11)First release on PyPI.
Package: django-vuejs-translate
django-vuejs-translateThis project aims to translate messages inside vuejs code.Initially this idea and code was designed byAlex TkachenkoGenerating translationspythonmanage.pyjsmakemessages-v3-ejinja,py,html,js,vue-jsejs,vue-inode_modules&&pythonmanage.pymakemessages-v3-ejinja,py,html,js,vue-inode_modulesInstallationUpdate INSTALLED_APPSINSTALLED_APPS=[...'vuejs_translate',...]Add urlsfromdjango.conf.urls.i18nimporti18n_patternsurlpatterns+=i18n_patterns(path('vuejs-translate',include('vuejs_translate.urls')),)Add script to templates// preferred way to use proxy cache on translations<scripttype="text/javascript"src!=exp("hashed_translation_url()")>// Or use old style with basic url tag<scripttype="text/javascript"src!=url('"vuejs_translate:js-i18n"')>Add something like this your js.importVuefrom'vue'importVueI18nfrom'vue-i18n'Vue.use(VueI18n)constmessages={current:window.django.catalog||{}}Vue.prototype._=function(){returnthis.$t.apply(this,arguments)}exportconsti18n=newVueI18n({locale:'current',messages,silentTranslationWarn:true})Notes on cacheAfter 0.6 version library uses cache ONLY for hashed url.It uses two-level cache system:Every hashed url cached by django for a month.If client ignores headers and sends a fetch - server returns last-modified etag.You can diable cache with VUEJS_CACHE settings# settings.py

VUEJS_CACHE = False
Package: django-vue-rollup
django-vue-rollupA django-compressor filter to compile .vue files usingrollup.InstallationInstalldjango-compressorin your django project.During installation, django-vue-rollup will call npm to install necessary packages,
so make sure you have npm installed.In order to avoid any possible conflicts, the npm packages will installed into a
local node prefix inside of django-vue-rollup's package directory.Once you have ensured that npm is available, you can install django-vue-rollup:pip install django-vue-rollupFinally, add the provided Vue Compiler to your COMPRESS_PRECOMPILERS setting:COMPRESS_PRECOMPILERS=(('text/vue','django_vue_rollup.VueCompiler'),)To include and compile .vue files, you can use a <script> tag with the type text/vue, for example:{% load compress %}

{% compress js %}<scripttype="text/vue"src="{% static 'myapp/js/my-vue-component.vue' %}"></script>{% endcompress %}The output format of the compiled vue file will beIIFE. The export name will be automatically generated by converting your input file name to camel case. For example, the export name in the Example above would beMyVueComponent. The default export can be accessed usingMyVueComponent.default, other named exports by replacingdefaultwith their respective names.DisclaimerI am a Python and Django expert, not a Javascript expert and i have developed this python package
based on what exactly i needed for my application, because to my surprise, i couldn't find a
solution for this that didn't ask you to run a second javascript-based server.If there is a feature you're missing or you feel that something about the way this code handles
things is not how it should be done, please feel very welcome to submit an issue or a pull request!
Package: django-vue-utils
Provides helpers and utilities for integrating with a Vue front-end, as described
in the articleDjango + Vue + Vite: REST Not Requiredand inCookiecutter Vue + DjangoQuick startAdd dependency django-vue-utilspipinstalldjango-vue-utils==0.1.7Add “django_vue_utilities” to your INSTALLED_APPS setting:INSTALLED_APPS=[...,"django_vue_utilities",]SettingsTailor the following settings to your Vue front-end.  The defaults are provided below.VUE_FRONTEND_USE_TYPESCRIPT=FalseVUE_FRONTEND_USE_DEV_SERVER=settings.DEBUGVUE_FRONTEND_DEV_SERVER_URL='http://localhost:5173'VUE_FRONTEND_DEV_SERVER_PATH='src'VUE_FRONTEND_STATIC_PATH='vue'Usage{%extends"base.html"%}{%loadvue_utils%}{%blockextra_js%}{# Import entrypoint JavaScript, choosing dev or static source depending on settings #}<script type="module" crossorigin src="{%vue_bundle_url'my_vue_entrypoint'%}"></script>{# 'provide" strings which can 'injected' throughout the Vue app, including from within a pinia store #}{%url'home'ashomeUrl%}{%vue_provide'homeUrl'homeUrl%}{%endblock%}
Package: django-vz-wiki
VZ_WIKI===============VZ_Wiki is a Django powered wiki app.TODO----* Search* Tag filtering* File/AttachmentsInstallation------------`sudo easy_install django_vz_wiki`Add the following to *urls.py*`(r'^wiki/', include('vz_wiki.urls')),`Add the following to *INSTALED_APPS*`'django_vz_wiki',`Integration Into Existing Templates-----------------------------------**Be sure to uncomment the the egg based templated loader in *TEMPLATE_LOADERS***`django.template.loaders.eggs.load_template_source`All wiki templates have the following:`{% extends "base.html" %}`The block tags match the suggested best practices by [Lincoln Loop](http://lincolnloop.com/django-best-practices/apps/modules/templates.html)Template blocks include:* **title** - full page title* **extra_head** - for extra css/javascript* **body** - wraps everything inside body tag* **content_title** - title for wiki page* **content** - wiki page contents* **block vz_wiki_page_menu** - this is required for page options, it should be wrappedinside `<ul></ul>`.Settings--------You can add default allowed tags.  By adding **WIKI_ALLOWED_TAGS** to your settings file.  The  setting should be in form 'tag2:attr1:attr2 tag2:attr1 tag3', where tags are allowed HTML tags, and attrs are the allowed attributes for that tag.  Default is an empty string.You can also change the default Wiki page link base (*/wiki*) by adding **WIKI_BASE** to your settings file.Linking to Wiki Pages---------------------First, include **wiki_tags** template tags.`{% load markup wiki_tags %}`Second, link to the desired wiki page by putting something like the following insideyour text:`Blah blah blah [[title of the wiki page]]`Finally, add the *wiki_link* filter like this:`{{ latest_revision.body|sanitize|wiki_link|markdown }}`Extra Template Stuff--------------------You can add:`{% block vz_wiki_page_menu %}{% endblock %}`This will add:`<ul>``    <li><a href="{% url page_list %}" title="page list">Page List</a></li>``    {% if perms.page.can_add %}``    <li><a href="{% url create_page %}" title="create a page">Create a Page</a></li>``    {% endif %}``</ul>`You can also do this manually.Dependencies--------------* [Django](http://djangoproject.com)* [Python Markdown](http://www.freewisdom.org/projects/python-markdown)* [Beautiful Soup](http://www.crummy.com/software/BeautifulSoup)* [Django Tagging](http://code.google.com/p/django-tagging/)
Package: django-waffle
Django Waffle is (yet another) feature flipper for Django. You can
define the conditions for which a flag should be active, and use it in
a number of ways.Code:https://github.com/django-waffle/django-waffleLicense:BSD; see LICENSE fileIssues:https://github.com/django-waffle/django-waffle/issuesDocumentation:https://waffle.readthedocs.io/