Skip to main content

Flexible query filter conditions, that can be defined from django-admin and used for segmentation of date (i.e. Profiles).

Project description

https://badge.fury.io/py/django-flexible-filter-conditions.svg https://travis-ci.org/PetrDlouhy/django-flexible-filter-conditions.svg?branch=master https://codecov.io/gh/PetrDlouhy/django-flexible-filter-conditions/branch/master/graph/badge.svg

Flexible query filter conditions, that can be defined from django-admin and used for segmentation of date (i.e. Profiles).

Documentation

The full documentation is at https://django-flexible-filter-conditions.readthedocs.io.

Quickstart

Install Django flexible filter conditions:

pip install django-flexible-filter_conditions

Add it to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    'flexible_filter_conditions.apps.FlexibleFilterConditionsConfig',
    ...
)

Add Django flexible filter conditions’s URL patterns:

FLEXIBLE_FILTER_CONDITIONS_FIELD_MAP = {
    'User': ('aklub.models', 'User'),
    'Profile': ('aklub.models', 'Profile'),
    'Payment': ('aklub.models', 'Payment'),
    'User.last_payment': ('aklub.models', 'Payment'),
    'User.userchannels': ('aklub.models', 'DonorPaymentChannel'),
}

Features

  • TODO

Running Tests

Does the code actually work?

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox

Credits

Tools used in rendering this package:

History

0.5.0 (2020-02-19)

  • refactor: remove filter_by_condition(), make it NamedCondition class method filter_by_query()
  • fix contains operator
  • add more testing

0.4.0 (2020-02-18)

  • added support for new operators: in, list, date
  • mutlipe conditions in one named comdition can be added to support subsequent filters
  • add xor operator
  • add negate to condtition (and remove nor)

0.3.0 (2020-01-23)

  • fixes and improvements for better user orientation

0.2.0 (2020-01-21)

  • Added blank paremeter value
  • Added isnull filter

0.1.0 (2020-01-14)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-flexible-filter-conditions, version 0.5.0
Filename, size File type Python version Upload date Hashes
Filename, size django-flexible-filter-conditions-0.5.0.tar.gz (31.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page