Skip to main content

Django views and forms that submit tickets to Zendesk

Project description

An extensible library to add Django views with forms to submit tickets to Zendesk.

Usage

Add these to your settings.py:

ZENDESK_BASE_URL = 'https://example.zendesk.com'
ZENDESK_API_USERNAME = ...
ZENDESK_API_TOKEN = ...
ZENDESK_REQUESTER_ID = ...
ZENDESK_GROUP_ID = ...

Add an entry to your urls.py

from zendesk_tickets import views

url(r'^submit_ticket/$', views.TicketView.as_view(
    success_url='/',
    template_name='app_name/submit_ticket_page.html',
    ticket_subject='Website Feedback',
    ticket_tags=['website', 'feedback']
    ticket_template_name='app_name/feedback_ticket.txt',
), 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.

Development

https://travis-ci.org/ministryofjustice/django-zendesk-tickets.svg?branch=master

Please report bugs and open pull requests on GitHub.

Use python setup.py test to run all tests.

If any localisable strings change, run python setup.py makemessages compilemessages.

Distribute a new version to PyPi by updating the VERSION tuple in zendesk_tickets and creating a release in GitHub (this triggers a GitHub Actions workflow to automatically upload it).

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.13.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

django_zendesk_tickets-0.13-py2.py3-none-any.whl (9.6 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: django-zendesk-tickets-0.13.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for django-zendesk-tickets-0.13.tar.gz
Algorithm Hash digest
SHA256 bc74425b12a3ac2bf1bfcf019b15f2ea0dbebce137f20273d08a5a45507007d8
MD5 c3d415d0863f60beb31672caa316640c
BLAKE2b-256 872904cdf5a2bc23e569a86b8d0b4cbfea489b405d90c28489f4536e2d63de15

See more details on using hashes here.

Provenance

File details

Details for the file django_zendesk_tickets-0.13-py2.py3-none-any.whl.

File metadata

  • Download URL: django_zendesk_tickets-0.13-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for django_zendesk_tickets-0.13-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7b5af591c5bf37960539ba87272d7a919730a3bd77ed0a7d8463104eb258310c
MD5 d654219c5077a5fed589069566e2d0a9
BLAKE2b-256 aac0de5861f13791bdf8083bc7c4860a4893492388c99aed585f382229b364c8

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