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.
14 lines
421 B
Python
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)
|