Skip to main content

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.

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

django-zendesk-tickets-0.8.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

django_zendesk_tickets-0.8-py2-none-any.whl (6.9 kB view details)

Uploaded Python 2

File details

Details for the file django-zendesk-tickets-0.8.tar.gz.

File metadata

File hashes

Hashes for django-zendesk-tickets-0.8.tar.gz
Algorithm Hash digest
SHA256 fb4122afdf9bc338760c3d015a3e6f6f67fa8bcd77d985ab82ce6da6ce07d032
MD5 1b6bd429211e022062d28d4ce7b2a779
BLAKE2b-256 4439cd551eaa5b75aa60a10504e56d70f5cb5bbf6f608a8181cb4e2b2b225cc7

See more details on using hashes here.

Provenance

File details

Details for the file django_zendesk_tickets-0.8-py2-none-any.whl.

File metadata

File hashes

Hashes for django_zendesk_tickets-0.8-py2-none-any.whl
Algorithm Hash digest
SHA256 a58a51c949d3b7e6672f22bb8e77e078397a30c5b6ab101e66b2bc595df319a8
MD5 6fbe3c7a4c26b2b88f5e4f070143e617
BLAKE2b-256 02546259e2120437fc154d92d23a3adf526323e0b900e9af1d47bca07f1d3615

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page