Package: django-zendesk-tickets
An extensible library to add Django views with forms to submit tickets toZendesk.UsageAdd these to yoursettings.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.pyfromzendesk_tickets.viewsimportTicketViewpath(r'submit-ticket/$',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, subclassBaseTicketFormand
add them. If you wish to include them in the body of the ticket, create a new
ticket template and pass it as theticket_template_name. If you wish
to include them as custom fields, define the following in yoursettings.py:ZENDESK_CUSTOM_FIELDS={'referer':31,# zendesk field id'username':32,'user_agent':33,}The three fields in the example above are included inTicketFormby
default and can be included in your ticket by referencing them in the ticket
template or specifying custom field ids in settings.DevelopmentPlease report bugs and open pull requests onGitHub.To work on changes to this library, it’s recommended to install it in editable mode into a virtual environment,
i.e.pip install--editable.Usepython-mteststo run all tests locally.
Alternatively, you can usetoxif you have multiple python versions.Update translation files usingpython scripts/messages.py update, when any localisable strings change.
Compile them usingpython scripts/messages.py compile; this isrequiredbefore testing and distribution.
Updating and compiling translation files requires the gettext system package to be installed.[Only for GitHub team members] Distribute a new version toPyPIby:updating theVERSIONtuple inzendesk_tickets/__init__.pyadding a note to theHistorypublishing a release on GitHub which triggers an upload to PyPI;
alternatively, runpython scripts/messages.py compile; python-mbuild; twine upload dist/*locallyHistory0.17Migrated test, build and release processes away from deprecated setuptools commands.
Translation files are updated and compiled through scripts which are not included in distribution.
No significant library changes.0.16Drop support for python 3.6 and 3.7.
Add support for python 3.11.
Add experimental support for Django versions 4.0 & 4.1.
Improve testing and linting.0.15Add support for python 3.9 and 3.10.
Improve testing and linting.0.14Drop support for python 3.5.
Improve linting.0.13Drop python 2 support (now compatible with 3.5 - 3.8).
Support Django 2.2 - 3.2 (both LTS).0.12Improve testing and linting.0.11Support Django 1.10 - 2.0.
Add class-based Django views.
Add internationalisation support.0.10Fix display of tickets in Zendesk.0.9Don’t allow self-referential return-to URL.0.8Accept extra template context in views.0.7Use email address of logged-in user when available.0.6Collect email address of form submitter, optionally.0.5Fix bugs.0.4Provide a safe “return back to where you came from” link.0.3Add success view.0.2Fix bugs.0.1Original release.CopyrightCopyright (C) 2023 HM Government (Ministry of Justice Digital & Technology).
See LICENSE.txt for further details.