Saravanan666/pypi-org huggingface dataset:
Package: django-fernet-encrypted-fields
Django Fernet Encrypted FieldsThis package was created as a successor todjango-encrypted-fields.Getting Started$pipinstalldjango-fernet-encrypted-fieldsIn yoursettings.py, set random SALT_KEYSALT_KEY='0123456789abcdefghijklmnopqrstuvwxyz'Then, inmodels.pyfromencrypted_fields.fieldsimportEncryptedTextFieldclassMyModel(models.Model):text_field=EncryptedTextField()Use your model as normal and your data will be encrypted in the database.Rotating SALT keysYou can rotate salt keys by turning theSALT_KEYsettings.py entry into a list.  The first key will be used to encrypt all new data, and decryption of existing values will be attempted with all given keys in order. This is useful for key rotation: place a new key at the head of the list for use with all new or changed data, but existing values encrypted with old keys will still be accessibleSALT_KEY=['zyxwvutsrqponmlkjihgfedcba9876543210','0123456789abcdefghijklmnopqrstuvwxyz']If you wish to update the existing encrypted records simply load and re-save the models to use the new key.for obj in MuModel.objects.all():
    obj.save()Available FieldsCurrently build in and unit-tested fields. They have the same APIs as their non-encrypted counterparts.EncryptedCharFieldEncryptedTextFieldEncryptedDateTimeFieldEncryptedIntegerFieldEncryptedFloatFieldEncryptedEmailFieldEncryptedBooleanFieldEncryptedJSONFieldCompatible Django VersionCompatible Django VersionSpecifically tested2.2:heavy_check_mark:3.0:heavy_check_mark:3.1:heavy_check_mark:3.2:heavy_check_mark:4.0:heavy_check_mark:
Package: django-fernet-fields
Fernetsymmetric encryption for Django model fields, using thecryptographylibrary.django-fernet-fieldssupportsDjango1.11 and later on Python 2.7, 3.5, 3.6, 3.7, pypy, and pypy3.Only PostgreSQL, SQLite, and MySQL are tested, but any Django database backend
with support forBinaryFieldshould work.Getting HelpDocumentation for django-fernet-fields is available athttps://django-fernet-fields.readthedocs.org/This app is available onPyPIand can be installed withpip installdjango-fernet-fields.ContributingSee thecontributing docs.CHANGESmaster (unreleased)0.5 (2017.02.22)Support Django 1.10.0.4 (2015.09.18)Addisnulllookup.0.3 (2015.05.29)Remove DualField and HashField. The only cases where they are useful, they
aren’t secure.0.2.1 (2015.05.28)Fix issue getting IntegerField validators.0.2 (2015.05.28)Extract HashField for advanced lookup needs.0.1 (2015.05.27)Initial working version.
Package: django-fernet-fields-v2
django-fernet-fields-v2Fernetsymmetric encryption for Django model fields, using thecryptographylibrary and supports Django >=3.2 .django-fernet-fields-v2supportsDjango3.2 and later on Python 3.8, 3.9, 3.10 and 3.11
Only PostgreSQL, SQLite, and MySQL are tested, but any Django database backend
with support forBinaryFieldshould work.
Getting HelpFork ofhttps://github.com/orcasgit/django-fernet-fields. See docs
there. The only changes made here are to support Django 4.This app is available onPyPIand can be installed withdjango-fernet-fields-v2.ContributingSee thecontributing
docs.
Package: django-fever-notifications
=============================django-fever-notifications=============================.. image:: https://badge.fury.io/py/django-fever-notifications.png:target: https://badge.fury.io/py/django-fever-notifications.. image:: https://travis-ci.org/Feverup/django-fever-notifications.png?branch=master:target: https://travis-ci.org/Feverup/django-fever-notificationsGeneric models for implement message based featuresDocumentation-------------The full documentation is at https://django-fever-notifications.readthedocs.org.Quickstart----------Install django-fever-notifications::pip install django-fever-notificationsThen use it in a project:.. code-block :: pythonfrom fevernotifications.models import Notificationfrom fevernotifications.shortcuts import create_notification# Create a notificationcreate_notification(user, title="Hello", message="Hello world!")# Query all notifications per userNotification.objects.by_target(user)Features--------* TODORunning Tests--------------Does the code actually work?::source <YOURVIRTUALENV>/bin/activate(myenv) $ pip install -r requirements-test.txt(myenv) $ python runtests.pyCredits---------Tools used in rendering this package:*  Cookiecutter_*  `cookiecutter-pypackage`_.. _Cookiecutter: https://github.com/audreyr/cookiecutter.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackageHistory-------0.1.0 (2016-05-03)++++++++++++++++++* First release on PyPI.
Package: django-fe-version
# FE VersionFE Version is a simple add that add  a/versionendpoint with the application versionDetailed documentation is in the “docs” directory.Quick startAdd “polls” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'polls',
]Include the polls URLconf in your project urls.py like this:path('polls/', include('polls.urls')),Runpython manage.py migrateto create the polls models.Start the development server and visithttp://127.0.0.1:8000/admin/to create a poll (you’ll need the Admin app enabled).Visithttp://127.0.0.1:8000/polls/to participate in the poll.
Package: django-ffield
django-ffielddjango-ffield is a Django package that provides additional functionality and control over Django model fields, specifically focusing on file fields. this guide will you through the package's features, installation process, and provide examples of how to use it effectively.Table of ContentsInstallationUsageFileFFieldFiledFFieldUtility FunctionsValidatorsContributingLicenseInstallationYou can installdjango-ffieldvia pip:pipinstalldjango-ffieldUsageFileFFieldFileFFieldextends Django'sFileFieldand allows you to specify accepted file types and disallowed types during field initialization.Example:fromdjango.dbimportmodelsfromdjango_ffield.fieldsimportFileFFieldclassMyModel(models.Model):image_field=FileFField(upload_to='images/',types=['image'])pdf_field=FileFField(upload_to='pdfs/',types=['pdf'],disallowed_types=['image','video'])video_field=FileFField(upload_to='videos/',types=['video'])# Usagemy_instance=MyModel.objects.get(pk=1)my_instance.image_field='example.png'# Validates as it matches the 'image' typemy_instance.pdf_field='example.pdf'# Validates as it matches the 'pdf' typemy_instance.video_field='example.mp4'# Validates as it matches the 'video' typeFiledFFieldFiledFFieldis a field that extends Django'sFieldFileand provides additional properties to access file-related information.Example:fromdjango.dbimportmodelsfromdjango_ffield.fieldsimportFiledFFieldclassMyModel(models.Model):file_field=FiledFField(upload_to='uploads/')# Usagemy_instance=MyModel.objects.get(pk=1)file=my_instance.file_field# Accessing file propertiesmime_type=file.mime_type# Returns the mimetype (e.g., 'image/png')file_type=file.type# Returns the type of file (e.g., 'Image')file_format=file.format# Returns the file format (e.g., 'png')Utility Functionsdjango-ffieldprovides a utility function for detecting file MIME types.This function detects the MIME type of a file by reading the first 2048 bytesnote : the file should be opened in binary mode.Example:fromdjango_ffield.utilsimportmeme_typefromdjango.core.filesimportFilewithopen('example.png','rb')asfile:type,subtype=meme_type(file)print(f"Type:{type}, Subtype:{subtype}")Validatorsdjango-ffieldincludes a custom file type validator that can be used withFileFField.This validator ensures that the uploaded file's type is among the specified types.Example:fromdjango_ffield.validatorsimportFileTypeValidatorclassMyModel(models.Model):file_field=models.FileField(upload_to='uploads/',validators=[FileTypeValidator(allowd_types=['image','pdf','mp4'],disallowed_types=["audio"],)])# Usagemy_instance=MyModel.objects.get(pk=1)my_instance.file_field='example.mp3'# This will raise a ValidationError since 'mp3' is not in the accepted typesContributingFeel free to contribute todjango-ffield.LicenseThis project is licensed under the MIT License - see theLICENSEfile for details.Feel free to explore and utilizedjango-ffieldto enhance your Django projects. If you have any questions, issues, or feature requests, please open anissueon our GitHub repository. Happy coding!
Package: django-fflag
django-fflagLightweight feature flag for django.Feature flag is useful technique to develop your software. When you implement new functionality in you project,
you probably want to enable it gradually for some users.django-fflags is realization of feature flag mechanism with following benefits:flags can be enabled to some part of your users or concrete users listflags part will be different and depends on your flag nameit will works with any users countLearn more about feature flags:https://www.martinfowler.com/articles/feature-toggles.htmlInstallationInstall package:pipinstalldjango-fflagAdd following configuration tosettings.py:INSTALLED_APPS=(...,"fflag",)MIDDLEWARE=(...,"django.contrib.auth",# FFlagMiddleware uses request.user.id"django.contrib.sessions",# FFlagMiddleware uses request.session to store unauthenticated client id...,"fflags.middleware.FFlagMiddleware",)# Persistent cache storage strongly recommended for feature-flags.# You can configure custom persistent cache using following config:FFLAG_CACHE_NAME="fflag"CACHES={...,"fflag":{'BACKEND':'django.core.cache.backends.db.DatabaseCache','NAME':'fflag_flags',}}UsageWhen you write new code, you may wrap it with following if:ifrequest.fflag_enabled("my_new_feature"):...or without request:iffflag_enabled(uniq_client_id,"my_new_feature"):...That means that your code will be not executed until feature flag is enabled.To manage feature flags you may use following management commands:manage.py fflag_list- print list of used feature flags.manage.py fflag_list_enabled_for- print list enabled feature flags for specified id (usually user id).manage.py fflag_get- print information for specified feature flag.manage.py fflag_set_part- set feature flag enable part. For example 0.4 will enable functionality for ~40% of users.manage.py fflag_add_part_ids- extend feature flag part enabled ids (usually user ids)manage.py fflag_set_part_ids- override feature flag part enabled ids (usually user ids)IMPORTANT NOTE: Feature flag will be invisible by management commands afterfflag_enabledfunction will be called.
Package: django-fhadmin
Modifies the stock Django-Administration interface to fit our ideas a little
bit better.Dashboard and global navigation extensionAllows grouping of apps on the dashboard and offers the same view on each
admin page when clicking the main title of the Django admin interface.App label entries without a matching app are ignored. A configuration example
follows:fromfhadminimportFHADMIN_GROUPS_REMAINING_=lambdax:xFHADMIN_GROUPS=[(_('Main content'),('page','medialibrary','blog')),(_('Modules'),('links',FHADMIN_GROUPS_REMAINING)),(_('Preferences'),('auth','rosetta','external','sites')),]The extension is activated by insertingfhadminbeforedjango.contrib.admininINSTALLED_APPS.Merging appsMerging apps is possible as follows:FHADMIN_MERGE={"accounts":"auth"}This example moves all models from theaccountsapp to theauthheading. Entries where source and target do not exist are ignored.
Package: django-fiber
An important message about this projectHi Django Fiber enthusiasts! This project was started by the people at Ride The Pony, Leukeleu and Jouw Omgeving.
They started Django Fiber in 2011, because they wanted a good,simpleDjango CMS available. Lots of people felt the
same, which was why Django Fiber became pretty popular. And it is still going strong in lots of sites, so we hear :)Later, they discoveredWagtail, and found it to be even better than their own creation. So
they decided to move on. Nevertheless, Django Fiber was popular, used in many websites, and they didn’t want to just
drop it. At the start of 2017 they handed over control of the project to a new group of maintainers - the discussion
about this handover can be found inissue #244.Currently Django Fiber is in ‘maintenance mode’. What this means it that it will be updated to run with the
latest releases of Django - and of other packages that Django Fiber depends on. However, no effort will be made to
add new features.If a user really wants a new feature added - then a well-written PR will be reviewed and considered. But other than
that, Django Fiber is staying exactly as it is :)About Django FiberDo you want to see a Django Fiber screencast, to get a feel for what  it can do
for you?Check it out on VimeoConvinced? Want to use Django Fiber in your own Django project? Then follow the
instructions below.RequirementsThese dependencies are automatically installed:Pillow>=2.2.1
django-mptt>=0.8
django_compressor>=2.0
djangorestframework>=3.4
easy-thumbnails>=2.2InstallationWe’re assuming you are using Django 1.9-2.0. Then simply install Fiber
using pip:$ pip install django-fiberSetupOpensettings.pyand add the following to your INSTALLED_APPSINSTALLED_APPS=('mptt','compressor','easy_thumbnails','fiber',...)Add Fiber to the MIDDLEWARE_CLASSES listimportdjango.conf.global_settingsasDEFAULT_SETTINGSMIDDLEWARE_CLASSES=DEFAULT_SETTINGS.MIDDLEWARE_CLASSES+('fiber.middleware.ObfuscateEmailAddressMiddleware','fiber.middleware.AdminPageMiddleware',...)(Or, add the same items toMIDDLEWAREif you are using Django 1.10 or later.)Add the request context processorTEMPLATES=[{'OPTIONS':{'context_processors':['django.template.context_processors.request',...]}...},]And configure compressorBASE_DIR=os.path.dirname(os.path.dirname(os.path.abspath(__file__)))STATIC_ROOT=os.path.join(BASE_DIR,'static')STATIC_URL='/static/'STATICFILES_FINDERS=DEFAULT_SETTINGS.STATICFILES_FINDERS+['compressor.finders.CompressorFinder',]Edit yoururls.pyto add the Fiber site to your url-patternsfromdjango.urlsimportinclude,path,re_pathfromfiber.viewsimportpageurlpatterns=[...path('api/v2/',include('fiber.rest_api.urls')),path('admin/fiber/',include('fiber.admin_urls')),...re_path('',page),]Post-installationCreate database tables:$ python manage.py migrateAll static Fiber files need to be symlinked in (or copied to) your static files folder if you’re not on your dev machine:$ python manage.py collectstatic --linkFurther documentationFor further usage and configuration details take a look at our
documentation project atreadthedocs.ChangelogSeeCHANGELOG.mdfor the latest changes.
Package: django-fiction-outlines
A reusable Django app for managing fiction outlines. Part of the broader maceoutliner project.DocumentationThe full documentation is athttps://django-fiction-outlines.readthedocs.io.QuickstartInstall Django Fiction Outlines:pip install django-fiction-outlinesAdd it and dependencies to yourINSTALLED_APPS:INSTALLED_APPS=(...'taggit','rules.apps.AutodiscoverRulesConfig','fiction_outlines',...)Addrulesto yourAUTHENTICATION_BACKENDS:AUTHENTICATION_BACKENDS=('rules.permissions.ObjectPermissionBackend','django.contrib.auth.backends.ModelBackend',)Unless you like to live dangerously, it isSTRONGLYrecommend you configure whichever database you use for outlines to haveATOMIC_REQUESTStoTrue.DATABASES={"default":{"ENGINE":"django.db.backends.postgresql","NAME":"outlines","ATOMIC_REQUESTS":True,}}Add Django Fiction Outlines’s URL patterns:fromfiction_outlinesimporturlsasfiction_outlines_urlsurlpatterns=[...url(r'^',include(fiction_outlines_urls)),...]FeaturesProvides models for managing series, outlines, characters, locations, and arcs.Provides tools for managing multiple arcs within the context of a broader story outline.Validates that arcs and outlines follow principles of MACE nesting, and seven point story structure.Calculates estimated length of final manuscript based on complexity of outline.Objects are associated with users to enable permission management.NOTE: Django Fiction Outlines uses an object permission manager calleddjango-rules. This allows extremely flexible permission schemes without crufting up your database or model logic. By default,fiction_outlineswill restrict any view or editing to the owner of the object.What It Doesn’t DoProvide a full UI for managing the changes. An API and views are provided, but templates are very basic. It is expected that you will override the templates to match your overall project.Outline the whole story for you.Write the story for you.Do your laundry.Running TestsDoes the code actually work?$ pip install -r test_requirements.txt
$ pytest
$ pytest --flake8CreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.4.0 (2022-03-17)Now requires Django > 3.2. Compatible through Django 4.0Compatible with Python 3.9 and 3.10.0.3.1 (2018-10-16)Now compatible with both Python 3.7 and 3.60.3.0 (2018-08-08)Support for Django 2.10.2.2 (2018-04-19)Bug fix: override model_utils until my submitted
bug fix for created/modified timestamps is merged upstream.0.2.1 (2018-04-14)Add created and modified auto timestamps to all tree models.0.2.0 (2018-04-13)Add export functions. A view is provided for users to export outlines as either
OPML, JSON, or Markdown documents.0.1.5 (2018-04-09)Improvements to length estimate calculation.Improvements to test coverage.0.1.4 (2018-04-07)Hotfix release for tag field issue.0.1.3 (2018-04-07)Bugfix release for migrations0.1.2 (2018-04-02)Bugfix release.0.1.1 (2018-04-01)First release on PyPI.
Package: django-fiction-outlines-api
A RESTful JSON API for django-fiction-outlines.DocumentationThe full documentation is athttps://django-fiction-outlines-api.readthedocs.io. The source code can be found athttps://github.com/maceoutliner/django-fiction-outlines-api/.QuickstartInstall Django Fiction Outlines API:pip install django-fiction-outlines-apiAdd it and dependencies to yourINSTALLED_APPS:INSTALLED_APPS=(...''rest_framework','taggit','rules.apps.AutodiscoverRulesConfig','rest_framework_rules','fiction_outlines','fiction_outlines_api',...)If you have not already, addrulesto youAUTHENTICATION_BACKENDS.AUTHENTICATION_BACKENDS=('rules.permissions.ObjectPermissionBackend','django.contrib.auth.backends.ModelBackend',)Unless you like to live dangerously, it isSTRONGLYrecommend you configure whichever database you use for outlines to haveATOMIC_REQUESTStoTrue.DATABASES={"default":{"ENGINE":"django.db.backends.postgresql","NAME":"outlines","ATOMIC_REQUESTS":True,}}Add Django Fiction Outlines API’s URL patterns:fromfiction_outlines_apiimporturlsasfiction_outlines_api_urlsurlpatterns=[...url(r'^',include(fiction_outlines_api_urls)),...]If you haven’t already installedfiction_outlinesyou should runpython manage.py migratenow.FeaturesProvides a RESTful API fordjango-fiction-outlinesusing theDjango REST Framework, suitable for JSON, XML, or browsable HTML serialization.NOTE: As withfiction_outlines, this app makes use of the excellent object permissions librarydjango-rules.Running TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install -r test_requirements.txt
(myenv) $ pytest
(myenv) $ flake8 setup.py fiction_outlines_api testsCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.3.0 (2022-03-17)Support for django-fiction-outlines 0.4.0Update for Python 3.9 & 3.10Update for Django >= 3.2, < 4.10.2.1 (2018-10-16)Support for both python 3.6 and 3.70.2.0 (2018-08-08)Support for Django 2.10.1.3 (2018-06-21)Move dependency back to official django-taggit-serializer package now that our pull request has been merged.0.1.0 (2018-04-07)First release on PyPI.
Package: django-field-object-permissions
django-field-object-permissionsis an object permission system based on
field values of the object. (eg: object.owner == user)InstallTo install just run:pip install django-field-object-permissionsConfigurationPutfieldobjectpermissionsto yourINSTALLED_APPSof the settings module:INSTALLED_APPS = (
   ...
   'fieldobjectpermissions',
)2. Replace the default authentication backend (fieldobjectpermissions is based
on it):AUTHENTICATION_BACKENDS = (
    # django.contrib.auth.backends.ModelBackend,  # Default
    fieldobjectpermissions.backends.FieldObjectPermissionsBackend,
)These new values are optional, defaults are shown below:FIELD_OBJECT_PERMISSIONS = {
    'OWNER_FIELDS': ('owner',),
    'GROUP_FIELDS': ('group',),
    'OWNER_ACTIONS': ('change', 'delete'),
    'GROUP_ACTIONS': ('change', 'delete'),
}4. Runpython manage.py migrateas there are post-migration triggers to create
the extra permissions required.UsageYou can now assign permissions likeowner_change_footo allow only the user
who matches the value of theownerfield to change an object (or the
superuser, of course).Or the permissiongroup_delete_footo all allow any user who is a member of
a group listed in thegroupfield of an object to delete it (or the
superuser, you know this).These permissions are created in a post-migrate signal handler, and will only
be created for models with have the required field(s).By specifying multiple fields forOWNER_FIELDSorGROUP_FIELDSonly one of
the listed fields needs to exist for permission creation. And only one needs
to match for permission to be granted by the auth backend.
Package: django-fields
Introduction------------[![changelog](http://allmychanges.com/p/python/django-fields/badge/)](http://allmychanges.com/p/python/django-fields/?utm_source=badge)Django-fields is an application which includes different kinds of models fields.Right now, application contains two fields with encryption support:EncryptedCharField and EncryptedTextField.This project uses Travis for continuous integration: [![Build Status](https://secure.travis-ci.org/svetlyak40wt/django-fields.png)](http://travis-ci.org/svetlyak40wt/django-fields)Requirements-----------This application depends on *python-crypto*, which can be found in many Linuxrepositories, or downloaded from http://www.dlitz.net/software/pycrypto/.Under Ubuntu, just do:sudo apt-get install python-cryptoHow to run tests----------------Examples can be found at the `examples` directory. Look at the, `tests.py`.Same project is used to run unittests. To run them, just fire `./run-tests.sh`.Contributors------------* [zbyte64](http://www.djangosnippets.org/users/zbyte64/) — thanks to forhis [django snippet](http://www.djangosnippets.org/snippets/1095/) for encryptedfields. After some fixes, this snippet works as supposed.* John Morrissey — for fixing bug in PickleField.* Joe Jasinski — different fixes and new fields for encripted email and US Phone.* Colin MacDonald — for many encripted fields added.* Igor Davydenko — PickleField.* kromem - Added support for specifying `block_type` on encrypted fields.* Brooks Travis - new field for encrypted US Social Security Number and other fixes.[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/svetlyak40wt/django-fields/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
Package: django-fieldsets-with-inlines
Fieldsets with inlinesMix inlines and fieldsets in any order in Django admin.What is it?Django administration has nice feature to render related models as inlinesunderthe fieldsets out of the box. Unfortunately there is no easy
way to render inlines between fieldsets.But when the size of the model becomes bigger, ordering of fieldsets and
related inlines becomes critical for the usability.This package makes it easy to mix fieldsets and inlines in any order
you want with minimal changes required to your existing code.RequirementsPython: 3.4+Django: 2.0+Installationpip install django-fieldsets-with-inlinesAddfieldsets_with_inlinesto your INSTALLED_APPS Django settings.py:INSTALLED_APPS=[...'fieldsets_with_inlines',...]UsageIn youradmin.pyimportFieldsetsInlineMixin, renamefieldsetsproperty tofieldsets_with_inlinesand list inlines right between your
fieldsets. You could also removeinlinesproperty:fromfieldsets_with_inlinesimportFieldsetsInlineMixin...classTestAdmin(FieldsetsInlineMixin,admin.ModelAdmin):fieldsets_with_inlines=[('Objekt',{'fields':[('ID_RNO','id','kljuc','slug'),'naziv','kategorija']}),LastnistvoInline,('Kontaktni podatki',{'fields':[('kontaktna_oseba','email','poslji_obvestila')]}),KontaktInline,('Dostop',{'fields':['users',('cas_vpisa','zadnja_sprememba','cas_zadnje_posodobitve')]}),OdjavaInline]