Skip to main content

tungsten-quick-create

Quick Create plugin for Tungsten, the admin panel for FastAPI.

A + New button in the top bar. Pick what you want to add (a product, a lead, a ticket, an employee, an invoice...) and its form opens in a side panel, on top of the page you are on. Save, and you are still where you were.

What you get

  • A + New button on every page, listing every resource the signed-in user may create.
  • Works with other plugins out of the box: leads, tickets, HR, finance, blog and your own resources all show up.
  • Respects permissions: a user only sees what they may create (roles, policies and tenants).
  • The form opens in a side panel (or a popup) with live fields, uploads and validation, like the normal create page.
  • Create & create another for adding many records in a row.
  • After saving: a toast with an Open link to the new record, and any table on the page refreshes.
  • Grouped by sidebar group, with a search box when the list is long.
  • Optional keyboard shortcut.
  • Safe: a database error or a broken policy shows a message and never breaks the page.

Install

pip install tungsten-quick-create
from tungsten_quick_create import QuickCreatePlugin

panel.plugin(QuickCreatePlugin())

No tables, no settings needed.

Options

QuickCreatePlugin(
    include=None,             # only these resources (classes or slugs), in this order
    exclude=(),               # hide these resources (classes or slugs)
    label="New",              # "" shows just the + icon
    icon="plus",
    slide_over=True,          # False: a centred popup
    width="4xl",              # sm, md, lg, xl, 2xl, 3xl, 4xl, 5xl
    create_another=True,      # the "Create & create another" button
    open_after_create=False,  # True: go to the new record after saving
    group=True,               # split the menu by sidebar group
    search_from=8,            # show a search box once the menu has this many entries
    shortcut=None,            # e.g. "mod+shift+n" (mod is Ctrl, or Cmd on a Mac)
)

Hide one resource

class AuditLogResource(Resource):
    quick_create = False

Resources without a create page (pages = ("index",)) never show up.

Add your own entries (for plugin authors)

Anything that is not a resource form can be a link in the menu:

quick = panel.get_plugin("quick-create")
if quick is not None:
    quick.add_link("event", "Event", "/admin/calendar?new=1", icon="calendar", group="Planning")
    quick.add_link("upload", "Upload file", lambda ctx: ctx.url("media", "upload"), icon="upload",
                   visible=lambda user: user.is_staff)

The same key replaces an entry; quick.remove_link("event") removes it.

Try it

pip install -e . -e plugins/quick-create uvicorn
uvicorn plugins.quick-create.example:app --reload   # from the repo root

Open http://127.0.0.1:8000/admin and sign in with admin@example.com / password.

License

MIT

Metadata

Release files for tungsten-quick-create 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tungsten-quick-create 0.1.1
File Size Uploaded Provenance Actions
tungsten_quick_create-0.1.1.tar.gz 12.7 kB Without provenance Details for tungsten_quick_create-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tungsten-quick-create 0.1.1
File Interpreter ABI Platform Actions
tungsten_quick_create-0.1.1-py3-none-any.whl Python 3 none any Details for tungsten_quick_create-0.1.1-py3-none-any.whl

Total release size: 21.4 kB

Release files / tungsten_quick_create-0.1.1.tar.gz

Download URL tungsten_quick_create-0.1.1.tar.gz
Size 12.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c6fb026c11e65e5628adc3757f05356fcbc43d14679b96844b14208084ebe3cc
BLAKE2b-256 checksum
How to use checksums
58fa1ae5ec52f4d042d13ba44f9077682fe280bd12467ac5ba0965ebcab4c733
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.18

Release files / tungsten_quick_create-0.1.1-py3-none-any.whl

Download URL tungsten_quick_create-0.1.1-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2ea86b7029d7bfef552c3bf39d811d122ea4c6e9c7b390f3fd96ccfb6ca0bc3e
BLAKE2b-256 checksum
How to use checksums
cc1eb9b17c1b594f340659aa343af7b602330cc1ba1ce52bac2c4c34de4e3c70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.18

Security for tungsten-quick-create 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page