Provides support forms for your application.
Project description
plain.support
Provides support forms for your application.
Overview
Include the support URLs in your urls.py:
# app/urls.py
from plain.urls import include, path
import plain.support.urls
urlpatterns = [
path("support/", include(plain.support.urls)),
# ...
]
Configure the required settings:
# app/settings.py
SUPPORT_EMAIL = "support@example.com"
This will create a support form at /support/ that users can fill out. When submitted, an email will be sent to your SUPPORT_EMAIL address with the user's message.
Configuration
Settings
SUPPORT_EMAIL(required): The email address where support requests will be sentSUPPORT_FORMS: A dictionary mapping form slugs to form classes (defaults to{"default": "plain.support.forms.SupportForm"})
Custom forms
You can create custom support forms by extending SupportForm:
# app/forms.py
from plain.support.forms import SupportForm
from plain import models
class BugReportForm(SupportForm):
browser = models.CharField(max_length=100, required=False)
class Meta:
model = SupportFormEntry
fields = ["name", "email", "message", "browser"]
Then register it in your settings:
SUPPORT_FORMS = {
"default": "plain.support.forms.SupportForm",
"bug-report": "app.forms.BugReportForm",
}
The form will be available at /support/bug-report/.
Views
The package provides several views:
SupportFormView: Renders the support form on a full pageSupportIFrameView: Renders the form in an iframe-friendly format (CSRF-exempt)SupportFormJSView: Serves JavaScript for embedded forms
Embedded forms
Support forms can be embedded in other sites using an iframe:
<iframe src="https://example.com/support/iframe/" width="100%" height="600"></iframe>
Or using the provided JavaScript embed:
<div id="support-form"></div>
<script src="https://example.com/support/form.js"></script>
Security considerations
Most support forms allow users to type in any email address. Be careful, because anybody can pretend to be anybody else at this point. Conversations either need to continue over email (which confirms they have access to the email account), or include a verification step (emailing a code to the email address, for example).
The SupportForm.find_user() method attempts to associate entries with existing users by email, but this does not confirm the submitter's identity.
Installation
Install the plain.support package from PyPI:
uv add plain.support
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file plain_support-0.27.1.tar.gz.
File metadata
- Download URL: plain_support-0.27.1.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
392097effeb03fe8444b89e0027e89ec29d0d7daec284375d715d32e25b6059c
|
|
| MD5 |
d581f98c7b0dc8921623f3e771f39ff0
|
|
| BLAKE2b-256 |
0cc6ce78c366783668e6e64abbb01f2b00f9eeaf5ba907fdcaf157e60720252d
|
File details
Details for the file plain_support-0.27.1-py3-none-any.whl.
File metadata
- Download URL: plain_support-0.27.1-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66a0d9c74381da519516be7d7f2e4bafe87555c3a86bc84f5c634d8322028492
|
|
| MD5 |
f3d0188ab071fb53b1d16a861e762df1
|
|
| BLAKE2b-256 |
9a93356eb6a5076ff0626703e92827607b94a58223c56403db2c09bfef8327f1
|