tinypig
V2EX  ›  Django

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

  •  
  •   tinypig · Jan 2, 2017 · 3558 views
    This topic created in 3417 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   ·   4520 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 05:30 · PVG 13:30 · LAX 22:30 · JFK 01:30
    ♥ Do have faith in what you're doing.