阅读背景:

保存后访问Django自定义模型字段(非主要BigAutoField)的值

来源:互联网 

I have Django custom field "BigAutoField" in one of my models. This is not a primary key. I am using uuid as my primary key. On insertion, everything is working fine. I am getting a new entry in mysql database with auto incremented value of this field. But the problem is after save the model instance is not able to fetch this field's value. (dot notation is not working). I have to again fetch the object instance to access its value. Can anyone help me how to access the value without reloading? I have Django custom field "BigAutoField" in on




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: