Saravanan666/pypi-org huggingface dataset:
Package: django-better-passwords
Django Better PasswordsThis app provides tools to enforce stronger password policies and expiration.FeaturesConfigurable password expiration;Customizable password validator;Uses Django messages framework to warn the user about the expiration;Prevents user from logging in after expiration and redirects to password change page;Compatible with default Django admin and Django CMS (django-cms) admin;Can be used to expire only staff passwords, or for all users;Force password update immediately after user creation.RequirementsRequires Python >= 3.6 and Django >=2.
Recommended Python 3.11 or 3.12 and Django 4.2 or 5.0;Quick startInstall the lib withpip install django-better-passwords.Add'django_better_passwords'toINSTALLED_APPS.Add'django_better_passwords.middleware.PasswordExpirationMiddleware'toMIDDLEWARE.It should be listed after authentication, session and message middlewares, like this:MIDDLEWARE=["django.middleware.security.SecurityMiddleware","django.contrib.sessions.middleware.SessionMiddleware","django.middleware.common.CommonMiddleware","django.middleware.csrf.CsrfViewMiddleware","django.contrib.auth.middleware.AuthenticationMiddleware","django.contrib.messages.middleware.MessageMiddleware","django_better_passwords.middleware.PasswordExpirationMiddleware","django.middleware.clickjacking.XFrameOptionsMiddleware",]Add'django_better_passwords.validators.custom_password_validator.CustomPasswordValidator'toAUTH_PASSWORD_VALIDATORS.Comment out or remove'django.contrib.auth.password_validation.MinimumLengthValidator'to avoid conflicting:AUTH_PASSWORD_VALIDATORS=[...# {#     "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",# },{"NAME":"django_better_passwords.validators.custom_password_validator.CustomPasswordValidator","OPTIONS":{"min_length":8,"max_length":20,"required_characters":"!#$%^&*()_+{}[]:\"-=,./<>?","forbidden_characters":"@",},},]The validator accepts 4 parameters, being:min_length (int): the minimum password length;max_length (int): the maximum password length;required_characters (str): a string containing a list of characters of which at least one must be present in the password;forbidden_characters (str): a string containing a list of characters none of which can be present in the password;Aditional app settings:DBP_PASSWORD_EXPIRATION_DAYS=60DBP_PASSWORD_CHANGE_REDIRECT_URL="password_change"DBP_LOGOUT_URL="logout"Attention: IfDBP_PASSWORD_CHANGE_REDIRECT_URLis present, when a user tries
to log in or navigate to any url, he will be redirected to thepassword_changepage.
If it is not present, only users who try to access the admin area will be redirected.ContributingWe use pre-commit paired with black, flake8 and isort to keep things in their rightful place.After cloning the project:Create and activate a venv;Install pip-tools;Runpip-compile requirements.inandpip-sync requirements.txtto install dependencies;Runpre-commit install -fto install pre-commit hook. It will create agit hook, that willrun automatically before every commit;AcknowledgementsThis app is inspired bydjango-password-policies-iplwebanddjango-password-expire.AuthorAndré Corrêa -andre.lccorrea@gmail.com
Package: django-better-repr
django-better-reprDjango model reprs for humans!This project seeks to make reprs of Django models more human-friendly. This
project is heavily inspired byhttps://github.com/dan-passaro/django-auto-repr.Installationpip install django-better-reprIf you want to automatically improve the repr of all models in your project then adddjango_better_reprto your installed apps.# settings.py
INSTALLED_APPS = [
   ...,
   'django_better_repr',
   ...,
]Want to customize which apps get configured but don’t want to decorate each class individually?
Head on down to theConfigurationsection.How to use:The repr logic in this library is designed to produce the smallest, most meaningful repr possible
for your Django models. That means that fields which aren’t set won’t show up in the repr. This
should reduce noise and let you get the most value out of your reprs.from django_better_repr import better_repr

@better_repr
class MyDjangoModel(models.Model):
    my_field = models.CharField(max_length=16)Or, if class inheritance is more your speed:from django_better_repr.bases import BetterRepr

class MyDjangoModel(BetterRepr, models.Model):
    my_field = models.CharField(max_length=16)Then load up your favorite shell and run:MyDjangoModel.objects.create(my_field='Hello, world!')
>>> MyDjangoModel(my_field='Hello, world!')If your model has a lot of fields then the repr will automatically switch to
pretty printing. This can be configured via settings.ConfigurationIf you want to customize the behavior of the library, below are all the options.# settings.py
BETTER_REPR_CONFIG = {
   'ENABLE_MULTILINE_REPRS': True,  # bool (default: True), whether or not to allow multiline reprs
   'SINGLE_LINE_PARTS_LIMIT': 4,  # int (default: 4), the number of fields a repr can have before switching to multi line
   'MULTILINE_WHITESPACE': '\t',  # str (default: '\t'), the whitespace string to use for multiline reprs
   'AUTO_CONFIGURE_INCLUDE_MODELS': [],  # list (default: a sentinel for all models), which models to auto include if the auto configuration application is added to INSTALLED_APPS
   'AUTO_CONFIGURE_EXCLUDE_MODELS': [],  # list (default: []), which models to exclude from the auto setup if the auto configuration application is added to INSTALLED_APPS
   'EXCLUDE_DEFERRED_FIELDS': True,  # bool (default: True), whether or not to exclude deferred fields (https://docs.djangoproject.com/en/4.2/ref/models/querysets/#django.db.models.query.QuerySet.defer) from the repr
}Making Changes & ContributingThis project usespre-commit, please make sure to install it before making any
changes:pip install pre-commit
cd django-better-repr
pre-commit installIt is a good idea to update the hooks to the latest version:pre-commit autoupdateNoteThis project has been set up using PyScaffold 4.5. For details and usage
information on PyScaffold seehttps://pyscaffold.org/.
Package: django-better-search
django-better-searchThis repo is heavily influenced bydjango-admin-searchand copies some of the components as well.This repo implements search on Django admin page differently. It generates different search boxes for separate fields and doesn't treat all of those fields as string.RequirementsThis app is tested using following:Django >= 3.2Python >= 3.9InstallationThis repo is publishedon Pypi. You can install it from there using following:pip install django-better-searchUsageNote:This project is not yet ready for production use.Adddjango_separate_searchin yourINSTALLED_APPS. Example:INSTALLED_APPS = [
    ...
    "django_separate_search",
    ...
]Create a search form to have search fields on your admin page. Example:from django.forms import CharField, Form, IntegerField


class UserSearchForm(Form):
    name = CharField(required=False, label="User's Name", help_text="Some help_text")
    age = IntegerField(required=False, label="User's Age", help_text="Another help_text")
    ...Use the search form in your AppAdmin in youradmin.py. Example:from django_separate_search.admin import SeparateSearchAdmin


class UserAdmin(SeparateSearchAdmin):
    ...
    search_form = UserSearchForm
    ...This will render your search-form fields on the list-view admin page.If you want to implement search on a custom field, you will have to implementsearch_<field_name>. Example:class UserAdmin(SeparateSearchAdmin):
    ...

    def search_<field_name>(self, field, field_value, form_field, request, param_values):
        query = Q()
        // Implement your query

        return queryImagesThis is how search will look in admin view-list:
Package: django-better-test
A better test command for Django. Allows you to use--parallelto run tests
in parallel (distributed as evenly as possible across your CPU cores) and--isolateto run each test in a separate process to detect test that leak
state. You can also quickly re-run the tests failed in the last run using--failed. To show which tests are slowing you down, use--list-slow=<number>to show the<number>slowest tests in your test
suite. To simply re-run the tests using the last configuration, use--retest.Simply addbetter_testto yourINSTALLED_APPSand usemanage.py test--helpfor all options.
Package: django-bfm
Core FeaturesSelect more than one file at onceLive Upload Status reportingFile browsingDirectory supportCore features has no dependencies (except for Django), lightweightLooks like django admin (extends admin template)Admin upload appletAdditional Features (uses additional dependencies)Image resizing (PIL)RequirementsModern browser - BFM relies on a bunch of HTML5 features.Django 1.3 or 1.4Python 2.6 or 2.7 (Not tested with 2.5 and below)DocumentationEverything else you may need, you can find atdocumentation.
Package: django-bg-task
django-taskdjango-task is a library designed to assist you in tracking Celery tasks within your Django project. It provides a seamless integration with your current database and offers RESTful APIs for managing and monitoring your tasks.FeaturesTask Tracking:With django-task, you can easily track the status, progress, and result of your Celery tasks. The library stores this information in your database, allowing you to retrieve and analyze task data at any time.RESTful APIs:django-task exposes a set of RESTful APIs that enable you to interact with your Celery tasks programmatically. You can create, update, delete, and retrieve tasks using these APIs, providing flexibility in managing your task workflow.Integration with Celery:This library seamlessly integrates with Celery, a widely-used distributed task queue framework. You can use all the powerful features of Celery, such as task scheduling, distributed processing, and task retries, while leveraging django-task for task tracking and management.InstallationYou can install django-task using pip:pip install django-taskMake sure you have Celery and Django installed as well.UsageOnce installed and configured, you can start tracking your Celery tasks using django-task. Here's a basic example of how to use the library:fromdjango_task.handlersimportTaskHandler# Create a new task@celery_app.task(name="some_task",queue="default_queue",base=TaskHandler)defsome_task(bulk_account_data,*args,**kwargs):passUsing this annotation, you can track the task status in your db.For detailed usage instructions and available APIs, please refer to thedocumentation.ContributingContributions to django-task are welcome! If you encounter any issues, have suggestions, or would like to contribute new features, please feel free to open an issue or submit a pull request on theGitHub repository.When contributing, please ensure that you follow the existing coding style, write tests for new functionality, and update the documentation accordingly.LicenseThis project is licensed under theMIT License.
Package: django-bi
Business intelligenceBI is a simple Django app to conduct business intelligence.Quick startAdd “bi” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'bi',
]Add OBJECTS_PATH setting like this:OBJECTS_PATH='objects',Include the bi URLconf in your project urls.py like this:path('', include('bi.urls')),Runpython manage.py migrateto create the bi models.Start the development server.Visithttp://127.0.0.1:8000/to see your dashboards.
Package: django-bible
django-bible - A Bible app for the django web frameworkdjango-bible is a Python package / django app for interfacing with the Holy Bible.For more information, seehttp://www.davisd.com/projects/django-bible/To see this Bible app in action, seehttp://www.centralbaptistfwb.com/bible/InstallationA setup script (setup.py) is provided.  To install, simply run the script with the install command:$ python setup.py installOr just put the bible package somewhere in the Python path.Once the bible package is in place, add “bible” to your list of installed applications and run your django syncdb command.Once the tables have been created, you need to populate the tables with Bible data.Bible DataA JSON dump of the entire KJV Bible is available from the davisd.com link above.You can load the downloaded Bible data into your project’s database using the django loaddata command.AuthorDavid Davis <davisd@davisd.com>http://www.davisd.com
Package: django-biblio
Django app with data models and admin interface to deal with projects involving
huge amounts of references.  The references of works (papers, books, conference
reports) can be imported and exported in BibTeX format, on a work or project
basis.CopyingCopyright (C) 2014 Michal GrochmalThis file is part of the django biblio (djbiblio) package.django biblio is free software; you can redistribute and/or modify all or part
of the code under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or (at your
option) any later version.django biblio is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.The COPYING file in the root directory of the project contains a copy of the
GNU General Public License. If you cannot find this file, see
<http://www.gnu.org/licenses/>.
Package: django-bidi-utils
Provides context processors and filters for handlingBi-directional(BiDi) in
django templates, adding some needed functionality to Django’sLANGUAGE_BIDItemplate var.DocumentationThe full documentation is athttp://django-bidi-utils.rtfd.org.QuickstartInstall django-bidi-utils:pip install django-bidi-utilsTo use it in a Django project addbidiutilsthe project’sINSTALLED_APPSsetting:INSTALLED_APPS = (
    "django.contrib.auth",
    "django.contrib.contenttypes",
    "django.contrib.sites",
    ...
    "bidiutils",
    ...
)To enable the context processor, add it toTEMPLATE_CONTEXT_PROCESSORSsettings:TEMPLATE_CONTEXT_PROCESSORS = (
    "django.core.context_processors.auth",
    "django.core.context_processors.debug",
    "django.core.context_processors.i18n",
    "django.core.context_processors.media",
    ...
    "bidiutils.context_processors.bidi",
)FeaturesContext processor adding to templates passed a RequestContext BiDi releated
variables.add_directiontemplate filter, for adding direction to media resource
(images, stylesheets, etc)History1.0 (2013-10-19)Testing for Python 3.3, 2.7 and 2.6 Compatibility.Removed buildout.Re-Based on Cookiecutter.Sphinx for docs, added more examples.0.2.1 (2009-05-18)Forgot CHANGELOG.rst in MANIFEST.in.0.2 (2009-05-17)Added template filteradd_direction.RemovedREADME, add MAINFEST.in which includesREADME.rst.0.1 (2009-04-28)Initial release, context processors.
Package: django-bigautohack
Django BigAuto Hack===================`Support for BigAutoField <https://code.djangoproject.com/ticket/14286>`_ has been a work in progress for 4 years now. But the ticket has the following valuable comment:In the meantime, it suffices to use a standard AutoField and hack the database like so:In the table in question, alter the field like so: ``ALTER TABLE [table_name] ALTER COLUMN [field_name] [data_type]``, where ``[data_type]`` is one of the following:- MySQL: bigint AUTO_INCREMENT- Oracle: NUMBER(19)- PostgreSQL: bigserial- SQLite: integerFor every foreign key pointing to your field, you will also need to alter the column, but with these data types:- MySQL: bigint- Oracle: NUMBER(19)- PostgreSQL: bigint- SQLite: integerThis is a pain, but you only need to do it when creating tables, once. On the other hand, users shouldn't have to hack the database for such a simple feature, in my opinion. It would be super-cool if 1.3 included a fully-functional BigAutoField.This simple django app makes this hack less of pain. Running::$ python manage.py bigautohack myapp.MyModelWill run the needed ``ALTER TABLE`` commands, turning the database column for ``MyModel``'s primary key into a big integer, as well as all columns referencing ``MyModel``.To install simply run ``pip install django-bigautohack`` and add ``bigautohack`` to your ``INSTALLED_APPS``.Limitation==========You probably need to make generic foreign keys use a big integer as well.
Package: django-bigbluebutton
django-bigbluebuttonA Django Application for better interaction of Django projects with Big Blue Button APIs.RequirementsTo use this package following needed. if not provided will be installed automatically.Django>=2.0
requests>=2.0InstallationNote:This package is well tested ondjango>=2.0. But if you are using older versions can be
used with minor changes in structure.install using pip:pipinstalldjango-bigbluebuttonUsageRegister app insettings.pyINSTALLED_APPS=["django_bigbluebutton",]Now should define you Big Blue Button Server core configs insettings.py:BBB_API_URL='https://test.com/bigbluebutton/api/'BBB_SECRET_KEY='abcdefgabcdefgabcdefgabcdefgabcdefg'Next apply migrations:pythonmanage.pymigrateAnd finally run test:pythonmanage.pytestYou can followtests.pyfile to see how to use this package.Admin IntegrationBy installing this app in your django project, A admin section will be added namedMeeting.
Under this section you can see list of open meetings, join meeting, create join link for other
users with moderator or attendee permissions.Also to enable update state of each meeting (sync with bigbluebutton) set below variable insettings.py:UPDATE_RUNNING_ON_EACH_CALL=TrueSo whenever you open list of meetings in django admin, it will update state of all meetings in database
with result ofgetMeetingsAPI from bigbluebutton.
Package: django-bigfeat
Django BigFeat is custom field to add up to 63 boolean features using a BigIntegerField.Quick startfromdjango.dbimportmodelsfrombigfeatimportBigFeatFieldclassModelWithOptionalFeatures(models.Model):FEATURES={'FEATURE_1':0x0000000000000001,'FEATURE_2':0x0000000000000002,'FEATURE_3':0x0000000000000004,'FEATURE_4':0x0000000000000008,...'FEATURE_61':0x1000000000000000,'FEATURE_62':0x2000000000000000,'FEATURE_63':0x4000000000000000,}features=BigFeatField(masks=FEATURES)m=ModelWithOptionalFeatures.objects.get(id=1)printm.features.feature_1ifm.features.feature_2:printm.features.feature_3ifm.features.feature_4elsem.features.feature_5printm.featuresNotesThe most significant bit (0x8000000000000000) cannot be used since
BigIntegerField is stored as a signed integer and will cause an OverflowError
Package: django-big-positive-int-field
Big Positive Integer Fielddjango-big-positive-int-fieldcontains a generic model field for storing a big positive integer something like factorial of a number in pythonIntsallationpip install django-big-positive-int-fieldUsageTo addBigPositiveIntegerFieldfield in your model use following:from big_positive_int_field import BigPositiveIntegerField

from django.db import models

class MyModel(models.Model):
    ...
    big_int_field = BigPositiveIntegerField(default=0)
    ...
Package: django-bigquery-exporter
Django BigQuery Exporter is simple library providing an admin-esque base class for batching and exporting Django models to Google BigQuery.Quick startInstall Django BigQuery Exporter:pip installdjango-bigquery-exporterMake sure you have your Google Cloud credentials set up. See [here](https://cloud.google.com/docs/authentication/getting-started) for more information.3. Import and create a subclass ofBigQueryExporterand define thedefine_querysetmethodfrom bigquery_exporter.base import BigQueryExporter

class MyExporter(BigQueryExporter):
    def define_queryset(self):
        return MyModel.objects.all()4. Call theexportmethodexporter = MyExporter()
exporter.export()Et voila! Your data is now in BigQuery.
Package: django-bigredbutton
Big Red ButtonFor Djangodjango-bigredbuttonprovides a big red "End All Other Sessions" button in a list of a user's current sessions.Rendered with a light theme:Rendered with a dark theme:It can work with multiple session backends, and includes built-in templates for bothdjango-qsessionsanddjango-user-sessions, and dynamically switches between them depending on which one is identified insettings.SESSION_ENGINE.CompatibilityPython: >=3.11Django: >=4.0InstallationInstall the latest version:pipinstalldjango-bigredbuttonpoetryadddjango-bigredbuttonAdd a session backend, like django-qsessions or django-user-sessions. You can
use the optional packaging shortcuts:pipinstall'django-bigredbutton[qsessions]'poetryadd'django-bigredbutton[qsessions]'pipinstall'django-bigredbutton[user-sessions]'poetryadd'django-bigredbutton[user-sessions]'But there may be additional steps required for each session backend. Refer
to the documentation for your session backend package for their installation
instructions.AddbigredbuttontoINSTALLED_APPSin your project'ssettings.py, and
optionally setBIGREDBUTTON_DELETE_SUCCESS_URL_NAMEto the URL name of
your choice (default:list_sessions).Registerbigredbuttonin your projects root URLConf:urlpatterns=[...path("account/sessions/",include("bigredbutton.urls")),...]UsageRun Django's development server and navigate to the configured root forbigredbutton. The URL in these instructions will behttp://localhost:8000/account/sessions/.You will see a list of all of your current sessions. If you have more than one
session (eg: you are signed in on more than one browser or device), you will
see a big red "End All Other Sessions" button. That button will sign you out of
all of your other sessions.TODOI have intentionally kept this app very small to minimize the maintenance
burden. But contributions are very welcome!LicenseMIT
Package: django-billjobs
Warning: I maintain this project 2/3 times a year.If you start a new coworking space as a french non-profit
organization, this project could help you on the first time. Otherwise, it must be wiser to use another software.A django billing app for coworking space.We intend to keep things as simple as we can and with an easy user experience. This apps is designed to manage invoices
of coworkers.No tax management. There is no tax for non-profit organization in
France. This application doesn’t manage tax, it displays only legal
French informations and tax 0% in invoice.We use it atCowork’in MontpellierandLe Vîllage,
two coworking spaces in South of FranceDocumentationIssue Tracking## Upgrade dependencies` pipenv install pipenv requirements > requirements.txt `
Package: django-binaryfield
A generic app to provide a way to handle database binary data in django.IntroductionThis is a total rip-off ofBinaryFieldclass from Django 1.6+ sourcecode with some tweaks to make it work under Django 1.4+.Installationpip install django-binaryfieldUsageUse BinaryField to bind your binary database columns on a django model. Like so:from binaryfield import BinaryField

class ExampleModel(models.Model):

    short_data = BinaryField(max_length=10, default=b'\x08')
    data = BinaryField()ConfigurationsyncdbDjango-binaryfield works out-of-the-box with existing binary database columns that are correctly mapped in your models.
If you want BinaryField to work withsyncdbmanagement command
there’s one setting calledBINARYFIELD_HACK_ENGINESthat can be used tohackDjango database backend. Use it like this:BINARYFIELD_HACK_ENGINES = (
    'django.db.backends.sqlite3',
)It’s a list of django backends (as an “importable” strings) to mangle in order tosyncdbcould work properly.
Did I mention that it is ahack?Oracle issuesThere are some issues with Oracle when handling parameteres in a query in Django < 1.6.
You can see this link (https://github.com/django/django/commit/8aefd30379eba9aa7e5afcc69cc352adf0d23489)
to see what changed indjango.db.backends.oracle.base.OracleParamclass regarding this feature.There are two settings to control a fix to this issue:BINARYFIELD_HACK_ORACLE_PARAM- determines whether or not apply the fix -Default:FalseBINARYFIELD_HACK_ORACLE_PARAM_BACKENDS- an iterable of backend engines as an “importable” strings to apply the fix. -Default:[settings.DATABASES['default']['ENGINE']]TODOSome more tests maybe?An example view to show how to serve a file from database