django-ticket


Namedjango-ticket JSON
Version 2.1.1 PyPI version JSON
download
home_pagehttps://github.com/HosseinSayyedMousavi
SummaryA ticket application for django project
upload_time2024-01-14 07:43:45
maintainer
docs_urlNone
authorHossein Sayyedmousavi
requires_python
license
keywords django database ticket
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # django-ticket
Ticket application for django project

### 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](https://github.com/HosseinSayyedMousavi/django-ticket/assets/104124540/15d7ba19-c157-4cb0-a4a5-330101641b19)


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

### .../create_ticket/
Create a ticket from user to admin and add a new message:

method: ```post```

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

### .../add_message/
Add message to a ticket :

method: ```post```

required keywords : ```("ticket","message")```

Note: ticket means ticket's id

### .../close/
Close ticket.

method: ```patch```

required keywords : ```("ticket",)```

Note: ticket means ticket's id

### .../seen/
Change ticket to seen state from user

method: ```patch```

required keywords : ```("ticket",)```

Note: ticket means ticket's id

### .../get_my_tickets/
Get all tickets of user as a list

method: ```get```

required keywords : ```just must to be authorized.```


## 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](https://github.com/HosseinSayyedMousavi/django-ticket/assets/104124540/c68600d9-1e9f-4f5a-9a7a-8ba4644a8bec)


Thanks for attention

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/HosseinSayyedMousavi",
    "name": "django-ticket",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "django,database,ticket",
    "author": "Hossein Sayyedmousavi",
    "author_email": "Hossein.Sayyedmousavi@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f9/1b/4f3565c4a1603cf2928a8396e7acd62a75484b1df14f647bdbc43d48f885/django-ticket-2.1.1.tar.gz",
    "platform": null,
    "description": "# django-ticket\nTicket application for django project\n\n### 1. install package\n```\npip install django-ticket\n```\n\n### 2. add this application in settings.INSTALLED_APPS :\n```\nINSTALLED_APPS = [\n    # ...\n    'ticket',\n    # ...\n]\n```\n### 3. create and migrate migrations in BASE_DIR: \n    python manage.py migrate ticket\n\n### 4. in core application include application urls:\n```\nfrom django.urls import path , include\n\nurlpatterns += path(\"ticket/\", include(\"ticket.urls\"))\n```\n\nwhen you pass this missions you will see this in your admin panel:\n\n\n![Screenshot from 2024-01-14 10-07-30](https://github.com/HosseinSayyedMousavi/django-ticket/assets/104124540/15d7ba19-c157-4cb0-a4a5-330101641b19)\n\n\n## API Documentation:\nYou can create a Ticket from admin panel for a user to  admin.\nNote that and you can do all this operations from admin to a user\n\n### .../create_ticket/\nCreate a ticket from user to admin and add a new message:\n\nmethod: ```post```\n\nrequired keywords :  ```(\"title\",\"section\",\"priority\",\"message\")```\n\n### .../add_message/\nAdd message to a ticket :\n\nmethod: ```post```\n\nrequired keywords : ```(\"ticket\",\"message\")```\n\nNote: ticket means ticket's id\n\n### .../close/\nClose ticket.\n\nmethod: ```patch```\n\nrequired keywords : ```(\"ticket\",)```\n\nNote: ticket means ticket's id\n\n### .../seen/\nChange ticket to seen state from user\n\nmethod: ```patch```\n\nrequired keywords : ```(\"ticket\",)```\n\nNote: ticket means ticket's id\n\n### .../get_my_tickets/\nGet all tickets of user as a list\n\nmethod: ```get```\n\nrequired keywords : ```just must to be authorized.```\n\n\n## A little more Professional\nYou can filter and have not seen tickets in admin panel:\n### settings.py:\n\n### 1. Add 'ticket/templates' to DIRS of TEMPLATES:\n```\nTEMPLATES = [\n    {\n            # ...\n        'DIRS': ['ticket/templates'],\n            # ...\n    }\n]\n```\n\n### 2.Add 'ticket.context_processors.get_pending_tickets' to context_processors OPTIONS:\n```\nTEMPLATES = [\n    # ...\n            \"OPTIONS\": {\n            # ...\n            \"context_processors\": [\n                # ...\n            'ticket.context_processors.get_pending_tickets'\n                # ...\n            ]\n            # ...\n    }\n]\n    # ...\n```\nFinally your application is complete to use:\n\n\n![Screenshot from 2024-01-14 10-19-39](https://github.com/HosseinSayyedMousavi/django-ticket/assets/104124540/c68600d9-1e9f-4f5a-9a7a-8ba4644a8bec)\n\n\nThanks for attention\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A ticket application for django project",
    "version": "2.1.1",
    "project_urls": {
        "Homepage": "https://github.com/HosseinSayyedMousavi"
    },
    "split_keywords": [
        "django",
        "database",
        "ticket"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "936cc39b885efd47fa2e3cd5739bb99b12a42a94a597e9c6b904b7bb1e3a5e97",
                "md5": "f2c9d95e7003b150b2ac2af9d1f05e6c",
                "sha256": "91e11ae23375bb84c7e751dd6fbef429513b59ff97d76d6c3b2501a8f47c8b5a"
            },
            "downloads": -1,
            "filename": "django_ticket-2.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f2c9d95e7003b150b2ac2af9d1f05e6c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7970,
            "upload_time": "2024-01-14T07:43:43",
            "upload_time_iso_8601": "2024-01-14T07:43:43.466709Z",
            "url": "https://files.pythonhosted.org/packages/93/6c/c39b885efd47fa2e3cd5739bb99b12a42a94a597e9c6b904b7bb1e3a5e97/django_ticket-2.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f91b4f3565c4a1603cf2928a8396e7acd62a75484b1df14f647bdbc43d48f885",
                "md5": "a7c314d77be11ce02a69374541997792",
                "sha256": "d17bb2335cc898d039eb9db2cc4aa917ec8263ec33236e496e691b6875ec864c"
            },
            "downloads": -1,
            "filename": "django-ticket-2.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "a7c314d77be11ce02a69374541997792",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6458,
            "upload_time": "2024-01-14T07:43:45",
            "upload_time_iso_8601": "2024-01-14T07:43:45.404928Z",
            "url": "https://files.pythonhosted.org/packages/f9/1b/4f3565c4a1603cf2928a8396e7acd62a75484b1df14f647bdbc43d48f885/django-ticket-2.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-14 07:43:45",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "django-ticket"
}
        
Elapsed time: 0.17888s