tinypig
V2EX  ›  Django

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

  •  
  •   tinypig · Jan 2, 2017 · 3612 views
    This topic created in 3447 days ago, the information mentioned may be changed or developed.

    如下有两个 Model :

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

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

    1 replies    2017-01-03 13:26:31 +08:00
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   953 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 21:50 · PVG 05:50 · LAX 14:50 · JFK 17:50
    ♥ Do have faith in what you're doing.