Saravanan666/pypi-org huggingface dataset:
Package: django-drupal-auth-backend
This package provides an authentication backend that can be used to
facilitate migrating users from a Drupal-based website into a
Django-based web application.Quick startInstalldjango_drupal_auth_backend:$pipinstalldjango_drupal_auth_backendIn your settings module you will need to add the new hasher to :PASSWORD_HASHERS=('django.contrib.auth.hashers.PBKDF2PasswordHasher','django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher','django.contrib.auth.hashers.BCryptPasswordHasher','django.contrib.auth.hashers.SHA1PasswordHasher','django.contrib.auth.hashers.MD5PasswordHasher','django.contrib.auth.hashers.CryptPasswordHasher','django_drupal_auth_backend.hashers.DrupalPasswordHasher',)Migrating usersYou will need to create a user entry for each user of the old system.
While this will vary from application to application (depending on
whether you override the default user model provided by Django), the
basic step is to copy your user table into Django’s user table. If you
are using Postgres, you can copy the users in with something like this:COPYINTOauth_user(username,password,email,is_active,is_staff)FROMSTDIN;user1drupal_sha512$FYEWxwlWtUUj8uB5QN2K0X9lNrnRl/hLpN3Qp8GK7v8emyc9eRsfuser1@example.comtfuser2drupal_sha512$CsaltsaltA112iY375iFdNhp.gYEWxwlWtXdhjl.8hY7BufRTJ1uuser2@example.comtf\.The most important thing to note with migrated accounts is that the
hashed password being migrated needs to be modified slightly. Drupal
passwords are of the form:$S$CsaltsaltA112iY375iFdNhp.gYEWxwlWtXdhjl.8hY7BufRTJ1u… whereas the migrated passwords need to be of the form:drupal_sha512$CsaltsaltA112iY375iFdNhp.gYEWxwlWtXdhjl.8hY7BufRTJ1uThe important distinction is that the$S$at the start of the hash
needs to be converted todrupal_sha512$for the Django
authentication backend subsystem to be able to recognize it and assign
it to theDrupalPasswordHasher. Note that the example table copy
command above is using passwords of the right form.Full documentation(needs additional documentation)ContributingContributions are welcome.LicensingThis software is licensed under the GNU 3.0 license to comply with the
Drupal license requirements for derivative works. Parts of this code are
directly converted to Python from code in the Drupal project.
Package: django-dry-tests
Django DRY TestsPackage with new powerful TestCases and Assets to test django application fast. TDD is supportedYou can findFull Project DocumentationhereWorkflowsPackageSupportDownloadsLanguagesDevelopmentMenuMissionOpen Source ProjectFeaturesRequirementsDevelopment StatusInstallQuickstartContributingMissionThe mission of theDjango DRY Teststo design and develop open source python package to testdjangoapplicationfastwith minimal code duplicationwith the ability to useTDDeasilysimple and comfortableOpen Source ProjectThis is the open source project withMIT license.
Be free to use, fork, clone and contribute.FeaturesSpecialRequest,ResponseandFormclasses to simple set test dataSpecialSimpleTestCaseandTestCaseclasses with new asserts:The main asserts isassertTrueResponseandassertTrueForm. You can use this for most cases.Other special asserts (See more inFull Documentation)RequirementsDjango==4(Lower versions haven't been tested)See more inFull DocumentationDevelopment StatusPackage already available onPyPiSee more inFull DocumentationInstallwith pippip install django-dry-testsSee more inFull DocumentationQuickstartTo test viewclassQuickStartViewSimpleTestCase(SimpleTestCase):"""SimpleTestCase example"""deftest_get(self):"""Test Example with django-dry-tests:return:"""# Create Request Modelrequest=Request(url='/quickstart/')# Create Response Model to check all view.# You can set only one param without others to check it.true_response=TrueResponse(status_code=200,context=Context(keys=['quickstart'],# check that quickstart key in contextvalues=['Quickstart'],# check that "Quickstart" value in contextitems={'quickstart':'Quickstart'},# check both keys and values in contexttypes={'quickstart':str}# check values types without check values),content_values=['Quickstart','<h1>Quickstart title</h1>'],# check values after template will be rendered)# get url response with Django default Test Clientcurrent_response=request.get_response(self.client)# Use main assert to run all assertsself.assertTrueResponse(current_response,true_response)To test FormclassExampleFromTestCase(SimpleTestCase):"""Example Form Test Class"""deftest_form(self):"""Example Test with django-dry-tests:return:"""true_form=TrueForm(# Set Up TrueForm instanceFields(# TrueForm Fieldscount=2,# check fields countnames=['number','name'],# check field namestypes={'name':forms.CharField,'number':forms.IntegerField}# check fields types),)current_form=ExampleForm()# Get project formself.assertTrueForm(current_form,true_form)# use this main assert to check all conditionsMore examples inFull DocumentationContributingYou are welcome! To easy start please check:Developer GuidelinesDeveloper DocumentationCode of ConductSecurity Policy
Package: django-dsfr
Django-DSFRDjango-DSFR is a Django app to integrate theFrench government Design System (“Système de design de l’État français”).This app is very much a work in progress. See thedocumentation (in French)for details.Django-DSFR (partly) implements theversion 1.11 of the DSFR.RequirementsTested with Python 3.8 to 3.11 and Django 3.2 to 5.0. Pervermin, it should work with Python >= 3.6, and it should work with old versions of Django too.Note: Only supported versions of Django and Python are supported by this project. You can check the supported versions and their end of life on the following pages:PythonDjangoQuick startSee theINSTALL.mdfile.HistoryThis app was originally created as a part ofOpen Collectivitésin 2020. In 2022, I continued to manage it as part of my mission atAides-territoiresand I now continue to do so at@numerique-gouvalong with the Wagtail-basedContent Manager.
Package: django-dsl
DSL for Django ORMThis is a simple query language for Django ORM. You can give it to your
customers so they will be able to filter the database without having
to edit code.From one side, you feed it with a string, supplied by the user. And, it
gives you Q-objects, ready to be used inQuerySet.filter()call.Please seetests/test_dsl.pyfile for example usage.Running TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxHistory0.1.12 (2022-07-07)Support Python 3.10 and Django 3.2support GitHub Actions instead of Travis0.1.0 (2017-07-21)First release on PyPI.
Package: django-dsm-feedback
====Feedback====Simple app for feedbackQuick start-----------1. Add "feedback" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [...'feedback',]2. Include the feedback URLconf in your project urls.py like this::path('feedback/', include('feedback.urls'))3. Run `python3 manage.py migrate` to create the feedback models.4. Start the development server and visit http://127.0.01:8000/admin/ to createa feedback (you'll need the Admin app enabled).
Package: django-dtpanel-htmltidy
HTML Tidy/Validator Panel for Django Debug Toolbar========The Django Debug Toolbar is a configurable set of panels that display variousdebug information about the current request/response and when clicked, displaymore details about the panel's content.HTML Tidy or HTML Validatory is custom panel for Django Debug Panel whichvalidate your HTML and display warning and errors as panel.Panel code based on PyTidyLibInstallation & Configuration-----------------1. Install and configure `django-debug-toolbar` app1. Add the `debug_toolbar_htmltidy` directory to your Python path.1. Add `debug_toolbar_htmltidy` to your `INSTALLED_APPS` in `settings.py` file:***INSTALLED_APPS += ('debug_toolbar_htmltidy',)1. Add the following panel to your Django Debug Toolbar panelsconfiguration tuple in `settings.py` file:***DEBUG_TOOLBAR_PANELS = (...'debug_toolbar_htmltidy.panels.HTMLTidyDebugPanel',)1. Include in file which specified in `ROOT_URLCONF` setting in `settings.py`url to `HTMLTidyDebugPanel` media:***url(r'^', include('debug_toolbar_htmltidy.urls'))Running the Tests-----------------The HTML Tidy Panel for Django Debug Toolbar includes a test suite::python setup.py testTests result=================Django	Debug Toolbar	Status------------------------------1.1.1	0.8.5			passed1.1.1	0.8.4			passed1.1.1	0.8.3			passed1.1.1	0.8.2			passed1.1.1	0.8.1			failed1.1.1	0.8.0			failed1.2		0.8.5			passed1.2		0.8.4			passed1.2		0.8.3			passed1.2		0.8.2			passed1.2		0.8.1			failed1.2		0.8.0			failed1.3		0.8.5			passed1.3		0.8.4			passed1.3		0.8.3			passed1.3		0.8.2			passed1.3		0.8.1			failed1.3		0.8.0			failedTODOs and BUGS==============See: [issue tracker on github](https://github.com/joymax/django-dtpanel-htmltidy/issues)
Package: django-dublincore
A Django plugin app for applying Dublin Core Metadata to any Django model.This uses the Django contenttype framework and generic relations to apply a varying number of
metadata terms to any Django model.[Dublin Core Metadata Terms]Quick startgit clonehttps://github.com/mredar/django-dublincore.gitcd django-dublincorepython setup.py installAdd “dublincore” to your INSTALLED_APPS setting:INSTALLED_APPS = (
        ...
       'dublincore',
)Runpython manage.py syncdbto create the dublincore db tables.Start the development server and visithttp://127.0.0.1:8000/admin/to attach some Dublin Core metadata to your objects. (admin app must be installed)Add this to models you wish to add dublincore attributes to:from django.contrib.contenttypes import generic
from dublincore.models import QualifiedDublinCoreElement
...

class Thing(models.Model):
    '''Some Thing
    with dublincore metadata attached
    '''
    QDCElements = generic.GenericRelation(QualifiedDublinCoreElement)TODO:Make tests work from clean installimprove install process (one cmd)performance analysis - i’ve read that abstract classes containing datbase fields have a bad performance hit.sample views and usageBetter Documentationsupport dublin core terms (currently just element with “qualifier”)
Package: django-dublincore-resource
Django Dublin Core ResourceA Django model and admin interface to manage metadata about your resources
usingstandard Dublin Core (DC) schema.The approach taken by this app is to centralise all your resource metadata
into a single table.Data ModelsAbstractDublinCoreResourcean abstract Django Model that replicate the Dublin Core schemaeachDC element(dc:) is represented by a fieldsomeDC terms(dcterms:) are also includedmakes use of ControlledTermField for links to controlled vocabulariesDublinCoreResourceinherit from AbstractDublinCoreResourceDublinCoreAgentrepresents a person or organisationDublinCoreRightsrepresents Rights statements that can be shared among your resourcesFeaturesOne centralised table for all your resourceStandard Dublin Core elements/fieldsLookup values into authority lists / controlled vocabulariesInline description of all fieldsExtensible model[TODO] optional integration with Wagtail Image gallery and Documents[TODO] smart bulk import/update from CSV[TODO] advanced input validations[TODO] API / export into various standard formats[TODO] support for file attachment / upload[TODO] support for bibliographic citation parsing / extraction[TODO] support forEDTF dates[TODO] use Creative Commonsbest practicesandschemafor the rightsSet upInstallationFirstinstall django-controlled-vocabulary.Then install the django-dublincore-resource app:pip install django-dublincore-resourceAdd the app to the INSTALLED_APPS list in your Django settings.py file:INSTALLED_APPS = [
    ...
    'dublincore_resource',
    ...
]Run the schema migrations:./manage.py migrateConfigurationThe following settings vars are defined by default but can be overridden
in your Django settings.py.By default this app provides a DublinCoreResource model that inherit
from the abstract AbstractDublinCoreResource model. Set the following to
False to define your own model.# Set to True to disable the DublinCoreResource model and define your own
DUBLINCORE_RESOURCE_ABSTRACT_ONLY = False# The path where resource file are uploaded, relative to your MEDIA path
DUBLINCORE_RESOURCE_UPLOAD_PATH = 'uploads/dublin_core/'
Package: django-duke
django-duke-coreA project to help you build your django project faster by using a collection of predefined apps.ApproachThis project is a collection of django apps that can be used to build a django project faster.
The apps are also designed to be as independent as possible so that you can use only the apps you need.EntrypointsOne of the main mechanism used in this project is theentrypointapproach.
Entrypoints are a way to extend the functionality of a project without having to modify the project itself.Name of the projectEdward Kennedy "Duke" Ellington was an American composer, pianist, and leader of a jazz orchestra.
He was one of the most important musicians in the history of recorded music, and is called one of the greatest figures in jazz music.
He was playing with Django Reinhardt in 1946.
Django is the name of the framework and Duke is the name of the project.
Package: django-dummy-user
Django dummy userDjango generate data dummy userHow to useTo install django-dummy-user you can use pip::pip install django-dummy-user==0.1ConfigurationIn django application `settings.py`::

    INSTALLED_APPS = (

        # ...
        'dummy-user',
    )



Running the package
-----------------

Generate user 

    $ python manage.py create_user <int:total>

Delete all user

    $ python manage.py delete_all_users


Source: https://github.com/keselyoleren/django-dummy-user/
Package: django-dumpdata-field
Django Dumpdata Field============custom dumpdata and loaddata commands that allow to export given fields of a modelInstallation------------To get the latest stable release from PyPi.. code-block:: bashpip install django-dumpdata-fieldTo get the latest commit from GitHub.. code-block:: bashpip install -e git+git://github.com/bitmazk/django-dumpdata-field.git#egg=dumpdata_fieldTODO: Describe further installation steps (edit / remove the examples below):Add ``dumpdata_field`` to your ``INSTALLED_APPS``.. code-block:: pythonINSTALLED_APPS = (...,'dumpdata_field',)Add the ``dumpdata_field`` URLs to your ``urls.py``.. code-block:: pythonurlpatterns = patterns('',...url(r'^/', include('dumpdata_field.urls')),)Before your tags/filters are available in your templates, load them by using.. code-block:: html{% load dumpdata_field_tags %}Don't forget to migrate your database.. code-block:: bash./manage.py migrate dumpdata_fieldUsage-----TODO: Describe usage or point to docs. Also describe available settings andtemplatetags.Contribute----------If you want to contribute to this project, please perform the following steps.. code-block:: bash# Fork this repository# Clone your forkmkvirtualenv -p python2.7 django-dumpdata-fieldmake developgit co -b feature_branch master# Implement your feature and testsgit add . && git commitgit push -u origin feature_branch# Send us a pull request for your feature branch
Package: django-dumpdata-one
Django Dumpdata OneCustomdumpdatacommand which allows to exporting from given fields of a model
and filter that data using standard Django lookups for filtering.The exported data structure is compatible with Djangodumpdatastructure which
allows you to use standardloaddatacommand for import.InstallationTo get the latest stable release from PyPipipinstalldjango-dumpdata-oneAdddumpdata_oneto yourINSTALLED_APPSINSTALLED_APPS=(...,"django_dumpdata_one",)UsageExport data:./manage.pydumpdata_oneapp_name.model_name--fields=field1,field2>dump_file.jsonImport data:./manage.pyloaddatadump_file.jsonHow to use filters? If you not familiar take a look at Django Field
lookups -https://docs.djangoproject.com/en/3.0/topics/db/queries/#field-lookups./manage.pydumpdata_oneapp_name.model_name--fields=field1--filter=name__icontains=django./manage.pydumpdata_oneapp_name.model_name--fields=field1--filter=name__icontains=django,pk__gt=300Set order by:./manage.pydumpdata_oneapp_name.model_name--fields=field1,field2--order=field2,field2Export all fields:./manage.pydumpdate_oneapp_name.model_name--fields=*Limit number of exported records:./manage.pydumpdata_oneapp_name.model_name--fields=*--limit=10Export full file URL:./manage.pydumpdata_oneapp_name.model_name--fields=image--full_url=imageExport from another database than ‘default’:./manage.pydumpdata_oneapp_name.model_name--database=other_database
Package: django-dumpdb
django-dumpdbsaves and restored the contents of the database in a simple database-independent format.It is designed to be fast and memory efficient, and can handle a database of
ANY size, in a reasonable time, with a fixed memory footprint.FeaturesStream-oriented file format.Accesses the database directly, bypassing the ORM layer for better performance.Uses server-side database cursors to preserve memory.Can hanldle data withForeignKey('self')and forward references.Supported database backendsdjango-dumpdbuses server-side cursors and deferred foreign key checks, which
is not supported by Django as of now. Therefore, it has to use some DB-specific
code. The following database backends are currently supported:postgresql_psycopg2mysqlsqliteInstallationAdddjango_dumpdbto yourINSTALLED_APPS.Usagemanage.py dumpdb > db.dump
manage.py restoredb < db.dumpOr even:ssh remotehost /var/www/myproject/manage.py dumpdb | manage.py restoredbdjango-dumpdbcan also be used to migrate the data to another database (for
example, from MySQL to PostgreSQL).DisclaimerUSE THIS AT YOUR OWN RISK! THIS SOFTWARE MAY CONTAIN BUGS, AND MAY DESTROY YOUR
DATA AND KILL YOUR PARENTS, EVEN IF USED CORRECTLY. YOU HAVE BEEN WARNED!
Package: django-dump-load-utf8
Django Dump Load UTF-8Django provides great database management, however, thedumpdataandloaddatacommands do not useutf-8encoding.
Thus, many data are not able to dump and load.Feel sorry that I'm not able to provide Django a patch, for the contribution guide is too long to read. If anyone has
time, please help me to merge it to Django.Installationpipinstalldjango-dump-load-utf8UsageAdd toINSTALLED_APPS# settings.pyINSTALLED_APPS=['...','django_dump_load_utf8','...',]Use as amanage.pycommandmanage.pydumpdatautf8--outputdata.json# In another databasemanage.pyloaddatautf8data.jsonAboutIf this is useful, please give me a star!If you have time, please help me merge this to django!The project currently only supports python 3.8+, if you have time, please make it more competitive.
Package: django-duplicate
Django DuplicateDjango-Duplicate has an util tool for making a deep copy of django model instancesduplicate.utils.duplicateCreates and returns a  new object that is identical toinstance.DuplicateMixinMixin for model classes which implements duplicate function as method.fromdjango.dbimportmodelsfromduplicate.modelsimportDuplicateMixinclassBook(DuplicateMixin,models.Model):title=models.CharField(max_lenght=100)author=models.ForegnKey('library.Author')Let's duplicate (shallow copy) book instance:book=Book(title='Two Scoops of Django')boook.save()book_copy=book.duplicate()If you wanna do deep (related models gonna be shallow copied) copy usepathsargument of duplicate method.pathsshould be list of relation paths:book_copy=book.duplicate(paths=['author'])To shallow copy every relation on some level use*symbol:book_copy=book.duplicate(paths=['*'])author.*path would copy also all author relations.There is also symbol~which means "reference relations, but if reference object is duplicated in the context use it instead".You can override fields like this(You cannot override nested m2m fields):book_copy=book.duplicate(paths=['author'],override_fields={'author.name':'Overriden author name'})fromduplicate.utilsimportCallableValuebook_copy=book.duplicate(paths=['author'],override_fields={'author.name':'Overriden author name'})You can also override nested fields with callable that takes instace on which you are overriding field as an argument:fromduplicate.utilsimportCallableValuebook_copy=book.duplicate(paths=['author'],override_fields={'author.name':CallableValue(lambdaauthor:'Professional author name'ifauthor.professionalelse'Author name')})DJANGO_DUPLICATE_KNOWN_RELATIONSTo ensure that code is aware of all possible to duplicate models and relations path project should have settingDJANGO_DUPLICATE_KNOWN_RELATIONSwhich is a dict with model labels as keys and list of model relations as value:DJANGO_DUPLICATE_KNOWN_RELATIONS={"duplicate.Author":["book_set",],"duplicate.Book":["author",],}This app enables check which will throw errors when state of app will not correspond to value ofDJANGO_DUPLICATE_KNOWN_RELATIONS.LicenseThe Django Wicked Historian package is licensed under theFreeBSD
License.
Package: django-duprequests
Middleware for dropping duplicated requestsGetting StartedJust install, register the middleware and enjoy. You can adjust the
timeout for duplicated requests on your settings.py file.PrerequisitesYou need Django >= 1.9 for this to work. It may work on previous
versions, but I haven’t tested it. I also tested with Django 2.0, but it
may still break before it’s released.Installingpip install django-duprequestsAdd the middleware to your MIDDLEWARE or MIDDLEWARE_CLASSES (depending
on your Django version)MIDDLEWARE_CLASSES = [
    (...)
    'duprequests.middleware.DropDuplicatedRequests',
    (...)
]CustomizingAlso onsettings.pyyou can set up a few variables:DUPLICATED_REQUESTS_CACHE_NAME- the name of the cache (default
value isdefault)DUPLICATED_REQUESTS_CACHE_TIMEOUT- cache
timeout (default value is5; in seconds)DUPLICATED_REQUESTS_COOKIE_NAME- name of the cookie set on the
user’s session (default value isdj-request-id)DUPLICATED_REQUESTS_COOKIE_PREFIX- cookie prefix, combined with a
random UUID to set the response cookie (default value isrequest-id-)Running the testsThe test suite runs outside of a django app (it simulates a very simple
one). Just run tests.py and you’re golden.ContributingFeel free to contribute to this project! Documentation is close to
non-existant. Bug reports and enhancement requests can be submitted onhttps://github.com/CraveFood/django-duprequests/issues– Pull Requests
are also welcome!AuthorsSergio Oliveira-Initial work-SeocamDanilo Martins-Packaging and distribution-MawkeeLicenseThis project is licensed under the BSD License - see theLICENSEfile for detailsAcknowledgmentsThe simple test suite was copied from project Django CORS Middleware
by @zestedesavoir –https://github.com/zestedesavoir/django-cors-middleware
Package: django-duration-log
Django Duration Log注册到installed_apps中INSTALLED_APPS=["corsheaders","django_duration_log",···]添加middlewareMIDDLEWARE=["corsheaders.middleware.CorsMiddleware","django_duration_log.middlewares.DjangoDurationLogMiddleware",···]配置环境变量INFLUXDB_ACCESS_TOKEN=os.getenv("INFLUXDB_ACCESS_TOKEN")INFLUXDB_ORG=os.getenv("INFLUXDB_ORG")INFLUXDB_BUCKET=os.getenv("INFLUXDB_BUCKET")INFLUXDB_URL=os.getenv("INFLUXDB_URL")