- New Features * Introduce CustomUser with role field and admin integration * Add ProjectMembership model linking users to projects * Add Ticket model with status, type, creator, and project relationships * Register CustomUser and ProjectMembership in Django admin with list views * Add URLs and views for account management and ticket CRUD operations - Enhancements * Provide pagination and filtering for ticket listings * Improve admin UI with role‑specific fieldsets - Bug Fixes * Remove obsolete serializers and placeholder files
31 lines
626 B
Python
31 lines
626 B
Python
from django.contrib import admin
|
|
|
|
from apps.kanban.models import Board, Card, Column
|
|
|
|
|
|
class ColumnInline(admin.TabularInline):
|
|
model = Column
|
|
extra = 1
|
|
|
|
|
|
class CardInline(admin.TabularInline):
|
|
model = Card
|
|
extra = 1
|
|
|
|
|
|
@admin.register(Board)
|
|
class BoardAdmin(admin.ModelAdmin):
|
|
list_display = ["name", "owner", "project"]
|
|
inlines = [ColumnInline]
|
|
|
|
|
|
@admin.register(Column)
|
|
class ColumnAdmin(admin.ModelAdmin):
|
|
list_display = ["name", "board", "order"]
|
|
inlines = [CardInline]
|
|
|
|
|
|
@admin.register(Card)
|
|
class CardAdmin(admin.ModelAdmin):
|
|
list_display = ["title", "column", "due_date", "order"]
|