Django views and forms that submit tickets to Zendesk
Project description
Settings
ZENDESK_BASE_URL=http://zendesk.example.com
ZENDESK_API_USERNAME=...
ZENDESK_API_TOKEN=...
ZENDESK_REQUESTER_ID=...
ZENDESK_GROUP_ID=...
Usage
Add an entry to your urls.py
from zendesk_tickets import views
from zendesk_tickets import forms
url(r'^submit_ticket/$', views.ticket, {
'template_name': 'xxx/submit_ticket_page.html',
'success_redirect_url': '/',
'ticket_template_name': 'zendesk_tickets/ticket.txt',
'form_class': forms.TicketForm,
'subject': 'Website Ticket',
'tags': [],
'extra_context': {},
}, name='submit_ticket'),
If you wish to include additional fields, subclass BaseTicketForm and add them. If you wish to include them in the body of the ticket, create a new ticket template and pass it as the ticket_template_name. If you wish to include them as custom fields, define the following in your settings.py:
ZENDESK_CUSTOM_FIELDS={
'referer': 31, # zendesk field id
'username': 32,
'user_agent': 33
}
The three fields in the example above are included in TicketForm by default and can be included in your ticket by referencing them in the ticket template or specifying custom field ids in settings.
Copyright
Copyright © 2016 HM Government (Ministry of Justice Digital Services). See LICENSE for further details.
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
File details
Details for the file django-zendesk-tickets-0.8.tar.gz
.
File metadata
- Download URL: django-zendesk-tickets-0.8.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb4122afdf9bc338760c3d015a3e6f6f67fa8bcd77d985ab82ce6da6ce07d032 |
|
MD5 | 1b6bd429211e022062d28d4ce7b2a779 |
|
BLAKE2b-256 | 4439cd551eaa5b75aa60a10504e56d70f5cb5bbf6f608a8181cb4e2b2b225cc7 |
Provenance
File details
Details for the file django_zendesk_tickets-0.8-py2-none-any.whl
.
File metadata
- Download URL: django_zendesk_tickets-0.8-py2-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a58a51c949d3b7e6672f22bb8e77e078397a30c5b6ab101e66b2bc595df319a8 |
|
MD5 | 6fbe3c7a4c26b2b88f5e4f070143e617 |
|
BLAKE2b-256 | 02546259e2120437fc154d92d23a3adf526323e0b900e9af1d47bca07f1d3615 |