I've got the situation where a Wagtail snippet is a model that has a FK relationship. I can't figure out how to make that available in the CMS as an inline.
Given:
@register_snippet
class TeamMember(models.Model):
name = models.CharField(max_length=80)
(other fields)
content_panels = [
FieldPanel('name'),
(etc.)
#InlinePanel('tasks', label="Team Tasks")
]
class Task(models.Model):
team_member = ForeignKey('TeamMember', related_name='tasks')
(other fields)
how do I allow Task to be an inline to TeamMember?
Or is this only possible if TeamMember is a Page?