首页 文章
  • 1 votes
     answers
     views

    Django Admin中的内联

    我有两个模型,Order和UserProfile . 每个Order都有一个ForeignKey to UserProfile,以将其与该用户相关联 . 在每个订单的django管理页面上,我想显示与之关联的UserProfile,以便于处理信息 . 我试过内联: class UserInline(admin.TabularInline): model = UserProfile cla...
  • 0 votes
     answers
     views

    无法保存使用内联实现的多关系的实例对象

    在我的应用程序中,我想实现用户可以选择创建具有多个产品的预订的功能 . My problem is that despite the fact that I can create the inline form it is not possible to save the instance referring to preorder in my view.py 我的表单显示为Preorder模...

热门问题