Giter Club home page Giter Club logo

ministryofjustice.django-zendesk-tickets's Introduction

Django Zendesk Tickets

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

Copyright

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

ministryofjustice.django-zendesk-tickets's People

Contributors

ibrechin avatar ushkarev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.