Saravanan666/pypi-org huggingface dataset:
Package: django-filter-groups
django filter groupsThis package groups filters generated by django-filter.The main reason to use it - show only selected filters.It groups filters by theirfield_name.
The filter lookup will be subtracted fromfilter_name.
That's whyint_fieldandint_field__isnullin example above, will be placed in ine groupclassMyFilterSet(django_filters.FilterSet):int_field=django_filters.NumberFilter()int_field__isnull=django_filters.NumberFilter(lookup_expr="isnull")A group name resolution goes the next way:findingfilter_group_labelin any filter in current groupif multiple were found, the first would be selectedit's not good idea to add multiplefilter_group_label'sthe ways to addfilter_group_labelyou can findhereiffilter_group_labelwasn't added, it's finding label declared in a filter withexactlookup expressionif it isn't presented, it'll get the first declared filter for this group and take its labelif no label is found, it'll get the field verbose_name from modelotherwise, it'll set"[invalid name]"group name, and it won't be able to choose such grouphow to usepip install django-filter-groupsadd to yourINSTALLED_APPSafterdjango-filterINSTALLED_APPS=[..."django_filters","django_filters_groups",...]use it in your template:add{% add_select_filter_form_to_context %}to the top of your template.
It allows you to place{{ select_filter_form.media }}anywhere you wantadd{% filters_by_groups %}add{{ select_filter_form.media }}If FilterSet name is not 'filter' -> add filterset to both tags{% add_select_filter_form_to_context my_custom_filterset %}{% filters_by_groups my_custom_filterset %}or filterset name{% filters_by_groups "my_custom_filterset" %}{% add_select_filter_form_to_context "my_custom_filterset" %}warningIt's necessary to add values toexactandiexactVERBOSE_LOOKUPS.Filter choice will be empty if the lookups isn't presentedIt's important to add filter verbose lookup in the end of declared filter label
iffilter_group_labelwasn't added in any filter,
and it's a filter with exact lookup or the first in a groupDefault groups of model fields declared inFilterSet._meta.fieldshave normal labels# settings.py# FILTERS_VERBOSE_LOOKUPS = {"exact": "match"}classF(django_filters.FilterSet):my_number_filter=django_filters.NumberFilter(label="number match")# goodmy_number_filter=django_filters.NumberFilter(label="number")# baddefault settings# django settings
FILTERS_GROUPS_SELECT_FILTER_FORM_LABEL = "Select a label"// static/django_filters_groups/filter-defaults.jsletfilterDefaults={filterWrapperSelector:"p",// p is necessary when you use {{ form.as_p }}submitOnFilterDelete:false,};change group nameYou can set group name directly in 2 ways:addfilter_group_labelto your filterclassFFieldCountFilter(django_filters.NumberFilter):filter_group_label="custom_group_label"useget_filter_class_with_custom_labelfromdjango_filters_groups.utilsimportget_filter_class_with_group_labelclassMyFilterSet(django_filters.FilterSet):custom_filter=get_filter_class_with_group_label(django_filters.NumberFilter,"custom_group_label")(method="custom_filter_method")
Package: django-filter-kaizntree
Kaizntree Django FilterThis is a fork from django-filter with some minor funcionalities added
for developing at Kaizntree.Django FilterDjango-filter is a reusable Django application allowing users to declaratively
add dynamicQuerySetfiltering from URL parameters.Full documentation onread the docs.Versioning and stability policyDjango-Filter is a mature and stable package. It uses a two-part CalVer
versioning scheme, such as21.1.1. The first number is the year. The second
is the release number within that year.On an on-going basis, Django-Filter aims to support all current Django
versions, the matching current Python versions, and the latest version of
Django REST Framework.Please see:Status of supported Python branchesList of supported Django versionsSupport for Python and Django versions will be dropped when they reach
end-of-life. Support for Python versions will dropped when they reach
end-of-life, even when still supported by a current version of Django.Other breaking changes are rare. Where required, every effort will be made to
apply a “Year plus two” deprecation period. For example, a change initially
introduced in23.xwould offer a fallback where feasible and finally be
removed in25.1. Where fallbacks are not feasible, breaking changes without
deprecation will be called out in the release notes.InstallationInstall using pip:pipinstalldjango-filterThen add'django_filters'to yourINSTALLED_APPS.INSTALLED_APPS=[...'django_filters',]UsageDjango-filter can be used for generating interfaces similar to the Django
admin’slist_filterinterface.  It has an API very similar to Django’sModelForms.  For example, if you had a Product model you could have a
filterset for it with the code:importdjango_filtersclassProductFilter(django_filters.FilterSet):classMeta:model=Productfields=['name','price','manufacturer']And then in your view you could do:defproduct_list(request):filter=ProductFilter(request.GET,queryset=Product.objects.all())returnrender(request,'my_app/template.html',{'filter':filter})Usage with Django REST FrameworkDjango-filter provides a customFilterSetand filter backend for use with
Django REST Framework.To use this adjust your import to usedjango_filters.rest_framework.FilterSet.fromdjango_filtersimportrest_frameworkasfiltersclassProductFilter(filters.FilterSet):classMeta:model=Productfields=('category','in_stock')For more details see theDRF integration docs.SupportIf you need help you can start adiscussion. For commercial support, pleasecontact Carlton Gibson via his website.
Package: django-filternaut
Filternaut is a simple library which generates arbitrarily complex Django
Q-objects from simple data. It fits nicely into situations where users provide
data which you want to filter a queryset with.Filternaut is indirectly a collection of fields, but it differs from Django
forms in that you specify the logical relationships between fields, as well
their names and types.Filternaut is similar to Django Filters, but does not provide any machinery for
rendering a user interface and does not inspect your models to autogenerate
filters. However, Django Filters chains many calls to.filter()which means
OR-like behaviour with more than one join. Filternaut supports either
behaviour.Quickstart# filters are combined using logical operatorsfilters=(DateTimeFilter('created_date',lookups=['lt','gt'])&CharFilter('username',lookups=['icontains']))# they can read their values from anything dict-likefilters.parse(request.GET)# and have a form-like 'validity pattern'.iffilters.valid:queryset=queryset.filter(filters.Q)else:raiseHttpResponseBadRequest(json.dumps(filters.errors))Installation$pipinstalldjango-filternautFilternaut is compatible with:Python 3Django 2.2 and 3.0Django REST Framework 3.11 (optional)Python 2.7 support is still in the codebase but no longer tested. You are
welcome to try your luck.DocumentationSeehttps://filternaut.readthedocs.orgfor full documentation.
Package: django-filtersmerger
DocumentationThe full documentation is athttps://django-filtersmerger.readthedocs.io.QuickstartInstall Django filtersmerger:$pipinstalldjango-filtersmergerAdddjango-filtersmergerto yourINSTALLED_APPSINSTALLED_APPS=[# ...'django_filtersmerger',# ...]Running TestsDoes the code actually work?$source<YOURVIRTUALENV>/bin/activate$(myenv)$pipinstalltox$(myenv)$toxContributorsHere is a list of Django-filtersmerger’s contributors.
Package: django-filters-mixin
django-filters-mixinSimple integration betweendjango-filterandpaginationRequirementsYou must havedjango-filterinstalled and configured, see thedjango-filterdocumentation for details and setup instructions.Installationpipinstalldjango-filters-mixinUsageTheFilterMixinallows to use pagination together with filtering# views.pyimportdjango_filtersfromfilters.viewsimportFilterMixinclassCustomFilterSet(django_filters.FilterSet):# read https://github.com/alex/django-filter#usage...classCustomFilterView(FilterMixin,django_filters.views.FilterView):filterset_class=CustomFilterSetpaginate_by=12...Please seeexampleapplication. This application is used to
manually test the functionalities of this package. This also serves as
good example…You need Django 1.4 or above to run that. It might run on older
versions but that is not tested.
Package: django-filtrate
Allow trusted users to create custom Django admin filtersQuickstartInstall Django Filtrate:pip install django-filtrateAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(..."filtrate",...)Add the mixinclassYourModelAdmin(FiltrateMixin,admin.ModelAdmin):...Navigate tohttp://localhost:8000/admin/filtrate/filterAdd your new filter!How it worksAs soon as you add the FiltrateMixin to your ModelAdmin, your model and admin
will be registered with Filtrate.  At this point, you can navigate to the Filtrate
admin page, and begin adding filters.Filtrate uses Django’s built-in filtering to build it’s ListFilters, by passing thefiltersfield as arguments
to the queryset. Seehttps://docs.djangoproject.com/en/dev/topics/db/queries/#retrieving-specific-objects-with-filtersfor more details about filtering queries with Django.For example, let’s say you have the followingTemplatemodel:classTemplate(models.Model):name=models.CharField(max_length=25)is_active=models.BooleanField(default=True)created_at=models.DateTimeField(auto_now_add=True)def__str__(self):returnself.nameIf you wanted to build a filter for all active Templates created on or after 2023-01-01,
then yourFilter.filtersshould look like:{"is_active":True,"created_at__gte":"2023-01-01",}Save it, and then voila, you have a new filter on your TemplateAdmin!Happy Filtering!FeaturesFilterdata modelFiltrateMixinModelAdmin mixinTODO’sUser-specific filtersExport dataAdd Filterbutton on changelistAdditional test coverageSetup toxMore documentationLocal Developmentmake install
make testDeploymentmake build
make deployLicenseThis project is provided under theBSD License.
Package: django-finances
Django FinancesFinancial transactions and payments for Django.NOTE: This library is still under development and mostly undocumented. It is currently not recommended for use in (production) applications.FeaturesThis library consists of two modules: transactions and payments. The two modules were designed to be used together, but they can also be used separately.TransactionsTransactions are TODOPaymentsPayments are TODOPayment providersInvoiceMollieSEPA Direct DebitDocumentationThe documentation is availablehere.ContributingSee thedevelopment documentation. In the future more specific guidelines for contributing will be drafted.LicenseThis project is available under theMIT license. Note that some dependencies have different licenses.
Package: django-financial-transactions
Financial Transactions is a Django app to import and categorise transactions from financial institutions, where categories are assigned based on hints.It’s intended for hackers who want to build other interesting stuff with their categorised financial transactions.Quick StartAdd “financial_transactions” to your INSTALLED_APPS setting like this:INSTALLED_APPS = (
    ...
    'financial_transactions',
)Runpython manage.py syncdbto create the Financial Transaction models.3. Start the development server and visithttp://127.0.0.1:8000/admin/to create an account (you’ll need the Admin app enabled), choosing a transaction format for the account (currently only CommerzBank Giro and Commerzbank Mastercard csvs are supported, but I’ll add forms as people need them.)Import your transactions:./manage.py import_transactions ~/mydata/2013-01-commerzbank.csvYou can then browse your transactions in the /admin/, add transaction category hints, and reimport your csvs to automatically update the categories based on your hints.TestingTo run the tests, you’ll need to install a few additional test packages: mock, django_factory.
Package: django-find
django-find is a Django app that makes it easy to add complex
search functionality to your project. It supports two different ways
to search your Django models: Query-based, or JSON-based.By query-based, we mean that you can use statements like these
to search (filter) your model:hello worldauthor:”robert frost” and (title:road or chapter:2)You can also create complex multi-model searches/filters by
using a JSON-based query.Checkout the README.md on Github for more information.
Package: django-findcar
FindCarAdd descriptionDetailed documentation is in the "docs" directory.Quick startAdd "finder" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [
...
'finder',
]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-findreplace
ADjangomanagement command which will replace all instances of a string throughout a database
with another - useful for bulk content changes.InstallationUsingpip:$pipinstalldjango-findreplaceEdit your Django project’s settings module, and add the application toINSTALLED_APPS:INSTALLED_APPS=[# ..."findreplace",# ...]UsageTo replace all instances offoowithbar:$./manage.pyfindreplacefoobarTo use this command without being asked for confirmation:$./manage.pyfindreplace--noinputfoobar
Package: django-find-similar
django-find-similarfind-similar integration for djangoYou can findFull Project DocumentationhereWorkflowsPackageSupportDownloadsLanguagesDevelopmentMenuMissionOpen Source ProjectFeaturesRequirementsDevelopment StatusInstallQuickstartContributingMissionTo provide find-similar integration with django projectsOpen Source ProjectThis is the open source project withMIT license.
Be free to use, fork, clone and contribute.FeaturesDjango modelsDjango formsRequirementsdjango, find-similarSee more inFull DocumentationDevelopment StatusPackage already available onPyPiSee more inFull DocumentationInstallwith pippip install django-find-similarSee more inFull DocumentationQuickstartfromdjango_find_similar.modelsimportFindSimilarInput,Textinput_data={'text':Text.objects.create(text='one two'),# 'texts': [Text.objects.create(text='one'), Text.objects.create(text='two')],'language':"english",'count':5,# 'dictionary': None,'remove_stopwords':True,# 'keywords': None,}find_similar_input=FindSimilarInput.objects.create(**input_data)texts=[Text.objects.create(text='one'),Text.objects.create(text='two')]fortextintexts:find_similar_input.texts.add(text)find_similar_input.save()More examples inFull DocumentationContributingYou are welcome! To easy start please check:Full DocumentationContributingDeveloper DocumentationCode of ConductSecurity PolicyGovernanceSupport
Package: django-fineforms
This library offers an improved replacement for Django’s own form
rendering methods (as_p,as_tableetc.) while staying simple
and extensible but without introducing a whole new framework.django-fineforms consists of a template tag library and a few
opinionated default templates.GoalsStay simple and extensibleAvoid options, settings and customizability as much as possibleNon-goalsCompete with django-crispy-forms or any of the more flexible libraries
out thereInstallationSimplypip installdjango-fineforms, and addfineformsto yourINSTALLED_APPS.High-level overviewThe template tags mostly wrap their arguments in wrapper classes that do
the real work. For example,{% ff_field %}simply wraps the passed
field in a wrapper defined in theFINEFORMS_WRAPPERSsetting. All
wrappers use a template to render their output. The default wrapper
types are as follows:{"errors":ErrorsWrapper,"field":FieldWrapper,"field-plain":PlainFieldWrapper,"fields":FieldsWrapper,}The wrappers themselves mostly aren’t configurable, but you can replace
individual wrappers (or all of them) by adding aFINEFORMS_WRAPPERSsetting. You do not have to override all of them; if you only want to
add another wrapper for a specific field type you could just set:FINEFORMS_WRAPPERS={"specific":"app.wrappers.SpecificWrapper",}… and use this wrapper as{% ff_field some_fieldtype='specific'%}somewhere in your templates.Template tagsAll template tags are contained in thefineformslibrary.{% ff_field field [type=field] %}Template:fineforms/field.htmlRender a single field. The wrapper can be optionally overridden by
passing a different type. The key has to exist in theFINEFORMS_WRAPPERSdictionary.The default implementation renders the label, the widget, help text and
errors related to the field. It is recommended to also set theerror_css_classandrequired_css_classform attributes; those
classes are also added to the output.Thefield-plaintype can be used if the widget should be rendered
alone. A wrapping<span>tag still contains the CSS classes
mentioned above.{% ff_fields form[fields='a,b,c'|exclude='a,b,c']%}Template:fineforms/fields.htmlRender fields of a form.fieldsandexcludeare
comma-separated strings that can be used to only render a selection of
fields. Thefieldsparameter takes precedence if both are given.Hidden fields are rendered separately at the end, all other fields are
wrapped usingFINEFORMS_WRAPPERS["field"]and rendered as well.{% ff_errors form1 [form2...]%}Template:fineforms/errors.htmlRender form errors at the top. The default implementation renders all
non-field errors, and all errors from hidden fields.  Falsy parameters
(i.e.None) are filtered out for you. If there aren’t any errors at
all nothing is rendered.{% ff_hidden_fields form1 [form2...]%}This template tag is the outlier in that it does not use a template at
all. The return value is the concatenated result of rendering all hidden
fields of all passed forms. Falsy parameters (i.e.None) are
filtered out for you.Please note that{% ff_fields %}adds hidden fields to the output
automatically.{% ff_submit[_("label")]%}Template:fineforms/submit.htmlShow a submit button.
Package: django-finegrained-permissions
Add permissions per field instead of per model:from django.db import models
from django.contrib import admin
import fgp

@fgp.guard('slave', 'master', name='can_edit_master_slave')
class Harddisk(models.Model):
    type = models.CharField(max_length=255)
    slave = models.BooleanField(default=False)
    master = models.BooleanField(default=True)

@fgp.enforce
class HarddiskAdmin(admin.ModelAdmin)
    model = Harddisk

admin.site.register(Harddisk, HarddiskAdmin)or:admin.site.register(Harddisk, fgp.enforce(Harddisk, admin.ModelAdmin))Note that you need to setmodeleven when the admin class is not an inline admin.
Package: django-fineuploader
This is aDjangointegration ofFine UploaderJavaScript Upload Library.Installationpipinstalldjango-fineuploaderExternal dependenciesjQuery - This is not included in the package since it is expected that in most scenarios this would already be available.SetupAddfineuploaderandfineuploader.ajaxuploadertoINSTALLED_APPS:INSTALLED_APPS+=('fineuploader','fineuploader.ajaxuploader',)Be sure you have thedjango.template.context_processors.requestprocessorTEMPLATES=[{...'OPTIONS':{'context_processors':[...'django.template.context_processors.request',],},},]Update yoururls.pyfile:urlpatterns+=[url(r'^fineuploader/',include('fineuploader.urls')),]and includefineuploadertemplates{%include"fineuploader/fineuploader_css.html"%}{# Before the closing head tag #}{%include"fineuploader/fineuploader_js.html"%}{# Before the closing body tag #}When deploying on production server, don’t forget to run:pythonmanage.pycollectstaticUsage# forms.pyfromdjangoimportformsfromfineuploader.formsimportFineFormMixinfromfineuploader.formfieldsimportFineFileFieldclassExampleForm(FineFormMixin,forms.ModelForm):files=FineFileField(label="Files")classMeta:...defsave(self,*args,**kwargs):obj=super(ExampleForm,self).save(commit=True)self.handle_upload(obj,self.request)# handle uploaded filesself.delete_temporary_files()# deleting temporary files / objectsreturnobj# views.pyfromdjango.viewsimportgenericfromdjango.contrib.auth.mixinsimportLoginRequiredMixinclassExampleCreateView(LoginRequiredMixin,generic.CreateView):form_class=ExampleForm# our custom form class...defget_form_kwargs(self):kwargs=super(ExampleCreateView,self).get_form_kwargs()kwargs.update({"request":self.request})# must pass self.request into formreturnkwargsclassExampleUpdateView(LoginRequiredMixin,generic.UpdateView):form_class=ExampleForm# our custom form class...defget_form_kwargs(self):kwargs=super(ExampleUpdateView,self).get_form_kwargs()kwargs.update({"request":self.request})# must pass self.request into formreturnkwargsLicensedjango-fineuploaderis released under the BSD license.
Package: django-fine-uploader
Simple, Chunked and Concurrent uploads withDjango+Fine UploaderThis is an alpha version.We have aexampleproject. Justgit clonethe django-fine-uploader repository and follow the instructions.QuickstartInstall django_fine_uploader:pip install django-fine-uploaderAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'django_fine_uploader.apps.DjangoFineUploaderConfig',...)Add django_fine_uploader’s URL patterns:urlpatterns=[...url(r'^fine-uploader/',include('django_fine_uploader.urls',namespace='django_fine_uploader')),...]And finally your html file: copy fromthis gist. (too much html to put on our README)FeaturesSimple UploadChunked UploadConcurrent Chunked UploadReady to use upload endpointEasy extend FineUploaderView(FormView)Or create your custom view and use the Django Fine Uploader handlerTODOInstead of listing here, check theissuesandprojects.Running TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageFineuploader:http://fineuploader.comHistory0.2.0 (2017-02-12)Now we have aBaseFineUploaderA basic planing for Beta release:https://github.com/douglasmiranda/django-fine-uploader/projects/1Better info on README and more0.1.0 (2017-02-10)First release on PyPI.
Package: django_fiobank
Django-app for managing and processing Fio Bank transaction.Requiredfiobankpygal(required system packages libxml2-dev
libxslt1-dev)For testingmockInstallationGet and install the code:git clone git@github.com:rbas/django-fiobank.git
cd django-fiobank
python setup.py installor install via pip:pip install django_fiobankAdd ‘django_fiobank’ to INSTALLED_APPSRun django migration:./manage.py migrate django_fiobankUsageRun django in your browser and register Accounts and token forFio Bank Api.Downloading a save your bank transaction:./manage.py fiodownloadNotification when the token expiration:./manage.py fiochecktokentimevaliditySet this command as daily cron job.Usedjango.post_savesignal on modelTransactionfor couple your
invoice.For further information read code.License: ICS© 2013 Martin Voldrich <rbas.cz@gmail.com>This work is licensed underISC license.