Skip to main content

Staff dashboard and tools for Plain.

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

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 %} <!doctype html>

... {% 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
``` -->

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

plain_staff-0.10.0.tar.gz (158.2 kB view details)

Uploaded Source

Built Distribution

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

plain_staff-0.10.0-py3-none-any.whl (165.4 kB view details)

Uploaded Python 3

File details

Details for the file plain_staff-0.10.0.tar.gz.

File metadata

  • Download URL: plain_staff-0.10.0.tar.gz
  • Upload date:
  • Size: 158.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.5.21

File hashes

Hashes for plain_staff-0.10.0.tar.gz
Algorithm Hash digest
SHA256 5f3d38c1f3bda260fb2c625521941a76e7a9cc378bd1f2c84f3a5fe6fed809e1
MD5 64787c9ba3d46dc4b5d08da41860c112
BLAKE2b-256 8ab8bdcac1bd7962da3f8c944f2a917176a5fc345796f05928c2080d0a52de8d

See more details on using hashes here.

File details

Details for the file plain_staff-0.10.0-py3-none-any.whl.

File metadata

File hashes

Hashes for plain_staff-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 be7b8e9780ac3417032766c57cf794b3acb5476fbf0a43e6b9e30a4cd796dd17
MD5 3cefa8168cfbb0352dbd15dcbbbd9d55
BLAKE2b-256 1dddd5fd06f8d00d95c24eb2dae01b9842fe4f62a7cd09867bcd8781ca5bb315

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