Skip to main content

A ticket application for Django projects

Project description

django-ticket

Ticket application for django project

Repository

You can find the source code and contribute to the project at the following link:

GitHub Repository

Contributors

Installation

1. install package

pip install django-ticket

2. add this application in settings.INSTALLED_APPS :

INSTALLED_APPS = [
    # ...
    'ticket',
    # ...
]

3. create and migrate migrations in BASE_DIR:

python manage.py migrate ticket

4. in core application include application urls:

from django.urls import path , include

urlpatterns += path("ticket/", include("ticket.urls"))

when you pass this missions you will see this in your admin panel:

Screenshot from 2024-01-14 10-07-30

API Documentation:

You can create a Ticket from admin panel for a user to admin. Note that and you can do all this operations from admin to a user

/ticket/

Create a ticket from user to admin and add a new message:

method: POST

required keywords : ("title","section","priority","message")

/ticket/

Get all tickets of user as a list

method: GET

required keywords : just must to be authorized.

/ticket/id/

Add message to a ticket with its id :

method: POST

required keywords : ("message",)

Note: id means ticket's id

/ticket/id/

Get a specific ticket by detail with its messages by it's id and Change ticket to seen state from user

method: GET

required keywords : just must to be authorized.

Note: id means ticket's id

/ticket/id/

Close ticket.

method: PATCH

required keywords : just must to be authorized.

Note: id means ticket's id

A little more Professional

You can filter and have not seen tickets in admin panel:

settings.py:

1. Add 'ticket/templates' to DIRS of TEMPLATES:

TEMPLATES = [
    {
        # ...
        'DIRS': [
            # ...
            'ticket/templates'
            # ...
                    ],
        # ...
    }
]

2.Add 'ticket.context_processors.get_pending_tickets' to context_processors OPTIONS:

TEMPLATES = [
    # ...
            "OPTIONS": {
            # ...
            "context_processors": [
                # ...
            'ticket.context_processors.get_pending_tickets'
                # ...
            ]
            # ...
    }
]

Finally your application is complete to use:

Screenshot from 2024-01-14 10-19-39

Let's enjoy!

Changelog

Added

  • New features or enhancements that are planned or in progress.

Changed

  • Changes made to existing features or functionality.

Deprecated

  • Features that are still available but are planned for removal in future releases.

Fixed

  • Bug fixes or issues that have been resolved.

[Version 3.1.1] - 2024-10-29

Added

  • soft_delete attribute ticket and messages.
  • viewed attribute view time of a message.
  • viewer attribute viewer user of a message.
  • swagger api docs and schemas.

Changed

  • Make urls RESTFUL. just one address -> /ticket/

Deprecated

  • See ticket with an endpoint. seen_by_user by get ticket in detail

Removed

  • Features removed in this version.

Fixed

  • seen_by_admin switches to True when open ticket object in admin panel

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-ticket-3.1.1.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

django_ticket-3.1.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file django-ticket-3.1.1.tar.gz.

File metadata

  • Download URL: django-ticket-3.1.1.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for django-ticket-3.1.1.tar.gz
Algorithm Hash digest
SHA256 bd306e3626f519e6953ccec8589686eb4522a978a21d42bf098419064ab7a525
MD5 5d9ffc7ddab7310413a2095449d330ea
BLAKE2b-256 27cd3e90dec3af0db5e3c34e5d16777707e065754e36595eebc1206d2e4a3578

See more details on using hashes here.

File details

Details for the file django_ticket-3.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_ticket-3.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 62909c85097f1a43ccf241e501f418ff64fdea2e57dc349914b4d43aef54f5d0
MD5 d8595069ef8fd7b896d2cf6a5a291ac2
BLAKE2b-256 7d6e1537ad0c80bcc8144e84fb92c7b3a5f251c40da89bfcbe49d62e32536cdb

See more details on using hashes here.

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