Skip to main content

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://github.com/ministryofjustice/django-zendesk-tickets/workflows/Run%20tests/badge.svg?branch=main

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 publishing a release in GitHub (this triggers a GitHub Actions workflow to automatically upload it). Alternatively, run python setup.py compilemessages sdist bdist_wheel upload locally.

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

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: django-zendesk-tickets-0.15.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2

File hashes

Hashes for django-zendesk-tickets-0.15.tar.gz
Algorithm Hash digest
SHA256 fa6b96eb111bf2c0f52ec15087374fed94e2b81138265d6705ebd1f89940bc4f
MD5 2d2e5784c985eae60071c88cd279364d
BLAKE2b-256 1223c4f33a4e0006aee5253f50c41ef52f9aa47934835e19797adc701c7d6e7d

See more details on using hashes here.

File details

Details for the file django_zendesk_tickets-0.15-py3-none-any.whl.

File metadata

  • Download URL: django_zendesk_tickets-0.15-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2

File hashes

Hashes for django_zendesk_tickets-0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 0f341b7c73bb84243d3d3ab7c1474080ac3c35bafd5e498230aa90241e835aad
MD5 8f8e98612990f33e84c3cd686b120355
BLAKE2b-256 62b4b39c02ced6de41019288b1209e9dc1b6ab74a87a5e768ec5c2f997ad2817

See more details on using hashes here.

Release history Release notifications | RSS feed

0.20

2 files

0.19

2 files

0.18

2 files

0.17

2 files

0.16

2 files

This release

0.15 This release

2 files

0.14

2 files

0.13

2 files

0.12

2 files

0.11

2 files

0.10

2 files

0.9

2 files

0.8

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page