Saravanan666/pypi-org huggingface dataset:
Package: django-doctor
django-doctorDjango code quality assistant. Offline version ofhttps://django.doctorFind and fix around 40 breaches of Django best practice - helping you build world-class websites, release faster, and reduce dev costs.Installation$ pip install django-doctorFixRun the fix suggestion wizard like so:$ django_doctor fixThis runs a simple server onhttp://localhost:9000and opens the wizard in your browser:You then accept or reject the suggestionsAnd ultimately the selected changes are saved to your file systemYou can change the address:$ django_doctor fix --address=0.0.0.0 --port=9001Your virtual environment directory is automatically skipped. To exclude other directories use the--ignoreflag:$ django_doctor fix --ignore=foo # single directory
$ django_doctor fix --ignore=foo --ignore=bar # multiple directoriesYou can also specify a directory to check instead of running on the current working directory. To run on only on "my_app" and "my_other_app":$ django_doctor fix my_app my_other_appCheckYou can see suggested changes in your shell:$ django_doctor checkConsider running this as a pre-commit hook, or on your CI to prevent new Django anti-patterns from being merged.You can also use--ignorethe same as with thefixcommand.ConfigurationYou turn checks on/off with--disableand--enable. Seeherefor the codenames of the checks.TroubleshootingDebuggingTry runningdjango_doctorin verbose mode by adding--log-level=debugwhen executing thefixorcheckcommands.PipenvIf you're usingpipenvyou may need to dopipenv install django-doctor --prebecause:django-doctordepends onblackblackonly releases pre-releasespipenvignores pre-releasesSupportChat with us onhttps://django.doctorif you have any problems or have a feature requestGitHub integrationDjango Doctor has GitHub integration. Learn more athttps://django.doctor/github
Package: django-documentation
=====================================Django-documentation=====================================This `Django <http://djangoproject.com>`_ app has for purpose to integrateprotected sphinx based documentation .Installation============Depedencies~~~~~~~~~~~django-documentation depends on `Sphinx <http://sphinx.pocoo.org>`_Installing django-simple-feedback~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Install into your python path using pip::pip install django-documentationpip install -e git+git://github.com/Narsil/django-documentation.git#egg=django-documentationAdd *'documentation'* to your INSTALLED_APPS in settings.py::INSTALLED_APPS = (...'documentation',)Add *'(r'^docs/', include('documentation.urls')'* to your urls::urlpatterns = patterns( '',....(r'^docs/', include('documentation.urls'),)Settings~~~~~~~~Set up where is your documentation, and a function that has a user for argumentand returns **True** if user is allowed to see the doc. If you plan on using``lambda user: True``, then you probably should not be using this app, asstaticfiles would be better suited for this task. ::DOCUMENTATION_ROOT = '/path/to/docs/'DOCUMENTATION_ACCESS_FUNCTION = lambda user: user.is_staffThe DOCUMENATION_ROOT is the root of your sphinx doc where the Makefile exists, if you html docs isplaced somewhere else than ``DOCUMENTATION_ROOT + '_build/html/'`` then youcan override it with::DOCUMENTATION_HTML_ROOT = '/my/other/location/Note that django-documentation serves the content via x-sendfile when DEBUGis False, otherwise it uses`django.views.static.serve <https://docs.djangoproject.com/en/dev/howto/static-files/#django.views.static.serve>`_To override use ::DOCUMENTATION_XSENDFILE = Truedjango-documentation also comes with a command goodies ::./manage.py makedocto generate the documentation.
Package: django-document-catalogue
Django Document CatalogueVersion: 0.4.0Simple, light-weight, stand-alone, hierarchical document library as a
reusable django app.Use Case:you need a library of static media documents (PDF or other formats);documents are organized in hierarchical categories;Features:permanent URLs for direct access to document, category, and file download (even if filename changes)opt-out private file storage (file storage / downloads protected by login, on by default)plugin permissions settingsplugin document list view customizationupload / edit / delete documents via django admin, and/or..,opt-in user-facing edit / upload / delete views and AJAX APIDependencies:python 3.7+django 3.2+django-mpttConfigurable file handling:django-private-storageordjango-constrainedfilefieldpython-magic(if you want to validate file content_types)Opt-in:dropzone: drag-and-drop file uploadsdjango-admin-sortable2: drag-and-drop document orderingGet Me Some of ThatSource CodeRead The DocsIssuesPyPIMIT License
Package: django-document-library
A Django application to manage multilingual documents and display them on your
site in a downloads section.Comes with a django-cms apphook and is based on django-filer.InstallationIf you want to install the latest stable release from PyPi:$ pip install django-document-libraryIf you feel adventurous and want to install the latest commit from GitHub:$ pip install -e git://github.com/bitmazk/django-document-library.git#egg=document_libraryAdddocument_libraryto yourINSTALLED_APPS:INSTALLED_APPS = (
    ...,
    'document_library',
)Run the migrations:./manage.py migrate document_libraryAdmin inlineYou can attach documents to any model. To make things easier, you can add
a tabular inline to your model’s admin which allows to attach documents.In your project’smodels.pyor any file that get’s loaded early, do the
following:from yourapp.admin import YourAdmin
from object_attachments.admin import ObjectAttachmentInline

YourAdmin.inlines = YourAdmin.inlines[:] + [ObjectAttachmentInline]Templatetagsget_files_for_documentsUse this templatetag in order to render all files for a given document:{% load document_library_tags %}
{% get_files_for_document document as files %}
{% for file in files %}
    <p><a href="{{ file.url }}">{{ file.name|default:file.original_filename }}</a></p>
{% endfor %}get_frontpage_documentsUse this templatetag if you want to render a list of documents on your
frontpage:{% load document_library_tags %}
{% get_frontpage_documents as documents %}
<ul>
    {% for document in documents %}
        <li><a href="/url/to/library/">{{ document.get_title }}</a></li>
    {% endfor %}
</ul>SettingsDOCUMENT_LIBRARY_LOGIN_REQUIREDDefault:FalseSet this toTrueif you wand to require login for the views of this app.DOCUMENT_LIBRARY_PAGINATION_AMOUNTDefault: 1Amount of documents display on one page.DOCUMENT_LIBRARY_PAGINATE_BY_CATEGORIESDefault: FalseEnables a special ordering of the document list to always show an equal amount
of documents for each category.SitemapsTo add a sitemap of your documents, add the following to your urlconf:from document_library.sitemaps import DocumentSitemap

urlpatterns += patterns(
    '',
    url(r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', {
        'sitemaps': {
            'documents': DocumentSitemap,
        }, }),
)ContributeIf you want to contribute to this project, please perform the following steps# Fork this repository
# Clone your forkmkvirtualenv-ppython2.7django-document-librarymakedevelopgitco-bfeature_branchmaster# Implement your feature and testsgitadd.&&gitcommitgitpush-uoriginfeature_branch# Send us a pull request for your feature branchIn order to run the tests, simply executetox. This will install two new
environments (for Django 1.8 and Django 1.9) and run the tests against both
environments.
Package: django-documents
This simple app provides:a Document model with:a generic many to many relationa file field that uploads to a private directorya method get_download_url()a view to download a document which allows custom security checks through a
signala signal, document_pre_download, that is emited by the download view, and
which responds with 503 if emiting the signal raises a DownloadForbidden
exceptionclean admin integrationsouth supportInstall django-generic-m2mRefer todjango-generic-m2m installation documentation, do “Installation” and “Adding to your Django Project”.Install autocomplete_lightRefer todjango-autocomplete-light installation documentation, do “Quick install” and “Quick admin integration”.Install django-documentsDownload the lastest release:pip install django-documentsOr install the development version:pip install -e git+https://github.com/yourlabs/django-documents.git#egg=documentsAdd to settings.INSTALLED_APPS:'documents',If using south, run:./manage.py migrateElse, run:./manage.py syncdbAdd to urls.py:url(r'^documents/', include('documents.urls')),Set settings.DOCUMENTS_UPLOAD_TOto the absolute path where uploads should
be stored. This must be a private directory.Prepare the generic many to many autocompleteRegister ageneric autocomplete,
with name “AutocompleteDocumentRelations”. There is an example intest_projectwhich is imported inurls.py.
Refer thedjango-autocomplete-light documentation about the registryfor alternative methods.If the project already uses django-generic-m2m and django-autocomplete-light, a
good solution is to re-register the project’s generic autocomplete with
name=’AutocompleteDocumentRelations’, ie.:# your project specific autocomplete
class AutocompleteProject(autocomplete_light.AutocompleteGenericBase):
    # ....

# register for your project needs
autocomplete_light.register(AutocompleteProject)

# registery for documents relations
autocomplete_light.register(AutocompleteProject,
    name='AutocompleteDocumentRelations')Secure your documentsConnect to document_pre_import, for example:# project specific document permissions
import documents
def document_security(sender, request, document, **kwargs):
    if not request.user.is_staff:
        raise documents.DownloadForbidden()
documents.document_pre_download.connect(document_security)Display documents related to a modelUse get_related_documents() from Python:from documents.models import get_related_documents

your_model = YourModel.objects.get(pk=XXX)

related_documents = get_related_documents(your_model)Or from a template:{% load documents_tags %}

{% for document in your_model|get_related_documents %}
    {{ document }}
{% endfor %}Note that get_related_documents() returns a QuerySet, ie. you can get a count:get_related_documents(your_model).count()Or from a template:{% with related_documents=your_model|get_related_documents %}
    {{ related_documents.count }}
{% endwith %}
Package: django-docusign
django-docusigndjango-docusignis a Django application forDocuSign’s digital signature
SAAS platform.It usespydocusignasPythonclient.
It implementsdjango-anysignAPI.Project statusdjango-docusignis under active development. The project is not mature yet,
but authors already use it! It means that, while API and implementation may
change (improve!) a bit, authors do care of the changes.Also, help is welcome! Feel free to report issues, request features or
refactoring!ResourcesDocumentation:https://django-docusign.readthedocs.orgPyPI page:https://pypi.org/project/django-docusign/Bugtracker:https://github.com/peopledoc/django-docusign/issuesChangelog:https://django-docusign.readthedocs.org/en/latest/about/changelog.htmlCode repository:https://github.com/peopledoc/django-docusignContinuous integration:https://travis-ci.org/peopledoc/django-docusign
Package: django-docutils
django-docutils ·docutils (a.k.a. reStructuredText / rst / reST) support for Django.QuickstartInstall django-docutils:$pipinstalldjango-docutilsNext, adddjango_docutilsto yourINSTALLED_APPSin your settings file:INSTALLED_APPS=[# ... your default apps,'django_docutils']Template tagIn your template:{%loaddjango_docutils%}{%rst%}# hey# how's it goingA. howsB. itC. goingD. today**hi***hi*{%endrst%}Template filterIn your template:{%loaddjango_docutils%}{%filterrst%}# hey# how's it goingA. howsB. itC. goingD. today**hi***hi*{%endfilter%}Template engine (class-based view)You can also use a class-based view to render reStructuredText (reST).If you want to use reStructuredText as a django template engine,INSTALLED_APPSisn'trequired,
instead you add this to yourTEMPLATESvariable in your settings:TEMPLATES=[# ... Other engines{"NAME":"docutils","BACKEND":"django_docutils.template.DocutilsTemplates","DIRS":[],"APP_DIRS":True,}]Now django will be able to scan for .rst files and process them. In your view:fromdjango_docutils.viewsimportDocutilsViewclassHomeView(DocutilsView):template_name='base.html'rst_name='home.rst'Settings# Optional, automatically maps roles, directives and transformersDJANGO_DOCUTILS_LIB_RST={"docutils":{"raw_enabled":True,"strip_comments":True,"initial_header_level":2,},"roles":{"local":{"gh":"django_docutils.lib.roles.github.github_role","twitter":"django_docutils.lib.roles.twitter.twitter_role","email":"django_docutils.lib.roles.email.email_role",}},"directives":{"code-block":"django_docutils.lib.directives.code.CodeBlock",}}# OptionalDJANGO_DOCUTILS_LIB_TEXT={"uncapitalized_word_filters":["project.my_module.my_capitalization_fn"]}More informationPython 3.8+Django 3.2+
Package: django-doc-view
# django-doc-view: The simplest way to document your Django APIs[![license: MIT](https://img.shields.io/github/license/ocavue/django-doc-view.svg)](https://github.com/ocavue/django-doc-view/blob/master/LICENSE)[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)[![PyPI](https://img.shields.io/pypi/v/django-doc-view.svg)](https://pypi.org/project/django-doc-view)`django-doc-view` find view's docsting and output them in shell after formatting.## Installation```bashpip3 install django-doc-view```## Base UsageAdd `django_doc_view` to your INSTALLED_APPS setting:```python# settings.pyINSTALLED_APPS = (...'django_doc_view')```Then you can get the result by doc_view command:```bashpython3 manage.py doc_view```## Example```pythondef index(request):"""A example of Function-based view"""return HttpResponse("Hello, world. You're at the polls index.")class User(View):"""A example of Class-based viewmethod:getrequest:id"""def get(self, request, *args, **kwargs):...``````bash$ python3 manage.py doc_view## polls/A example of Function-based view## polls/userA example of Class-based viewmethod:getrequest:id```You can find a runnable example from [here](https://github.com/ocavue/django-doc-view-emample).
Package: django-docviewer
django-docview is a fork of document-viewerhttps://github.com/NYTimes/document-viewerAll dependecies to jammit and ruby have been removed and replaced by django-pipeline
document-viewer was only a client viewer, django-docview store document data and generate data using docsplit (https://github.com/documentcloud/docsplit) and celery.Please read original licences in docviewer directory
Package: django-dogstorage
====================django-dogstorage====================dogstorage is a so called *development storage engine*.Many people have the problem with gigantomanic production databases withgigabytes of pictures/files. It is a pain to keep the image files synchronisedbetween development and production environments.Therefore I have written this storage engine. In case a file is not found,an image from placedog.com_ will be used/displayedinstead.If you are sick of dogs, you might want to check out _django-kittenstorage_.Setup=====It's on pypi.``pip install django-dogstorage``Feel free to clone from github too. Forking is welcome as well :-)In your django settings file:``DEFAULT_FILE_STORAGE = 'dogstorage.storages.GreyDog'``Storage Engines===============dogstorage offers two engines:1. ``dogstorage.storages.GreyDog``2. ``dogstorage.storages.ColorDog``Choose depending on the saturation you want. I prefer ``GreyDog`` since itdoes have a pretty classy look.Settings========There is only one setting:DOG_SIZEDefault: ``(1024, 1024)``A tuple of format `(width, height)`, specifiying the size of the imagerequested from placedog__... _placedog.com: http://placedog.com/__ placedog.com_
Package: django-doh
Django-dohDjango-doh is a simple Django app to serve a DOH (DNS Over HTTPS) Proxy. It resolves DNS query on HTTP.Quick startInstall via pip:pip install django-dohAdd'doh_server'to yourINSTALLED_APPSsetting like this:INSTALLED_APPS = [
    ...
    'doh_server',
]Include thedoh_serverURLconf in your project urls.py like this:path('dns-query', include('doh_server.urls')),Add the conf in your settings like this:DOH_SERVER = {
    "RESOLVER": "internal",
    # "RESOLVER": "8.8.8.8",
    "AUTHORITY": "",
    "LOGGER_LEVEL": "DEBUG",
}To use the local resolver on the server where you run Django, use"internal".ImplementationRFC 8484https://www.rfc-editor.org/rfc/rfc8484.txtJson implementationhttps://developers.cloudflare.com/1.1.1.1/dns-over-https/json-format/Use with Firefoxinabout:configedit:network.trr.mode;3
network.trr.uri;https://127.0.0.1/dns-queryFor the URI, add your URI for your reverse proxy serving Django.You can use Nginx as reverse proxy :events {
}
http {
    server {
        listen 443 ssl http2 default_server;
        location /dns-query {
            proxy_set_header Host $host;
            proxy_pass http://127.0.0.1:8000/dns-query;
        }
        ssl_certificate /etc/nginx/cert.pem;
        ssl_certificate_key /etc/nginx/key.pem;
    }
}Test suiteRun usingtox.tox --parallelBenchmarkMacbook Pro 2019
Processor 2,4 GHz Intel Core i5
Memory 8 GB 2133 MHz LPDDR3Server Django and a reverse proxy Nginx in a Docker container.apib -c 100 -d 60 @benchmark_get_url.txtHTTP/1.1
Duration:             60.032 seconds
Attempted requests:   7911
Successful requests:  7911
Non-200 results:      0
Connections opened:   104
Socket errors:        0

Throughput:           131.780 requests/second
Average latency:      734.647 milliseconds
Minimum latency:      27.760 milliseconds
Maximum latency:      9819.022 milliseconds
Latency std. dev:     710.929 milliseconds
50% latency:          606.548 milliseconds
90% latency:          1360.734 milliseconds
98% latency:          2845.927 milliseconds
99% latency:          3612.085 milliseconds

Client CPU average:    0%
Client CPU max:        0%
Client memory usage:    0%

Total bytes sent:      1.15 megabytes
Total bytes received:  2.44 megabytes
Send bandwidth:        0.15 megabits / second
Receive bandwidth:     0.33 megabits / second
Package: django-doma
domadomais a simple document managment app for django.
It provides the necessary models and view and is ready to be included into your project.Detailed documentation is in the "docs" directory.CompatibilityTested with the following versions of Python/Django:Django: 2.2, 3.0,, 3.1, 3.2Python: 3.7, 3.8, 3.9Pypy: Pypy3InstallationInstalldjango-domausing pip:$pipinstalldjango-domaQuick startAdd "doma" to your INSTALLED_APPS setting like this::INSTALLED_APPS=[..."doma",]Include the polls URLconf in your project urls.py like this::path('doma/', include('doma.urls')),Runpython manage.py migrateto create the doma models.Visithttp://127.0.0.1:8000/doma/to start accounting.
Package: django-domainname
django-domainnamedjango-dominname is a simple django app including a model field and a form field to deal with Domain names.Getting Started1.Installation:git clone https://github.com/MehdioKhan/django-domainname
  cd djanago-domainname
  python setup.py installorpip install django-domainname2.Add django_dnf to installed list in settings file:INSTALLED_APPS = [
        ...
        'django_dnf',
        ]3.Use DomainNameField in your models and forms:models.pyfrom django.db import models
        from django_dnf.fields import DomainNameField

        class MyModel(models.Model):
              doamin = DomainNameField(blank=True)
              ...forms.pyfrom django import forms
        from django_dnf.formfields import DomainNameField

        class MyForm(forms.Form):
        doamin = DomainNameField(blank=True)
        ...
Package: django-domains
==============django-domains==============.. image:: https://badge.fury.io/py/django-domains.png:target: http://badge.fury.io/py/django-domains.. image:: https://travis-ci.org/marazmiki/django-domains.png?branch=master:target: https://travis-ci.org/marazmiki/django-domains.. image:: https://coveralls.io/repos/marazmiki/django-domains/badge.png?branch=master:target: https://coveralls.io/r/marazmiki/django-domains?branch=master.. image:: https://pypip.in/d/django-domains/badge.png:target: https://pypi.python.org/pypi/django-domainsInstallation------------1. Install the package.. code:: bashpip install django-domains2. Open settings.py and add middlewares into end of MIDDLEWARE_CLASSES tuple:.. code:: pythonMIDDLEWARE_CLASSES += ('domains.middleware.RequestMiddleware','domains.middleware.DynamicSiteMiddleware',)First middleware ``domains.middleware.RequestMiddleware`` is required, becauseit sets the `request` object into local thread.Second middleware ``domains.middleware.DynamicSiteMiddleware`` is optional. Youcan use it for dynamical changing `SITE_ID` parameter corresponding site's PKwith requested domains (see Django sites framework).If you also want to use different templates for domains, add template loadersin begin of TEMPLATE_LOADERS tuple:.. code:: pythonTEMPLATE_LOADERS = ('domains.loaders.filesystem.Loader','domains.loaders.app_directories.Loader',# another loaders)3. Run tests:.. code:: bash./manage.py test domainsUsage-----If you want to use different template sets for each domains, just createdirectories with name `domainname.tld` (don't forget add TEMPLATE_LOADERSas figured in Installation) and put templates here.Also you can use custom function that builds domain name. You must add`DOMAINS_TEMPLATE_NAME_FUNCTION` attribute into your settings.py andspecify path to naming function.Function must return tuple with path fragments. This fragments will bejoined into full template path with django-domains.Expect you call this function `my_custom_template_name` and placed it in`my/project/utils.py`:Btw, you can access to `request` :).. code:: pythondef my_custom_template_name(template_dir, template_name):"""This function generates template path in format:{template_dir}/custom/domains/{host}/{template_name}"""from domains.utils import get_requestrequest = get_request()return (template_dir, 'custom', 'domains', request.get_host,template_name)Add into your `settings.py` this line:.. code:: pythonDOMAINS_TEMPLATE_NAME_FUNCTION = 'my.project.utils.my_custom_template_name'0.6.0-----* Drop support of older python versions (2.6, 3.2, 3.3)* Drop support of older Django versions (1.6 and older)* Add support for Python 3.5* Add support for Django 1.9  (thanks to `Jordan Reiter <mailto:jordanreiter@gmail.com>`_* Migrate to Django Applications API (thanks to `Jordan Reiter <mailto:jordanreiter@gmail.com>`_* Improve PEP-0008 support and some minor code refactoring0.5.2-----* Update head django versions0.5.1-----* Update head django versions0.5---* Added support Django 1.8* New hook machinery0.2---* Improves pep8;+ Support for Django 1.4, Django 1.5, Django 1.6, Django1.7+ Added Travis CI integration
Package: django-domain-specific-language
django-dslRequirementsPLYDjangoInstallationpip install django-domain-specific-languageUsageAllows you to search by specifying the name of the column of the
database.Characters allowed:Key (column name) :A-Za-z0-9_.Value : all except ')' '(' and white space.Query Parser Syntax:Wildcard Searches: **test : All that ends by testtest* : All that starts by test*test* : All that contains test\*test\*: All equal to *test*\*test*: All that starts by *test*test\*: All that ends by test*RegexSearches: ~~\W+ : Matches any character which is not a word character.\~test : Matches all equal to ~test.Boolean Operators: AND OR NOTGrouping: ( )Date and number Searches (operators: < > <= >=) :key>2 : All greater than 2key<=2 : All less than or equal to 2key>2018-05-04 : All greater than 2018-05-04key<=2018-05-04 : All less than or equal to 2018-05-04Date Range Searches (inclusive) (which correspond to SQL queries of BETWEEN):key:2018-05-04_2018-05-05Null Searches (which correspond to SQL queries of IS NULL and IS NOT NULL):key:Truekey:FalseExampleYour database:The possible researches:Country:India AND Product:Ice-creamCountry:*a* AND NOT Product:~.*e$In your code:from django_dsl.run import compile_expr
query = compile_expr(request.GET['expression'])
cls.objects.filter(query)