Skip to main content

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 sent
  • SUPPORT_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:

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plain_support-0.16.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

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

plain_support-0.16.0-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file plain_support-0.16.0.tar.gz.

File metadata

  • Download URL: plain_support-0.16.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.13

File hashes

Hashes for plain_support-0.16.0.tar.gz
Algorithm Hash digest
SHA256 5c4f27c8a6c19decb40b5a18a54acf43ae6aaf72855189e1a4e4c4266105ab08
MD5 e4856bf43ee6004a510264bd777566a8
BLAKE2b-256 d47ddda9325fe43cc1254a67fb331563870d1fe58bfaa3ccc8ab3d53f40e6a37

See more details on using hashes here.

File details

Details for the file plain_support-0.16.0-py3-none-any.whl.

File metadata

File hashes

Hashes for plain_support-0.16.0-py3-none-any.whl
Algorithm Hash digest
SHA256 989e950d8a71d69043f05e6ae9f6a7b1b13e0992df44832125fb89d3bf63f3e6
MD5 df17bf8b98a0f06dcdd2c4a8814827f8
BLAKE2b-256 f91cb93142ef2e506d5fba66afb8c94e7a891ae6afc8a2edc767910aa37ee7de

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