Saravanan666/pypi-org huggingface dataset:
Package: django-valem
Django-Valem is a collection of Django apps defining data models for parsing,
validation, manipulation and interpretation of chemical reactions, formulas, and
quantum states.
Thedjango-valemapps package is based aroundPyValem.Installation:Thedjango-valemapps can be installed either fromPyPIusing pippython3-mpipinstalldjango-valemor from the source by running from the project source directorypython3-mpipinstall.Configuration:Thedjango-valemapps can be added to any Django project by adding the following
apps into theINSTALLED_APPSlist in thesettings.pyof the project:INSTALLED_APPS=[..."rp",# App handling species and their states"rxn",# App handling chemical reactions between species (rp.RP instances)"ds",# App handling datasets attached to rxn.Reaction instances"refs",# App handling references for ds.ReactionDataSet subclasses instances]For Developers:It goes without saying that any development should be done in a clean virtual
environment.
After cloning or forking the project from itsGitHubpage,django-valemmight be
installed into the virtual environment in editable mode withpipinstall-e.[dev]or on zsh:pipinstall-e.'[dev]'The[dev]extra installs (apart from the package dependencies) also several
development-related packages, such asblack,ipython, ordjangoitself.
The tests can then be executed by running (from the project root directory)pythonruntests.pyThe project does not haverequirements.txtby design, all the package dependencies
are rather handled bysetup.py.
The package needs to be installed to run the tests, which grants the testing process
another layer of usefulness.The project code is formatted byblack.
Always make sure to format your code before submitting a pull request, by runningblackon all your python files, orblack .from the project source directory.If therp.models.py, orrxn.models.pyare changed, themakemigrations.pyscript needs to be run to make migrations for the apps, before the apps are pushed to
master, or published to PyPI.
Package: django-valet-keys
django-valet-keys is a Django app for managing valet keys to let robots drivearound in your identity.- `Build status on travis-ci <http://travis-ci.org/lmorchard/django-valet-keys>`_ (|build-status|)- `Latest documentation on Read The Docs <https://django-valet-keys.readthedocs.org/en/latest/>`_(`source <https://github.com/lmorchard/django-valet-keys/tree/master/docs>`_)- `Task board on Huboard <http://huboard.com/lmorchard/django-valet-keys/board>`_(`source <https://github.com/lmorchard/django-valet-keys/issues>`_).. |build-status| image:: https://secure.travis-ci.org/lmorchard/django-valet-keys.png?branch=master:target: http://travis-ci.org/lmorchard/django-valet-keys.. vim:set tw=78 ai fo+=n fo-=l ft=rst:
Package: django-vali
Django-valiplatform Backend part built using theDjango,replace default admin templates usingVali AdminRequirementsdjango >= 2.0python >= 3.5How to useInstall with pip$ pip install django-valiAddvalito yourINSTALLED_APPSsetting like this:INSTALLED_APPS = (
        'vali',
        'django.contrib.admin',
        ...
    )Config vali:VALI_CONFIG = {
    # the vali-admin themes  default, blue, purple, green,brown
    'theme': 'default',
    'dashboard': {'name': 'dashboard', 'url': '/admin/'},
    # the order for applist  default, registry
    # display applist by group: True
    #  e.g. {group: True}
    # default check decorators  vali.decorator.vali_models_group on ModelAdmin
    #  * otherwize use group_marker in verbose_name_plural, (will be deprecated in future version 0.2.0)*
    #  * e.g.  {group: True, group_marker : '-'}
    #    verbose_name_plural = system-user
    #  * display the model "user" in group "system"
    'applist': {"order": "registry", "group": True},
    # default: //maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css
    # 'font_awesome_url': 'font-awesome-4.7.0/css/font-awesome.min.css',
}find more info for style customize atpratikborsadiya' blogrun server$ ./manage.py runserverPoint your browser tohttp://localhost:8000Login with user:  demo , password: demoThanksDjango projectVali AdminLicenseThis project is licensed under theMITLicenseTodo-(remoe)modify ValiRelatedFieldWidgetWrapper with Vali theme
-(done) replace ValiRelatedFieldWidgetWrapper with ValiCheckboxSelectMultiple, show user permission with groups
-(done) support more theme support
-(done) app/model orders
-(done) app/model groups...
Package: django-validate-decorators
Django DecoratorsThis Python package provides a collection of decorators for Django views to streamline handling of request types and parameters.InstallationYou can install the package using pip:pipinstalldjango-validate-decoratorsUsageImport the desired decorators from the package and apply them to your view functions:fromdjango.httpimportHttpResponsefromdecoratorsimportpass_only_get,pass_json_body@pass_only_getdefmy_view(request,name:str,age:int):# Your view logic# Use name and age herereturnHttpResponse('Hello World.')Featurespass_only_get: Ensures that the view only processes GET requests.pass_only_post: Ensures that the view only processes POST requests.pass_only_post_and_get: Ensures that the view only processes POST and GET requests.pass_json_body: Parses and validates JSON request bodies.ConfigYou can pass parameters to check types and values of request parameters. The following parameters are available:check_type=False: Checks parameters type, if set True. (Default: False), it throwsTypeErrorif the type is not matched.check_value=HttpResponse: Checks parameters type if set HttpResponse. It throwsHttpResponseif the value is not matched.check_value=Exception: You can customize your own exception class. It throws your exception if the value is not matched.ContributingContributions are welcome! For major changes, please open an issue first to discuss what you would like to change.LicenseThis project is licensed under the MIT License - see the LICENSE file for details.
Package: django-validated-jsonfield
django_validated_jsonfielddjango_validated_jsonfield is an inplace replacement for django JSONField which is validated against a json_schemaA json_schema can be added to the field descriptionThe json_schema is used to validate the jsonfield data during full_clean or during restframework validationThe field is also documented on Swagger (via drf_yasg specific inspectors)Missing data in the json structure is initialized/filled to the schema's default valuesUsageimportReplace your JSONField importfromdjango.db.modelsimportJSONField`or`fromdjango.contrib.postgres.fieldsimportJSONFieldbyfromdjango_validated_jsonfieldimportValidatedJSONFieldasJSONFieldmodelsclassMyModel(models.Model):_data_schema={"type":"object","properties":{"en":{"type":["string","null"],"default":"","example":"Name","title":"Name"}"fr":{"type":["string","null"],"default":"","example":"Nom","title":"Nom"}},"default":{},#note the top level default"additionalProperties":False,}data=JSONField(schema=_data_schema,editable=True)Rest Framework serializersAs defined field:replacefromrest_framework.serializersimportJSONFieldbyfromdjango_validated_jsonfieldimportValidatedJSONFieldSerializerasJSONFieldThe updated JSONField expect to receive a "schema" and "json_validator_cls" argument at initilization.In serializers.ModelSerializer:Add the ValidatedJsonModelSerializerMixin to your ModelSerializer classes.fromdjango_validated_jsonfieldimportValidatedJsonModelSerializerMixinclassMyModelSerializer(ValidatedJsonModelSerializerMixin,serializers.ModelSerializer):classMeta:model=MyModelexclude=[]Swagger documentation (drf_yasg)add the following block to your django settings.py filefromdjango_validated_jsonfield.yasgimportDEFAULT_FIELD_INSPECTORSSWAGGER_SETTINGS={'DEFAULT_FIELD_INSPECTORS':DEFAULT_FIELD_INSPECTORS}you should see the json field of your model being documented in SwaggerAdditional remarksjson schema defaultif the default field is provided in the json schema, the data will be initialized to the default value (if missing).
The feature works well only parents of nested fields in the json schema have a default themselves (to list or dict)
--> Note the "top level default" in the example above.
Package: django-validatorchain
MotivationWhile working on the EuroPython 2014 website we ran into a situation where we
had a field validator that was rather expensive to evaluate.Sadly, thevalidators-attributeon a model/form field is always evaluated as
a whole (meaning each validator in that list is executed no matter if a previous
one errored out already). So, we wanted to have a way to mark certain validators
as not to be executed in case the field was being marked as invalid anyway.We still wanted to use the field validator API simply because it keeps
everything easily testible, though.How to usefrom django.db import models

from validatorchain import ValidatorChain

from .validators import a_cheap_validator
from .validators import another_cheap_validator
from .validators import an_expensive_validator


class SomeModel(models.Model):
    field = models.CharField(
        max_length=100,
        validators=ValidatorChain()
            .add(a_cheap_validator)
            .add(an_expensive_validator, skip_on_error=True)
            .add(another_cheap_validator)
        )This wayan_expensive_validatorwill not be executed ifa_cheap_validatoralready raised an exception, whileanother_cheap_validatorwill be executed
again.
Package: django-validators
Django ValidatorsDjango validators provides validator function that can be used with Django form fields and Django rest framework
serializer fieldsInstallationInstalldjango-validatorsusingpippip install django-validatorsTypes of validatorsFile validatorsMime type validatordjangovalidators.validators.MimetypeValidatorThis validator is used to check mime type/ content type of the uploaded file. This validator checks file header
information to check mime type onFileFieldexamplefromdjangovalidators.validatorsimportMimetypeValidator# with django formsclassDemoForm(forms.Form):CONTENT_TYPES=('image/png','application/pdf','image/jpeg','image/jpg','image/tiff',)file_object=forms.FileField(validators=[MimetypeValidator(CONTENT_TYPES)])# with django serializersclassDemoSerializer(serializers.Serializer):CONTENT_TYPES=('image/png','application/pdf','image/jpeg','image/jpg','image/tiff',)FILE_SIZE_IN_BYTES=1024*1024*5# ~5 Mibfile_object=serializers.FileField(validators=[MimetypeValidator(CONTENT_TYPES)])File size validatordjangovalidators.validators.FileSizeValidatorThis validator is useful for validating file size inFileFieldexamplefromdjangovalidators.validatorsimportFileSizeValidator# with django formsclassDemoForm(forms.Form):FILE_SIZE_IN_BYTES=1024*1024*5# ~5 Mibfile_object=forms.FileField(validators=[FileSizeValidator(FILE_SIZE_IN_BYTES)])# with django serializersclassDemoSerializer(serializers.Serializer):FILE_SIZE_IN_BYTES=1024*1024*5# ~5 Mibfile_object=serializers.FileField(validators=[FileSizeValidator(FILE_SIZE_IN_BYTES)])
Package: django-valuate
Valuate=======A portable application to easily associate a user valuation (rating, like etc)to any object, just on the basis of template tags. No configuration of existingmodels and views required.Installation============- Run `python setup.py install`- Include 'valuate' in your installed apps settings.- Add `(r'^valuate/', include('valuate.urls'))` to your main urls.py.- Ensure you have request context preprocessor added in the list of preprocessorsor pass request varible context to views.Usage=====Create a valuation type from admin site.Let us say:**Rating**- Excellent  5- Good       4- Average    3- Bad        2- Poor       1or**LikeDislike**- Like       1- Dislike    0**Available settings:**`DEFAULT_VALUATION_TYPE_ID`: The ID of default valuation type to be used in the projectLoad the template tags: `{% load valuation %}`**Available tags:**{% render_valuate form  of object for valuation_type %}------------------------------------------------------Renders the valuation form for the provided object.Override template: 'valuate/form.html' for modifying the look.{% render_valuate form of object for valuation_type %}---------------------------------------------------------Renders the status according to the score of various choices.Override template: 'valuate/status.html' for modifying the look.{% get_valuate ajax_fields of object for valuation_type as variable %}---------------------------------------------------------------------Get the fields as dictionary required for an ajax post request in the contextor directly.Variables available:For post request: 'content_type','object_pk', 'choice' (to be selectedby user, can have an initial value if user has already submitted once)'choices': dictionary of choices for user to provide the 'value' data.'target': target for the request.'vtype'": the valuation type.On a successfull request, true will be retuned.If you are not using a popular javascript liberary, pass on a POSTvariable with name `ajax` and a `true` value.{% get_valuate form of object for valuation_type as variable %}--------------------------------------------------------------Gets the valuation form in context or directly.User `form_name.target` to access the target for the post request.{% get_valuate score of object for valuation_type as variable %}-----------------------------------------------------The average score of the object using the corresponding valuesof chioces.{% get_valuate choice_count of object for_chioce choice_name for valuation_type as variable %}----------------------------------------------------------------------------------------------Returns the score count for a perticular choice of an object. Choiceshould be provided with quotes (as string).*The `for valuation_type` and `as variable` are optional arguments*And Thats it!
Package: django-valueinlist-filter
django-valueinlist-filter=========================Queryset can be filtered by a given list on the django admin page, just like: qs.filter(field__in=[list]).Installation------------[sudo] pip install django-valueinlist-filterAdd valueinlist_filter to settings.INSTALLED_APPS:INSTALLED_APPS = (...'valueinlist_filter')And then, set a CharField field in a model like this:class Model(models.Model):...serial_number = models.CharField(max_length=32)If you want to filter the **serial_number** field by a given value list(split string by space), you can bind ValueInListFilter to this field:from valueinlist_filter.filter import ValueInListFilterfrom django.contrib import adminfrom models import Modelclass ModelAdmin(admin.ModelAdmin):list_filter = (('serial_number', ValueInListFilter), # bind filter to CharField...)Finally, you will get a textarea form on the filter side bar, the textarea's change event will trigger form.Added a 'screenshot.png' picture.
Package: django-vanillaframework
Django VanillaframeworkVanilla Frameworkfrontend for DjangoRequirementsPython 3.6 or newer,Django3.2 or newerInstallUsing pip:pipinstalldjango-vanillaframeworkSetupAdd'vanillaframework'to theINSTALLED_APPSlist in your project settingsINSTALLED_APPS=[...,'vanillaframework']At this point, you can use Vanilla Framework in your Django templates, and the css will be pulled fromassets.ubuntu.comIf you would like to use a local copy of the css file, run the install management command:python3manage.pyvanillaframework-i--cssThe vanillaframework_css tag will grab the local file from now on until it is deleted.If you would like to customize Vanilla Framework settings, you can instead install the source sass files. Make surenpmis installed on your system before you begin.Run the installer without the --css argument:python3manage.pyvanillaframework-iThis will install the npm vanilla-framework package to the static folder alongside the filevanillaframework.scss. Use this file to customize the library.Note: If you are using the sass version of Vanilla Framework, you will have to installdjango-compressorand a sass compiler such asdjango-libsassthen update your settings file accordingly:INSTALLED_APPS=[...,'django.contrib.staticfiles','vanillaframework','compressor']STATICFILES_FINDERS=(...,'compressor.finders.CompressorFinder')COMPRESS_PRECOMPILERS=(('text/x-scss','django_libsass.SassCompiler'),)UsageOnce django-vanillaframework is set up, you can use it by including the relevant tags in a Django template.For the css version, usevanillaframework_css:{% load vanillaframework_tags %}

<html>
    <head>
        {% vanillaframework_css %}
    </head>
</html>And for the sass version, usevanillaframework_sass:{% load vanillaframework_tags %}

<html>
    <head>
        {% vanillaframework_sass %}
    </head>
</html>Vanilla Framework can now be used in the same way it would be with a nodejs project. For information on this syntax, see theVanilla Framework website.
Package: django-variable-admin
This project allows changing the colors used in Django’s administration
panel using CSS variables. It only contains a copy of the CSS files
which will be a part of the upcoming Django 3.2 release. The project is
mainly intended for those who want to get their hands on the new theming
and dark mode support a little bit earlier.Also, if things do not look rightpleasereport those issues to the
Django project (maybe while adding me to the Cc:) so that they can be
fixed there.Usagepython-mpip installdjango-variable-admininside your project and
insertvariable_adminbeforedjango.contrib.adminintoINSTALLED_APPS.INSTALLED_APPS=[..."variable_admin","django.contrib.admin",...]./manage.py collectstaticnow complains about duplicates with the
same destination path. That’s to be expected.
Package: django-variable-settings
# django-variable-settingsA simple django application to manage dynamic settings saved in database using namespaced keys and json string values.## DemoTo try it now, download this repo and use docker-compose to run itgit clone git@github.com:jperelli/django-variable-settings.gitcd django-variable-settingsdocker-compose upThen go to http://localhost:8080/admin and login with user `admin` and password `admin`, you should see the Settings. If you add a settings, it should be a json object. So a string should be saved with double quotes around it.It can be tested from django shell also easily. Go to another console while `docker-compose up` is running and typedocker-compose exec django ./manage.py shell>>> import variable_settings>>> variable_settings.set('evergreenstreet', 123)>>> variable_settings.set('address.evergreenstreet', 123)>>> variable_settings.set('address.evergreenavenue', 'first')>>> variable_settings.get('evergreenstreet')123>>> variable_settings.get('address.evergreenavenue')u'first'>>> variable_settings.get('address.*'){u'address.evergreenavenue': u'first', u'address.evergreenstreet': 123}>>> variable_settings.all(){u'address.evergreenavenue': u'first', u'evergreenstreet': 123, u'address.evergreenstreet': 123}## Installationpip install django-variable-settingsIn settings.py addvariable_settingsThen run migrationsmanage.py migrate variable_settingsThen use it as in the Demo## Settings and custom commandIf you want to add some default settings to the database then you can add something like this to `settings.py`# default django_variable_settings# use ./manage.py variable_settings_initialize# If overwrite=False(default) they are not applied if already exist in databaseVARIABLE_SETTINGS = [#[ key , value (, overwrite) ]['alerting.connection', '127.0.0.1', False],['alerting.warning', 123, False],['wrong_permissions.enabled', True, True],]Use custom command `./manage.py variable_settings_initialize` to save those in database. The command only overwrites the variable value if the last parameter is set to true## CachingWIP# Authors- Julian Perelli- Maxi Padulo# LICENSEMIT
Package: django-var-js
django-var-js/README.rst======Var-js======Var-js is a simple Django application that allows communicationvariables from the server to the client.Installing----------pip install django-var-jsRequirements-----------JQueryQuick start-----------1. Include the var-js URLconf in your project urls.py like this::url(r'^', include('var_js.dj_var_js.urls')),2. In the view.py::from var_js.views import DjVarJsdef example(request):#Valuesvariable = "To JavaScript"dicc = {'key1': 'value1', 'key2': 'value2', 'key3': 'value3'}#Instance of class DjVarJspyvar = DjVarJs()#Set valuespyvar.set("variable", variable , request)pyvar.set("dicc_django", dicc, request)return render_to_response('example.html', context_instance=RequestContext(request))3. In the template::<!DOCTYPE html><html><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script><script src='{{STATIC_URL}}js/var_js/djvarjs.js'></script><script src='{{STATIC_URL}}js/example/main.js'></script></head><body><h1>App Django-var-js</h1><label id="key_js"></label><br><label id="dict_js"></label><body></html>4. In the file .js::var valor = DjVarJs.getKey("variable");$("#key_js").text(valor);var arr = DjVarJs.getDict("dicc_django");$("#dict_js").text("Clave1: " + arr['clave1'] + ", Clave2: " + arr['clave2'] + ", Clave3: " + arr['clave3']);5. Visit http://127.0.0.1:8000/example/
Package: django-varlet
Author:Keryn KnightVersion:0.2.3ReleaseStatusstable (0.2.3)masterAn implementation of models, views etc. that can act aspages, though they
have no content fields to speak of. Bring Your Own Content.Pages consist only of a URL and a way to render a template at that URL. The
default model implementation usesdjango-templateselectorto provide template
selection from HTML files within<templatedir>/varlet/pages/layoutsThe application usesswapperto theoretically allow for using a different
model.If the application is mounted at the project root/, Pages may not have
URLs which collide with those of another application in the urlconf.The licenseIt’s theFreeBSD. There’s should be aLICENSEfile in the root of the repository, and in any archives.Copyright (c) 2017, Keryn Knight
All rights reserved.Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 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 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.Change history for django-varlet0.2.3Autocomplete outside of the tests & demo project (ie: any actual usage)
wasn’t working, and worse, was causing aTemplateDoesNotExistexception
for the change form. See6b8487db38a5c0abab7af324cf05b2144f4dea670.2.2Fixed tests which broke via continuous integration, but didn’t with my local
requirements, because I’d introduced further validation indjango-templateselectorSee9834ef35189805152f1a61f6b7d02d5f4a20c06efor the changes.0.2.1Added typeahead/autocomplete to the URL field for a page.0.2.0Initial release