Django: dynamic models disappear after creation

后端 未结 1 636
青春惊慌失措
青春惊慌失措 2021-01-26 00:52

Let\'s say I have 2 models. Model_A and Model_B.

Whenever the admin user makes a change to an object of model_A, they click the \"save\" button.

So, when a \"s

相关标签:
1条回答
  • 2021-01-26 01:26

    This is presumably happening because your server is using more than one process. Any dynamic class will only exist within the process that creates it; and even then it won't persist across process restarts.

    I don't know what your use case is here but this is certainly not the way to do it.

    0 讨论(0)
提交回复
热议问题