V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
tinypig
V2EX  ›  Django

如何较好的在同一个 View 中处理多个关联 Form?

  •  
  •   tinypig · 2017-01-02 13:14:46 +08:00 · 2655 次点击
    这是一个创建于 2643 天前的主题,其中的信息可能已经有所发展或是发生改变。

    如下有两个 Model :

    class User(Model):
        name = xxxx
    
    class UserProfile(Model):
        user = OneToOneField(User)
        phone = xxxx
    

    需要在一个页面中批量加入用户信息,那么如何处理 Form(FormSet)比较好呢?

    1 条回复    2017-01-03 13:26:31 +08:00
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3615 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 10:28 · PVG 18:28 · LAX 03:28 · JFK 06:28
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.