Skip to main content

Conjure your Django admin — read your models, summon a CRUD API and dashboard.

Project description

django-conjure

Conjure your Django admin — read your models, summon a CRUD API + schema.

The Python package behind Conjure. It introspects your models and serves a generic admin REST API (/conjure/) plus a schema endpoint that a frontend — or codegen — can read. A matching React dashboard lives in the repo and is in active development; for the 0.1.x line, point any client at the API below.

Install

pip install django-conjure          # session auth (default)
pip install "django-conjure[jwt]"   # add JWT auth mode
# settings.py
INSTALLED_APPS += ["conjure"]

CONJURE = {
    "AUTH": "session",                       # or "jwt"
    "BRAND": {"name": "My Admin", "accent": "#4f46e5"},
    # "USER_PAYLOAD": "myapp.hooks.payload", # custom user model? return any dict
}
# urls.py
urlpatterns += [path("conjure/", include("conjure.urls"))]
python manage.py migrate conjure   # AdminAuditLog table (audit log, optional but recommended)

Register a model

Drop an admin_config.py into any app — it's discovered automatically, like admin.py:

from conjure import register, AdminConfig
from myapp.models import Product

@register(Product)
class ProductConfig(AdminConfig):
    list_display = ["name", "price", "is_active"]
    search_fields = ["name"]
    list_filter = ["is_active"]
    inlines = [(ProductImage, "product")]   # inline child editing
    is_readonly = False                     # True => log/history models, blocks writes

Anything you leave unset is inferred from the model's fields.

What you get

  • GET /conjure/schema/ + …/schema/{app.Model}/ — model introspection (codegen + runtime source)
  • GET/POST /conjure/r/{app.Model}/ and …/{pk}/ — generic CRUD
  • …/autocomplete/, …/bulk/ (atomic inline ops), …/{pk}/related/ (delete impact)
  • Django-permission gating (view/add/change/delete, shared with Django admin), is_staff required
  • Audit log with before/after diff, staff auth (session or JWT), dashboard widget registry

Extend without forking

from conjure import register_widget

@register_widget("signup-trend")
def signup_trend(request):
    ...  # return any JSON; served at /conjure/widgets/signup-trend/

Full docs, the settings reference, the REST contract, and the extension SDK live at docs.conjure.terracelab.dev.

Develop

pip install -e ".[dev]"
pytest
ruff check . && ruff format --check .

MIT © Terrace Lab

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_conjure-0.1.0.tar.gz (22.2 kB view details)

Uploaded Source

Built Distribution

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

django_conjure-0.1.0-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

Details for the file django_conjure-0.1.0.tar.gz.

File metadata

  • Download URL: django_conjure-0.1.0.tar.gz
  • Upload date:
  • Size: 22.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for django_conjure-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a341d133675965c7dac8282bd773c740a21e9d5b97525157baa6026beb3d7284
MD5 3ad4e3fc35c9bcb5cc15710e84dd0c98
BLAKE2b-256 1d32313ab27b732c9d2073a248fe6a63c4989034c32881d10d420089ce4d760c

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_conjure-0.1.0.tar.gz:

Publisher: release.yml on terracelab/django-conjure

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_conjure-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: django_conjure-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for django_conjure-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0c9864833367249cdd8c2581c064229fe1ae0f8254ad2ab21c556eea5e472dfd
MD5 2f15c75081736b3d1d30d0d116b7326b
BLAKE2b-256 9153fcdafa73a567deac1425f34d9be2c97f107e17343d988c0684d4c69ca3e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_conjure-0.1.0-py3-none-any.whl:

Publisher: release.yml on terracelab/django-conjure

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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