Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

Staff

An admin interface for staff users.

The Plain Staff is a new packages built from the ground up. It leverages class-based views and standard URLs and templates to provide a flexible admin where you can quickly create your own pages and cards, in addition to models.

  • cards
  • dashboards
  • diy forms
  • detached from login (do your own login (oauth, passkeys, etc))

Installation

  • install plain.staff and plain.htmx, add plain.staff.admin and plain.htmx to installed packages
  • add url

Models in the admin

Dashboards

{% load toolbar %}

... {% toolbar %} ... ```

More specific settings can be found below.

Tailwind CSS

This package is styled with Tailwind CSS, and pairs well with plain-tailwind.

If you are using your own Tailwind implementation, you can modify the "content" in your Tailwind config to include any Plain packages:

// tailwind.config.js
module.exports = {
  content: [
    // ...
    ".venv/lib/python*/site-packages/plain*/**/*.{html,js}",
  ],
  // ...
}

If you aren't using Tailwind, and don't intend to, open an issue to discuss other options.

plain.requestlog

The request log stores a local history of HTTP requests and responses during plain work (Django runserver).

The request history will make it easy to see redirects, 400 and 500 level errors, form submissions, API calls, webhooks, and more.

Watch on YouTube

Requests can be re-submitted by clicking the "replay" button.

Django request log

Installation

# settings.py
INSTALLED_PACKAGES += [
    "plainrequestlog",
]

MIDDLEWARE = MIDDLEWARE + [
    # ...
    "plainrequestlog.RequestLogMiddleware",
]

The default settings can be customized if needed:

# settings.py
DEV_REQUESTS_IGNORE_PATHS = [
    "/sw.js",
    "/favicon.ico",
    "/staff/jsi18n/",
]
DEV_REQUESTS_MAX = 50

Tailwind CSS

This package is styled with Tailwind CSS, and pairs well with plain-tailwind.

If you are using your own Tailwind implementation, you can modify the "content" in your Tailwind config to include any Plain packages:

// tailwind.config.js
module.exports = {
  content: [
    // ...
    ".venv/lib/python*/site-packages/plain*/**/*.{html,js}",
  ],
  // ...
}

If you aren't using Tailwind, and don't intend to, open an issue to discuss other options.

plain.impersonate

See what your users see.

A key feature for providing customer support is to be able to view the site through their account. With impersonate installed, you can impersonate a user by finding them in the Django admin and clicking the "Impersonate" button.

Then with the staff toolbar enabled, you'll get a notice of the impersonation and a button to exit:

Installation

To impersonate users, you need the app, middleware, and URLs:

# settings.py
INSTALLED_PACKAGES = INSTALLED_PACKAGES + [
  "plain.staff.impersonate",
]

MIDDLEWARE = MIDDLEWARE + [
  "plain.staff.impersonate.ImpersonateMiddleware",
]
# urls.py
urlpatterns = [
    # ...
    path("impersonate/", include("plain.staff.impersonate.urls")),
]

Settings

By default, all staff users can impersonate other users.

# settings.py
IMPERSONATE_ALLOWED = lambda user: user.is_staff
``` -->

Metadata

Release files for plain.staff 0.14.0

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

Source distribution (sdist)

Source distribution for plain.staff 0.14.0
File Size Uploaded
plain_staff-0.14.0.tar.gz 159.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for plain.staff 0.14.0
File Interpreter ABI Platform
plain_staff-0.14.0-py3-none-any.whl Python 3 none any Details

Total release size: 328.5 kB

Release files / plain_staff-0.14.0.tar.gz

Download URL plain_staff-0.14.0.tar.gz
Size 159.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4c44089cb703d32456b57e3c02d2ba43c626e51d1964bcce9f618aa95f994b29
BLAKE2b-256 checksum
How to use checksums
4bfa140729e1c3e2c4ac5c3e88a309d35a02e5363a6bb294bd5350775bda2f1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.5.29

Release files / plain_staff-0.14.0-py3-none-any.whl

Download URL plain_staff-0.14.0-py3-none-any.whl
Size 168.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f1b3bef9780e838e314361753abc475efd586f437bfb32c38b36047e25360fb
BLAKE2b-256 checksum
How to use checksums
15a3596df9677ddd59585f2cc2030484007df2b2e856a610616d58eab6f6065d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.5.29
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