Inline Tool/Task subscriptions in the admin interface
This commit is contained in:
parent
6d1ef6ab22
commit
dc4bfcca29
@ -3,14 +3,24 @@ from markdownx.admin import MarkdownxModelAdmin
|
|||||||
|
|
||||||
from .models import Tool, Task, Event, GroupTaskSubscription, GroupToolSubscription
|
from .models import Tool, Task, Event, GroupTaskSubscription, GroupToolSubscription
|
||||||
|
|
||||||
admin.site.register(Tool)
|
|
||||||
|
class GroupTaskSubscriptionInline(admin.TabularInline):
|
||||||
|
model = GroupTaskSubscription
|
||||||
|
|
||||||
|
|
||||||
|
class GroupToolSubscriptionInline(admin.TabularInline):
|
||||||
|
model = GroupToolSubscription
|
||||||
|
|
||||||
|
|
||||||
@admin.register(Task)
|
@admin.register(Task)
|
||||||
class TaskAdmin(MarkdownxModelAdmin):
|
class TaskAdmin(MarkdownxModelAdmin):
|
||||||
|
inlines = [GroupTaskSubscriptionInline]
|
||||||
prepopulated_fields = {"slug": ("name",)}
|
prepopulated_fields = {"slug": ("name",)}
|
||||||
|
|
||||||
|
|
||||||
admin.site.register(GroupTaskSubscription)
|
@admin.register(Tool)
|
||||||
admin.site.register(GroupToolSubscription)
|
class ToolAdmin(admin.ModelAdmin):
|
||||||
|
inlines = [GroupToolSubscriptionInline]
|
||||||
|
|
||||||
|
|
||||||
admin.site.register(Event)
|
admin.site.register(Event)
|
||||||
|
Loading…
Reference in New Issue
Block a user