django-zendesk-tickets


Namedjango-zendesk-tickets JSON
Version 0.18 PyPI version JSON
download
home_pagehttps://github.com/ministryofjustice/django-zendesk-tickets
SummaryDjango views and forms that submit tickets to Zendesk
upload_time2024-09-02 11:23:21
maintainerNone
docs_urlNone
authorMinistry of Justice Digital & Technology
requires_python>=3.6
licenseMIT
keywords django tickets zendesk
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Django Zendesk Tickets
======================

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

Usage
-----

Add these to your ``settings.py``:

.. code-block:: python

    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

.. code-block:: python

    from zendesk_tickets.views import TicketView

    path(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, 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``:

.. code-block:: python

    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
-----------

.. image:: https://github.com/ministryofjustice/django-zendesk-tickets/actions/workflows/test.yml/badge.svg?branch=main
    :target: https://github.com/ministryofjustice/django-zendesk-tickets/actions/workflows/test.yml

.. image:: https://github.com/ministryofjustice/django-zendesk-tickets/actions/workflows/lint.yml/badge.svg?branch=main
    :target: https://github.com/ministryofjustice/django-zendesk-tickets/actions/workflows/lint.yml

Please report bugs and open pull requests on `GitHub`_.

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 .``

Use ``python -m tests`` to run all tests locally.
Alternatively, you can use ``tox`` if you have multiple python versions.

Update translation files using ``python scripts/messages.py update``, when any localisable strings change.
Compile them using ``python scripts/messages.py compile``; this is *required* before 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 to `PyPI`_ by:

- updating the ``VERSION`` tuple in ``zendesk_tickets/__init__.py``
- adding a note to the `History`_
- publishing a release on GitHub which triggers an upload to PyPI;
  alternatively, run ``python scripts/messages.py compile; python -m build; twine upload dist/*`` locally

History
-------

0.18
    Add experimental support for Django versions 5.0 & 5.1.

0.17
    Migrated 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.16
    Drop 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.15
    Add support for python 3.9 and 3.10.
    Improve testing and linting.

0.14
    Drop support for python 3.5.
    Improve linting.

0.13
    Drop python 2 support (now compatible with 3.5 - 3.8).
    Support Django 2.2 - 3.2 (both LTS).

0.12
    Improve testing and linting.

0.11
    Support Django 1.10 - 2.0.
    Add class-based Django views.
    Add internationalisation support.

0.10
    Fix display of tickets in Zendesk.

0.9
    Don’t allow self-referential return-to URL.

0.8
    Accept extra template context in views.

0.7
    Use email address of logged-in user when available.

0.6
    Collect email address of form submitter, optionally.

0.5
    Fix bugs.

0.4
    Provide a safe "return back to where you came from" link.

0.3
    Add success view.

0.2
    Fix bugs.

0.1
    Original release.

Copyright
---------

Copyright (C) 2023 HM Government (Ministry of Justice Digital & Technology).
See LICENSE.txt for further details.

.. _Zendesk: https://developer.zendesk.com/rest_api
.. _GitHub: https://github.com/ministryofjustice/django-zendesk-tickets
.. _PyPI: https://pypi.org/project/django-zendesk-tickets/

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ministryofjustice/django-zendesk-tickets",
    "name": "django-zendesk-tickets",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "django, tickets, zendesk",
    "author": "Ministry of Justice Digital & Technology",
    "author_email": "dev@digital.justice.gov.uk",
    "download_url": "https://files.pythonhosted.org/packages/5b/85/72dd16f82c07ef43b5e48c870a2c58d1a958d702f3a4cbc89d8a8af374f9/django_zendesk_tickets-0.18.tar.gz",
    "platform": null,
    "description": "Django Zendesk Tickets\n======================\n\nAn extensible library to add Django views with forms to submit tickets to `Zendesk`_.\n\nUsage\n-----\n\nAdd these to your ``settings.py``:\n\n.. code-block:: python\n\n    ZENDESK_BASE_URL = 'https://example.zendesk.com'\n    ZENDESK_API_USERNAME = ...\n    ZENDESK_API_TOKEN = ...\n    ZENDESK_REQUESTER_ID = ...\n    ZENDESK_GROUP_ID = ...\n\nAdd an entry to your urls.py\n\n.. code-block:: python\n\n    from zendesk_tickets.views import TicketView\n\n    path(r'submit-ticket/$', TicketView.as_view(\n        success_url='/',\n        template_name='app_name/submit-ticket-page.html',\n        ticket_subject='Website Feedback',\n        ticket_tags=['website', 'feedback']\n        ticket_template_name='app_name/feedback-ticket.txt',\n    ), name='submit_ticket'),\n\nIf you wish to include additional fields, subclass ``BaseTicketForm`` and\nadd them. If you wish to include them in the body of the ticket, create a new\nticket template and pass it as the ``ticket_template_name``. If you wish\nto include them as custom fields, define the following in your ``settings.py``:\n\n.. code-block:: python\n\n    ZENDESK_CUSTOM_FIELDS = {\n        'referer': 31,  # zendesk field id\n        'username': 32,\n        'user_agent': 33,\n    }\n\nThe three fields in the example above are included in ``TicketForm`` by\ndefault and can be included in your ticket by referencing them in the ticket\ntemplate or specifying custom field ids in settings.\n\nDevelopment\n-----------\n\n.. image:: https://github.com/ministryofjustice/django-zendesk-tickets/actions/workflows/test.yml/badge.svg?branch=main\n    :target: https://github.com/ministryofjustice/django-zendesk-tickets/actions/workflows/test.yml\n\n.. image:: https://github.com/ministryofjustice/django-zendesk-tickets/actions/workflows/lint.yml/badge.svg?branch=main\n    :target: https://github.com/ministryofjustice/django-zendesk-tickets/actions/workflows/lint.yml\n\nPlease report bugs and open pull requests on `GitHub`_.\n\nTo work on changes to this library, it\u2019s recommended to install it in editable mode into a virtual environment,\ni.e. ``pip install --editable .``\n\nUse ``python -m tests`` to run all tests locally.\nAlternatively, you can use ``tox`` if you have multiple python versions.\n\nUpdate translation files using ``python scripts/messages.py update``, when any localisable strings change.\nCompile them using ``python scripts/messages.py compile``; this is *required* before testing and distribution.\nUpdating and compiling translation files requires the gettext system package to be installed.\n\n[Only for GitHub team members] Distribute a new version to `PyPI`_ by:\n\n- updating the ``VERSION`` tuple in ``zendesk_tickets/__init__.py``\n- adding a note to the `History`_\n- publishing a release on GitHub which triggers an upload to PyPI;\n  alternatively, run ``python scripts/messages.py compile; python -m build; twine upload dist/*`` locally\n\nHistory\n-------\n\n0.18\n    Add experimental support for Django versions 5.0 & 5.1.\n\n0.17\n    Migrated test, build and release processes away from deprecated setuptools commands.\n    Translation files are updated and compiled through scripts which are not included in distribution.\n    No significant library changes.\n\n0.16\n    Drop support for python 3.6 and 3.7.\n    Add support for python 3.11.\n    Add experimental support for Django versions 4.0 & 4.1.\n    Improve testing and linting.\n\n0.15\n    Add support for python 3.9 and 3.10.\n    Improve testing and linting.\n\n0.14\n    Drop support for python 3.5.\n    Improve linting.\n\n0.13\n    Drop python 2 support (now compatible with 3.5 - 3.8).\n    Support Django 2.2 - 3.2 (both LTS).\n\n0.12\n    Improve testing and linting.\n\n0.11\n    Support Django 1.10 - 2.0.\n    Add class-based Django views.\n    Add internationalisation support.\n\n0.10\n    Fix display of tickets in Zendesk.\n\n0.9\n    Don\u2019t allow self-referential return-to URL.\n\n0.8\n    Accept extra template context in views.\n\n0.7\n    Use email address of logged-in user when available.\n\n0.6\n    Collect email address of form submitter, optionally.\n\n0.5\n    Fix bugs.\n\n0.4\n    Provide a safe \"return back to where you came from\" link.\n\n0.3\n    Add success view.\n\n0.2\n    Fix bugs.\n\n0.1\n    Original release.\n\nCopyright\n---------\n\nCopyright (C) 2023 HM Government (Ministry of Justice Digital & Technology).\nSee LICENSE.txt for further details.\n\n.. _Zendesk: https://developer.zendesk.com/rest_api\n.. _GitHub: https://github.com/ministryofjustice/django-zendesk-tickets\n.. _PyPI: https://pypi.org/project/django-zendesk-tickets/\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Django views and forms that submit tickets to Zendesk",
    "version": "0.18",
    "project_urls": {
        "Homepage": "https://github.com/ministryofjustice/django-zendesk-tickets"
    },
    "split_keywords": [
        "django",
        " tickets",
        " zendesk"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8fc6cd125860f3634a525b85d7ef7af26bfea93793c3daf08f53c7200d55b9c6",
                "md5": "1617a46c511d9bb6189427918a3214a4",
                "sha256": "19752002113f4d0b4728ea0d0a141ef64ef94d41e2cc52d556918363d12fec3d"
            },
            "downloads": -1,
            "filename": "django_zendesk_tickets-0.18-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1617a46c511d9bb6189427918a3214a4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 9771,
            "upload_time": "2024-09-02T11:23:20",
            "upload_time_iso_8601": "2024-09-02T11:23:20.373783Z",
            "url": "https://files.pythonhosted.org/packages/8f/c6/cd125860f3634a525b85d7ef7af26bfea93793c3daf08f53c7200d55b9c6/django_zendesk_tickets-0.18-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5b8572dd16f82c07ef43b5e48c870a2c58d1a958d702f3a4cbc89d8a8af374f9",
                "md5": "197fd3e16967edb012eed7a410568c06",
                "sha256": "ece471616f045f4eedbf79c226af112401121e6ff7365c53efd94d49ca677148"
            },
            "downloads": -1,
            "filename": "django_zendesk_tickets-0.18.tar.gz",
            "has_sig": false,
            "md5_digest": "197fd3e16967edb012eed7a410568c06",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 9906,
            "upload_time": "2024-09-02T11:23:21",
            "upload_time_iso_8601": "2024-09-02T11:23:21.477334Z",
            "url": "https://files.pythonhosted.org/packages/5b/85/72dd16f82c07ef43b5e48c870a2c58d1a958d702f3a4cbc89d8a8af374f9/django_zendesk_tickets-0.18.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-02 11:23:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ministryofjustice",
    "github_project": "django-zendesk-tickets",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "django-zendesk-tickets"
}
        
Elapsed time: 0.31655s