Could you please give me a hint how to display tree in inline? For example imagine there are two models:
class Constructor(models.Model):
name = models.CharField(....)
class PerformersTree(models.Model):
role = models.CharField(....)
parent = TreeForeignKey('self', on_delete=models.CASCADE, null=True, blank=True, related_name='children')
constructor = models.ForeignKey(RoleConstructor, on_delete=models.CASCADE, null=True)
and admins:
class PerformersTreeInline(admin.TabularInline): # not working
model = PerformersTree
template = 'django_mptt_admin/change_list.html'
@admin.register(Constructor)
class RoleConstructorAdmin(admin.ModelAdmin):
inlines = PerformersTreeInline,
Your lib has functionality I need (buttons "add", "edit") and I'd like to create performers tree inside constructor with this buttons.
Hi and thanks for the Lib!
Could you please give me a hint how to display tree in inline? For example imagine there are two models:
and admins:
Your lib has functionality I need (buttons "add", "edit") and I'd like to create performers tree inside constructor with this buttons.