Saravanan666/pypi-org huggingface dataset:
Package: django-powertables
Destacks PowertablesLink:github.com/destacks/powertablesAboutDestacks Powertables is a sortable filter table implementation for the Django web
framework.Project StateThis project is in the early stages and might be subject to breaking changes until it
reaches its 1.0-release.LicenseThis project is licensed under dual Free Software (AGPL v3+) and commercial license. If
you want to obtain a commercial license, please write to:info@destacks.comIf you want to read the AGPL license text, please look at the fileLICENSE.AGPL.txtin
the root folder of this project.VersionsThe source code in the Free Software AGPL v3+ and commercial license is the same and
does not differ concerning its features. Just the licensing is different; this will
never change.InstallationInstall the app from PyPI:pipinstalldjango-powertablesAdd thepowertablesapp to yourINSTALLED_APPSlist:INSTALLED_APPS=[# ..."powertables",]UsagePlease look at the example project in theexamplefolder on how to use this project.ContributingIf you contribute to this project, you agree that we have the right to license your
contribution under the AGPL v3+, a commercial license, and eventually later release it
into the public domain.Supporting the CommunityFive percent of all gross revenue of this project will be donated to the Django Software
Foundation (later, we might add more projects and organizations).Future-ProofingIf this project reaches its EOL and will not be continued in any other form (that keeps
the intent of the terms in this readme), we will release all source code into the public
domain.ChangesWe might adjust or clarify some text concerning the terms of this project, but only
under the condition that the original intent is kept.Merging of CodeThis project might be merged with other projects by us in the future, but only if the
conditions of the above sections are kept in the merged project.Extraction of CodeParts of this project might be extracted and used in other projects by us in the future,
but only if the conditions of the above sections are kept in the other projects.Affiliation (or lack thereof)This project is independent and not endorsed by or affiliated with the Django Software
Foundation. Django is a registered trademark of the Django Software Foundation.OutlookDestacks Powertables might be extended to be used with other frameworks and programming
languages in the future.
Package: django-powerwiki
A wiki system for Django 2.2+ on Python 3.9+.Project site:http://radiac.net/projects/django-powerwiki/Source code:https://github.com/radiac/django-powerwikiFeaturesRun one or multiple wikis from one installationFull control over who can read and edit content, by user or groupCreate pages in Markdown, reStructuredText, plain text, or extend with a custom formatSyntax highlighting using CodeMirrorFlexible responsive layoutIn-document navigation, full text search, assets support and moreSeeUpgradingfor changelog and upgrade instructionsQuickstartInstall in a single or multiple wiki configuration in your existing Django site - seeInstallationAdd users, wikis and configure permissions in the admin siteWrite pages using your choice of markup language - seeUsage
Package: django-prbac
(Parameterized Role-Based Access Control)https://github.com/dimagi/django-prbacAbout RBAC and PRBACRole-based access control (RBAC)is the standard method for access control in large systems.
With RBAC, you grantprivilegestoroles. For example you
might grant the privilegeReportingto the roleAnalyst. In most
systems, you can nest roles as deeply as you want, and give users however many roles. A good
example of this in practice isPostgreSQL roles and privileges.The roles and privileges are whatever abstract concepts make sense for your system. It is up
to application code to determine what actions to take based on the privileges granted. This
can, of course, be implemented in terms of a lower-level permission system such as
row-level or object-level access control lists (ACLs).Parameterized role-based access control (PRBAC)adds parameters
to roles and privileges. Now, for example, you might grant"Reporting(organization="Dimagi",area="Finance")toFinancialAnalyst(organization="Dimagi"). If you don’t use parameters, then it is just RBAC.
If you use parameters with finite sets of choice, then it is exponentially more powerful. If you
use parameters with infinitely many choices (such as strings or integers) then it is
infinitely more powerful. A good example of limited parameterization is how particular privileges
(SELECT,UPDATE, etc) in PostgreSQL may be parameterized by an object. In PRBAC
this parameterization is pervasive.In-depth documentationTo learn more about parameterized role-based access control as implemented in this library, please
visithttp://django-prbac.readthedocs.org/Access Control for Djangodjango.contrib.auth: This app, shipped with Django, provides unix-style access control (users, groups, permissions)
with an extensible set of permissions that are implicitly parameterized by a content type. This is
fundamentally different than role-based access control. It is only worth mentioning because it comes
with Django and everyone is going to want to know “why did you reimplement the wheel?”. Ifdjango.contrib.authis the wheel, then RBAC is the car and PRBAC is a transformer. I leave it as an exercise to the reader to
attempt to implement PRBAC usingdjango.contrib.auth:-)django-rbac: This project appears defunct and is not
parameterized in any rate.django-role-permissions: This app implements a sort of
RBAC where roles are statically defined in code.Others can be perused athttps://www.djangopackages.com/grids/g/perms/. Many offer object-level permissions,
which is as orthogonal to role-based access control as unix permissions. In fact, this is probably true of
anything using the term “permissions”.Quick StartTo install, use pip:$ pip install django-prbacLicenseDjango-prbac is distributed under the MIT license. (See the LICENSE file for details)
Package: django-precompressed
django-precompressedprecompressed is a pluggable application for Django developers who want to serve precompressed (gzipped) static files.AboutAlters the behavior of./manage.py collectstaticto save gzipped copies of specified static files (by default*.cssand*.js).When the client supportsContent-Encoding: gzipand{% static %}is used then the rendered URI will refer to the precompressed version of the static file.Works with [CachedFilesMixin](https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#cachedstaticfilesstorage) and [storages.backends.s3boto.S3BotoStorage](http://django-storages.readthedocs.org/)Installationpip install django-precompressedAddprecompressedto yoursettings.INSTALLED_APPSbefore‘django.contrib.staticfiles’so that precompressed’s version of{% static %}will be utilized.Setsettings.STATICFILES_STORAGEto one that suits your needs (see Storages below).Run./manage.py collectstaticto generate precompressed copies.Utilize{% static %}template tag when referencing static files where applicable.ConfigurationAll settings are optional and specified via thesettings.PRECOMPRESSED_SETTINGSdictionary.GZIP_PATTERNSis a tuple of file patterns that are to be gzipped. Defaults to(‘*.css’, ‘*.js’)DEFAULT_COMPRESS_LEVELis a number 0-9 that specifies the default compression level. Defaults to 9.accepts_gzip(request)is a function that returns True if the client supportsContent-Encoding: gzipget_gzipped_name(name)is a function that translates filenames and URIs to the precompressed version. Defaults to resource.ext becomes resource.gz.extshould_save_gzipped_copy(path)is a function that returns True if the specified file should have a precompressed copy saved. Defaults to file matches GZIP_PATTERNS?Storagesprecompressed.storage.PrecompressedStaticFilesStorage
precompressed.storage.CachedPrecompressedStaticFilesStorageThese storages extend Django’s builtin StaticFilesStorage to provide the described precompression behavior. If you use this you’ll probably want to configure your webserver to add theContent-Encoding: gzipheader when serving precompressed files.precompressed.storage.s3boto.PrecompressedS3BotoStorage
precompressed.storage.s3boto.CachedPrecompressedS3BotoStorageThese storages extend [django-storages’ S3BotoStorage](http://django-storages.readthedocs.org/en/latest/backends/amazon-S3.html) to provide described precompression behavior for files stored on [Amazon Simple Storage Service (Amazon S3)](http://aws.amazon.com/s3/)The Cached prefixed versions of each utilize [CachedFilesMixin](https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#cachedstaticfilesstorage) and therefore store hashed copies of static files in addition to the precompressed versions.
Package: django-prefetch-plus
=====Prefetch Plus=====Prefetch Plus aims to add additional flexibility to django's built inprefetch_related functionality.Using the built in prefetch_related you can only select objects related throughreverse ForeignKey relationships. With PrefetchPlus you can slect objects relatedthrough any mapping of columns from one table to another.This allows forsomething much more similar to the capabilities of adatabases left outer join.Installation-----------pip install django-prefetch-plusUsage-----------As Manager:Prefetch Plus comes with the PrefetchPlusQuerySet which provides a similarinterface to prefetch_related:```from prefetch_plus import PrefetchPlusQuerySetfrom django.db import modelsGENRES = (...('romance', 'Romance'),('mystery', 'Mystery'),)class Author(models.Model)...genre = models.CharField(choices = GENRES)...objects = PrefetchPlusQuerySet.as_manager()class Book(models.Model)...author = models.ForeignKey(Author)genre = models.CharField(choices = GENRES)...# We want to have author's of books review other books in the same genre.# The old wayfor author in Author.objects.all():# Typical N+1 db query that cannot be resolved with builtin prefetch_relatedauthor.books_to_review = list(Book.objects.filter(genre=author.genre))# The new way# This will grab all of the Books that share a genre with any author,# then it will attach attach the list of books in each genre to the matching# author(s)authors = Author.objects.prefetch_plus(to_attr='books_to_review',query_set=Book.objects.all(),obj_cols='genre',qset_cols='genre').all()# obj_cols & qset_cols can also be tuples of columns to allow for# "composite keys". The tuple must be the same length and the matches are# getattr(object, obj_cols[i]) == getattr(qset_object, qset_cols[i]) for any i# Prefetch plus works across related objects. I highly recommend you remember to# select_related if you do this. Otherwise, you aren't getting any benefit out# of thisauthors = Author.objects.prefetch_plus(to_attr='books_to_review',query_set=Book.objects.select_related('author').all(),obj_cols='genre',qset_cols='author__genre').all()```Without the manager:You don't have to use the manager if you don't want, it simply calls thefollowing helper function at the appropriate time```from prefetch_plus import do_prefetch_plusfrom django.db import modelsGENRES = (...('romance', 'Romance'),('mystery', 'Mystery'),)class Author(models.Model)...genre = models.CharField(choices = GENRES)...class Book(models.Model)...author = models.ForeignKey(Author)genre = models.CharField(choices = GENRES)...# We want to have author's of books review other books in the same genre.authors = Author.objects.all()do_prefetch_plus(objects=authors,to_attr='books_to_review',query_set=Book.objects.all(),obj_cols='genre',qset_cols='genre')```Version History-----------0.3.3: Made Prefetch plus faster at the cost of potentially grabbing extrarecords in the case of composite keys. Fixed support for 2.7
Package: django-prefetch-utils
This library provides a number of utilities for working with and extending
Django’sprefetch_relatedsystem. Currently, it consists of:a collection of descriptors to define relationships between models which
support prefetchinga new implementation ofprefetch_related_objectswhich supports an
identity map so that multiple copies of the same object are not fetched
multiple times.Free software: BSD 3-Clause LicenseInstallationpip install django-prefetch-utilsDocumentationhttps://django-prefetch-utils.readthedocs.io/Changelog0.2.0 (2022-01-12)Added library of descriptors for defining relationships of Django models
which can be prefetched.Add support for the latest version of Django and Python.Removed support for Python 2 and unsupported Django versions.Updated backport of prefetch_related_objects to latest version from Django 4.0.0.1.0 (2019-07-16)First release on PyPI.
Package: django-prefixed-textinput
django-prefixed-textinputAn extension of the defaultTextInputwidget that displays a read-only string prefix over the input field.CompatibilityThe widget has been tested on Django 3.2 and 4.0 on Python 3.8, though I expect it to be fairly compatible with other versions given the simplicity of the implementation. For now, the package is marked as requiring Python 3.6 or higher.Styling for the widget includes support for right-to-left (RTL) languages so this should work more or less as expected. Note that IE11 isnotsupported as the widget styling requires support for CSS Variables.Installation$ pip install django-prefixed-textinputUsageAddprefixed_textinputto yourINSTALLED_APPSsetting:INSTALLED_APPS=[# ...'prefixed_textinput',]Import the widget:fromprefixed_textinputimportPrefixedTextInputDefine a custom admin form, which allows overriding the widget for a specific field:# forms.pyfromdjangoimportformsfromprefixed_textinputimportPrefixedTextInputclassMyModelAdminForm(forms.ModelForm):classMeta:widgets={'myfield':PrefixedTextInput(prefix='FOO'),}fields='__all__'Specify the custom admin form in your admin definition:# admin.pyfromdjangoimportadminfrom.formsimportMyModelAdminFormfrom.modelsimportMyModel@admin.register(MyModel)classProductAdmin(admin.ModelAdmin):form=MyModelAdminFormDevelopmentIf working locally on the package you can install the development tools viapip:$pipinstall-e.[dev]Run the bundled Django example project:$cdexample_project
$pythonmanage.pymigrate
$pythonmanage.pycreatesuperuser
$pythonmanage.pyrunserver0.0.0.0:8000
$openhttp://localhost:8000/admin/Navigate to the exampleBookmodel in theBookshopapp to see the widget in action.To lint withflake8:$flake8Issues, Suggestions, Contributions...are welcome on GitHub. Thanks for your interest indjango-prefixed-textinput!
Package: django-prefix-id
Overviewdjango-prefix-idis a simple package that contains a single Django model
field,PrefixIDField.PrefixIDFieldisbased on Django'sCharFieldallows using a prefix (recommended for context)enables some very interesting product usage and querying patternsautogenerates a unique id by default (auto-including the prefix, if provided)usesuuid.uuid4()to generate a 128-bit integer, which is then
base62-encodedauto-sets themax_lengthfield property, factoring in the provided prefix length
and a known max length of 22 characters for a base62-encoded 128-bit integerWhy work with IDs like7584358or'7fca5f1d-f867-4696-960b-e57274cc5647'when you could have something swanky like'user_4wr7jBDTEqVBCsXEih4zfP'?If you already like to use UUIDs as IDs, you should usedjango-prefix-id! If you currently use
autoincrementing IDs, you should also consider usingdjango-prefix-id, from an obfuscation
point of view.Installation$pipinstalldjango-prefix-idUsagefromprefix_idimportPrefixIDFieldclassBook(models.Model):id=PrefixIDField(prefix="book",primary_key=True)title=models.CharField(max_length=100,blank=False)...Make your migrations, as you normally would:$pythonmanage.pymakemigrationsDevelopment$pip-mvenvvenv
$source/venv/bin/activate
$pipinstall-rrequirements.txtTestingManually run tests:$pytestTest coverage is at 100%. To get test coverage output:$pytest--cov--cov-reporthtml# OR$pytest--covTo cover a breadth of likely usage scenarios,toxis the tool of
choice. It is set up with a matrix covering various combinations of
Python versions 3.8 - 3.12 with Django 4.2 and 5.0.Seetox.inito enable testing Django versions as far back as Django
3.2 - tests pass across the board, but for simplicity only latest LTS
Django and other currently supported versions will be considered in
scope.Run the test suite against all enabled versions:$toxBackstory and InspirationStripe-like prefixed entity IDs have long been a topic of interest to me,
and the improved user experience that they can provide. I'd gone through
a couple of iterations with FastAPI and Django - and thought I might as
well release something that I'm happy with sharing publicly.About 80% through this effort, I found yunojuno'sdjango-charid-fieldproject, and took some further inspiration from it - so thanks to them!(It also appears we have other project interests in common!)
Package: django-preflight
OverviewDjango Pre-flight is meant to help with creation of simple pages on
which one can quickly gauge health of the system and its external
dependencies. It’s a great help for testers before actually delving
into the system to be sure that all is configured correctly and any
found problems are due to bugs in the code itself and not because of
misconfiguration.This project provides framework for creating set of checks (methods)
which determine the health of the system, a way of executing all of
them and gathering the results. You can either see the result via the
web interface or using Django’smanage.pycommand.Additionally the web page displays the versions of various system
components, like Python, Django, django-preflight itself. This
versions list also have a way of extending it to include project’s
specific bits of information.More information can be found indoc/directory.TestingTo run tests just invoketoxcommand. If you don’t have it installed
you can use suppliedtoxscript which will pull it automatically
and then run the whole test suite.
Package: django-preflight-checks
Preflight is a set of deploy checks for Django 1.8 and higher which inspect
your settings and setup for common configuration errors on production
environments. Often these are flags which are disabled during development
(DEBUG = True) and can easily be overlooked before going live.Built-in checks cover inspections for non-production settings in caches,
databases, email, logging, storages, templates and more. They are
opinionated, either for “common” packages (raven, django-compressor, …) or
(in our eyes) optimal configurations, but Django’s check framework lets you
silence the ones you do not need.InstallationRunpip installgit+https://github.com/bpeschier/django-preflight.git.Addpreflightto yourINSTALLED_APPSsetting:INSTALLED_APPS = (
    ...
    'preflight',
)Running checksChecks are part of the Django deploy checks, you can run them with:python manage.py check --deploy
Package: django-premailer
Django template tag that turns CSS blocks into style attributes usingpremailer.Installpipinstalldjango-premailerAdddjango_premailerto yourINSTALLED_APPS:INSTALLED_APPS=('...','django_premailer')Example UsageSimply use thepremailertemplate tag around HTML where you need inline CSS:{% load premailer %}

{% premailer "http://example.com" %}<html><styletype="text/css">h1{border:1pxsolidblack}p{color:red;}.c{background-color:#FF6600;}.ctd{background-color:#CCCCCC;}</style><h1style="font-weight:bolder">{{ eggs }}</h1><p><ahref="/blah/">Hej</a></p><tableclass="c"><tr><td></td></tr></table></html>{% endpremailer %}The rendered template would look as so;<html><head></head><body><h1style="border:1px solid black; font-weight:bolder">Sausage</h1><pstyle="color:red"><ahref="http://example.com/blah/">Hej</a></p><tablestyle="background-color:#F60"bgcolor="#F60"><tr><tdstyle="background-color:#CCC"bgcolor="#CCC"></td></tr></table></body></html>SettingsIf you need more control over premailer’s init parameters you can define them usingPREMAILER_OPTIONS.For example, in your settings file;PREMAILER_OPTIONS=dict(base_url='http://example.com',remove_classes=False)Seehttps://github.com/peterbe/premailer/blob/master/premailer/premailer.py#L149for a list of other possible options.ThanksSpecial thanks tohttp://roi.com.aufor supporting this project.Thanks tohttps://github.com/roverdotcom/django-inlinecssfor initial inspiration.AuthorAlex Hayes <alex@alution.com>
Package: django-prepared-query
# DJANGO-PREPARED-QUERY[![Build Status](https://travis-ci.org/DimaKudosh/django-prepared-query.svg?branch=master)](https://travis-ci.org/DimaKudosh/django-prepared-query)[![Coverage Status](https://coveralls.io/repos/github/DimaKudosh/django-prepared-query/badge.svg?branch=master)](https://coveralls.io/github/DimaKudosh/django-prepared-query?branch=master)[![PyPI](https://img.shields.io/pypi/pyversions/Django.svg)]()## InstallationYou can install `django-prepared-query` using pip:```$ pip install django-prepared-query```## Example```pythonfrom django_prepared_query import PreparedManager, BindParamclass Book(models.Model):objects = PreparedManager()qs = Book.objects.filter(name__startswith=BindParam('name_start'))books = qs.execute(name_start='A')```## DocumentationDocumentation is available here http://django-prepared-query.readthedocs.io/en/latest/## Benchmark[Here](https://github.com/DimaKudosh/django-prepared-query/blob/master/demo/benchmark.ipynb) you can find notebook with benchmark.## Goals* ~~Add support for in lookup.~~* ~~Add support for limit/offset.~~* Make this working without specifying BindParams.* Add support for INSERT/UPDATE sql queries.
Package: django-prepost
[![Build Status](https://travis-ci.org/CSDTs/Django-pre-post.svg?branch=master)](https://travis-ci.org/CSDTs/Django-pre-post)[![Updates](https://pyup.io/repos/github/CSDTs/Django-pre-post/shield.svg)](https://pyup.io/repos/github/CSDTs/Django-pre-post/)# Django-pre-post
This Django app provides the ability to create pre-post questions and answers. It was developed by the CSDTs team at RPI to embed pre-post tests for students in their website and to ease data collection.# Installation & Integration## Download and install:
Either use pip in terminal:pip install django_pre_postOr add django_pre_post to your requirements / libraries file and runpip install -r requirements.txt## Add the application to your site:
Include it in settings.py` INSTALLED_APPS = ( ... your apps here ... 'django_pre_post', ) `Include it in URLS.py` urlpatterns = [ ... your pageshere...url(r'^questionnaire/',include('django_pre_post.urls')),] `# Testing## Prerequisites
* * VirtualBox
* Linux: sudo apt-get install virtualbox
* Windows & Mac:https://www.virtualbox.org/wiki/Downloads* * Vagrant
* Linux: sudo apt-get install vagrant
* Windows & Mac:https://www.vagrantup.com/downloads.html* * Git
* Linux: sudo apt-get install git
* Windows & Mac:https://git-scm.com/downloads* * * For windows Make sure C:Program FilesGitusrbin [is in your path variable](http://www.computerhope.com/issues/ch000549.htm)## Setup`shell git clonehttps://github.com/CSnap/Django-pre-post#get the code cdDjango-pre-postvagrant up #build the system in a virtual machine vagrant ssh #enter the virtual machine cd /vagrant python manage.py runserver 0.0.0.0:8000  #run the server `Navigate to localhost:8002/admin/