feat(src): add ticketing REST API and admin UI for tickets, settings, and branding

Introduce DRF views for ticket creation, listing, updating, and commenting, integrate admin registrations for new models, and provide a demo data command to seed initial content. This enables full project management workflow within the backend.
This commit is contained in:
sankalp committed 2026-06-28 14:16:16 +05:45
1 parent 57c6984c66
commit ab0e71f7eb
85 files changed
+8257 -145

No files matched your search

+116
View File
@@ -0,0 +1,116 @@
# Generated by Django 6.0.6 on 2026-06-28 07:26
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name="Project",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("name", models.CharField(max_length=255)),
("description", models.TextField(blank=True, null=True)),
("ticket_prefix", models.CharField(max_length=255)),
(
"color",
models.CharField(
blank=True,
help_text="Hex color e.g. #3B82F6",
max_length=7,
null=True,
),
),
("start_date", models.DateField(blank=True, null=True)),
("end_date", models.DateField(blank=True, null=True)),
("pinned_date", models.DateTimeField(blank=True, null=True)),
("created_at", models.DateTimeField(auto_now_add=True)),
("updated_at", models.DateTimeField(auto_now=True)),
],
options={
"verbose_name": "Project",
"verbose_name_plural": "Projects",
"db_table": "projects",
},
),
migrations.CreateModel(
name="ProjectMember",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("created_at", models.DateTimeField(auto_now_add=True)),
("updated_at", models.DateTimeField(auto_now=True)),
(
"project",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="project_members",
to="projects.project",
),
),
(
"user",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="project_memberships",
to=settings.AUTH_USER_MODEL,
),
),
],
options={
"verbose_name": "Project Member",
"verbose_name_plural": "Project Members",
"db_table": "project_members",
},
),
migrations.AddField(
model_name="project",
name="members",
field=models.ManyToManyField(
related_name="projects",
through="projects.ProjectMember",
to=settings.AUTH_USER_MODEL,
),
),
migrations.AddConstraint(
model_name="projectmember",
constraint=models.UniqueConstraint(
fields=("project", "user"), name="unique_project_member"
),
),
migrations.AddIndex(
model_name="project",
index=models.Index(
fields=["pinned_date"], name="projects_pinned__118cce_idx"
),
),
migrations.AddIndex(
model_name="project",
index=models.Index(
fields=["start_date", "end_date"], name="projects_start_d_cb24a6_idx"
),
),
]