我有django模型:
class Profile(models.Model):
user = models.OneToOneField(User)
parent = models.ForeignKey(User, related_name='parent_user_for_profile')
如何创建返回所有子用户的函数。你知道吗
For n12 - [n122, n1211б n121, dsf]
For n1 - [n12, n11, n122, n1211, n121, dsf]
For n2 - [n21, n212]
相关问题 更多 >
编程相关推荐