[](https://travis-ci.org/cbmi/django-support-form)
[](https://coveralls.io/r/cbmi/django-support-form?branch=master)
Simple contact/support form for Django apps.
## Install
```bash
pip install django-support-form
```
## Setup
Add `supportform` to `INSTALLED_APPS` along with the following Django contrib apps:
```python
INSTALLED_APPS = (
'supportform',
...
)
```
Include the `supportform.urls` in the the `ROOT_URLCONF`:
```python
from django.conf.urls import url, patterns, include
urlpatterns = patterns('',
url(r'^support/', include('supportform.urls')),
...
)
```
## Settings
- `SUPPORT_EMAIL` - The recipient email address the support email will be sent to, e.g. 'support@example.com'. Default is `DEFAULT_FROM_EMAIL` Django setting.
- `SUPPORT_EMAIL_SUBJECT` - Default email subject prepopulated in the support form. Default is 'Support Message'.
- `SUPPORT_WAIT_SEND` - Wait until the email successfully sends. If set to false, the email will be sent in the background (via a thread). Default `True`
## Templates
The templates that come with the django-supportform are functional, but _very_ minimal:
- `supportform/form.html` - Renders the support form omitting the email field is the user is logged in. On submission if the email fails to send, a fallback message will be display to send an email directly to `SUPPORT_EMAIL`.
- Context received:
- `form` - `SupportForm` instance
- `supportform/success.html` - Renders a static success/thank you page. This is the page redirected to after successfully sending a message.
- Context received: (none)
An email template is also provided and can be customized as well:
- `supportform/email_body.txt`
- Context recieved:
- `message` - Left by the user
- `request` - Request object
- `user` - If the message was left by an authenticated user
Metadata
Release files for django-support-form 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-support-form-0.1.0.tar.gz | 5.0 kB | Without provenance | Details for django-support-form-0.1.0.tar.gz |
Release files / django-support-form-0.1.0.tar.gz
| Download URL | django-support-form-0.1.0.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff787ac2ea1be05d4b47cc0aea365027f9dd55fb8ef9a57571d4a7acf8cc4059
|
|
BLAKE2b-256 checksum How to use checksums |
fbddb8c865f939dbd74d0962e2f270b66baa4890a8b064538f72d5bc0ad44905
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-support-form 0.1.0
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.