ngits-tickets
Base tickets application for Django projects
Setup
1. Install using pip:
pip install ngits-tickets
2. Change your settings file:
INSTALLED_APPS = [
...
"rest_framework",
"rest_framework.authtoken",
"tickets"
]
...
REST_FRAMEWORK = {
"DEFAULT_AUTHENTICATION_CLASSES": [
"rest_framework.authentication.TokenAuthentication",
],
# Optional path to custom TextChoices class
"DEFAULT_SCHEMA_CLASS": "myapp.consts.MyTypes",
}
...
# Optional
TYPE_CHOICES_PATH = "path.to.MyCustomTypeChoices"
3. Create custom ticket types (optional):
./consts.py
from django.db.model import TextChoices
class MyTypes(TextChoices):
foo = "foo"
bar = "bar"
4. Add paths to your urls.py file:
from django.urls import path, include
urlpatterns = [
...
path("/", include("tickets.urls")),
]
5. Run migrations:
py manage.py migrate
6. Optional redoc configuration:
pip install drf-spectacular==0.23.*
settings.py:
INSTALLED_APPS = [
...
"drf_spectacular"
]
SPECTACULAR_SETTINGS = {
"TITLE": "<proj_name> API",
"VERSION": "1.0.0",
}
TEMPLATES = [
...
'DIRS': [ BASE_DIR / "templates"],
...
]
../<django_project>/templates/redoc.html:
<!DOCTYPE html>
<html>
<head>
<title>ReDoc</title>
<!-- needed for adaptive design -->
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
<!-- ReDoc doesn't change outer page styles -->
<style>
body {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<redoc spec-url='{% url schema_url %}'></redoc>
<script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"> </script>
</body>
</html>
Metadata
Release files for ngits-tickets 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ngits_tickets-2.0.1.tar.gz | 5.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ngits_tickets-2.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.1 kB
Release files / ngits_tickets-2.0.1.tar.gz
| Download URL | ngits_tickets-2.0.1.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a56a2741f75fae2fb499785a85e2dc3cedcf7473f8526afb54c722c6bde4a3f8
|
|
BLAKE2b-256 checksum How to use checksums |
3092e9c8c066e10134db0fe09e4a3345b382d8037242859a00fe7c670dac5ca7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Release files / ngits_tickets-2.0.1-py3-none-any.whl
| Download URL | ngits_tickets-2.0.1-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0b76ad481f875532f61af76be27f9e9146eb8ee9adff9ee2f08ece78debd9e27
|
|
BLAKE2b-256 checksum How to use checksums |
10fedf5c2c2d240a150a2a0ab501138df4c228d5a112b21f8de443ca6050b4fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Security for ngits-tickets 2.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.