Files
project-managment/apps/kanban/signals.py
T
sankalp 3197ef1665 feat(apps): implement priority handling and comment system for kanban cards
New Features:
- Add `Priority` enum and `priority` field to `Card` model.
- Add `TicketComment` model and `TicketCommentCreateView` with inline comment support.
- Introduce templatetag filters `add_class`, `field_type`, and `render_markdown`.

Enhancements:
- Extend `CustomUser.is_admin()` to recognise superusers.
- Populate `KanbanConfig.ready()` to import signals for proper initialization.
- Expand ticket views and URLs to include assignee, priority, and comment handling.

Bug Fixes:
- None.
2026-05-28 00:27:02 +05:45

14 lines
421 B
Python

from django.db.models.signals import post_save
from django.dispatch import receiver
from apps.kanban.models import Board, Column
DEFAULT_COLUMNS = ["To Do", "In Progress", "Done"]
@receiver(post_save, sender=Board)
def create_default_columns(sender, instance, created, **kwargs):
if created:
for i, name in enumerate(DEFAULT_COLUMNS):
Column.objects.create(board=instance, name=name, order=i)