Skip to main content

Build a form to seek records using multiple parameters

Project description

django-multiseek

Tests Coverage Status PyPI version

Graphical query builder for Django. Lets your end users compose nested AND/OR/AND-NOT searches across multiple fields, save and load form presets, and pick the result rendering — without writing any SQL.

The Python core (multiseek/logic.py, multiseek/views.py, multiseek/models.py) is UI-agnostic. Four reference frontends ship as runnable example projects under examples/.

Depends on:

  • Django
  • django-autocomplete-light

Supported configurations:

Django Python 3.10 Python 3.11 Python 3.12 Python 3.13
4.2 + + + +
5.1 + + + +
5.2 + + + +
6.0 + +

Installation

pip install django-multiseek

Or with uv:

uv add django-multiseek

Example projects (recommended starting point)

Four runnable Django projects under examples/, each demonstrating a different UI on top of the same Python core. Run any of them — or all four — with the helper script at the repo root:

./run_example.sh setup           # prepare all four (idempotent)
./run_example.sh run htmx        # setup + start dev server on :8000
./run_example.sh test            # run every example's Playwright suite
./run_example.sh test bootstrap  # one example's tests
Example UI stack Project JS When to pick it
examples/minimal Foundation 6 + jQuery ~26 KB jQuery widgets You like the original look, but want no yarn build step
examples/bootstrap Bootstrap 5 + jQuery ~26 KB jQuery widgets Your project already uses Bootstrap
examples/alpine Bootstrap 5 + Alpine.js ~14 KB Alpine components Drop jQuery, keep a small declarative JS layer
examples/htmx htmx (server-rendered fragments) 0 KB project JS Eliminate JS state management entirely

What run_example.sh does

  • setup [name] — for one example, or all four:
    • uv sync --all-extras (only for examples that ship their own pyproject.toml; currently alpine)
    • manage.py migrate (creates the SQLite DB)
    • manage.py fetch_assets — downloads JS/CSS deps from CDN into static/multiseek/vendor/ so the example renders without depending on a public CDN at runtime. Idempotent; skips files already present.
    • manage.py initial_data — seeds 7 languages, 8 authors, 27 books (varied titles/years/multi-author/dates so every field type has something interesting to filter on).
  • run <name> — runs setup then manage.py runserver for that example. Open http://127.0.0.1:8000/multiseek/.
  • test [name] — runs setup then pytest --browser chromium. With no name, runs all four in sequence and exits non-zero if any failed (drop-in for CI).

Manual setup (without run_example.sh)

If you'd rather run the steps yourself:

cd examples/<minimal|bootstrap|alpine|htmx>
uv sync                              # only required for alpine (own pyproject.toml)
uv run python manage.py migrate
uv run python manage.py fetch_assets
uv run python manage.py initial_data
uv run python manage.py runserver

Architecture: how the UI variants share one core

multiseek/logic.py exports a JSON wire format. Each frontend's job is to:

  1. let the user build a nested form,
  2. produce the JSON the registry expects (or, for htmx, mutate the session JSON one fragment at a time),
  3. POST or GET it back to multiseek's bundled views.

See docs/FRONTENDS.md for the full design, per-variant tradeoffs, and the wire-format invariants.

test_project/ — full-feature reference

The repo also contains test_project/ — the canonical full-feature Foundation/jQuery demo. Unlike the example projects, it uses yarn to fetch its frontend assets and is the home of the Playwright test suite that runs in CI against the multiseek package itself. To run it:

uv sync --all-extras
cd test_project
yarn
uv run python manage.py collectstatic --noinput -v0
uv run python manage.py migrate
uv run python manage.py initial_data
uv run python manage.py runserver

License

MIT License. See LICENSE for details.

Project details


Download files

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

Source Distribution

django_multiseek-0.10.1.tar.gz (33.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_multiseek-0.10.1-py3-none-any.whl (44.8 kB view details)

Uploaded Python 3

File details

Details for the file django_multiseek-0.10.1.tar.gz.

File metadata

  • Download URL: django_multiseek-0.10.1.tar.gz
  • Upload date:
  • Size: 33.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for django_multiseek-0.10.1.tar.gz
Algorithm Hash digest
SHA256 c2a24b86af6f66feb7e64a9ac4ddb73ca9d4086fe6a9e2d27792467483e7a598
MD5 65d1b001dc6c69852a03711d621ead83
BLAKE2b-256 1985b1599c5faec3a3d7601bee507c0e80fefbd360dbee48411047df00c7835d

See more details on using hashes here.

File details

Details for the file django_multiseek-0.10.1-py3-none-any.whl.

File metadata

  • Download URL: django_multiseek-0.10.1-py3-none-any.whl
  • Upload date:
  • Size: 44.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for django_multiseek-0.10.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6746197ecc1e79f55e2d488d6fa9f7c4440f294035714a722f7b1ca07e42e130
MD5 3d07fe1ebe1ad49814738c5c1dc65dec
BLAKE2b-256 68ad6bf7de82d2398f5c22f69e9f154f78d1993552d5e7afd9f9451d5e7f261d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page