作者:toto333 | 来源:互联网 | 2023-05-19 17:45
IhaveamodelnamedNameModelinmyappnamedCustomer.Iwannareusethatmodelsoneofthechoic
I have a model named NameModel in my app named Customer. I wanna reuse that model's one of the choices in my another app's model or forms.py. How can I do that. Following is the code of my form in Customer app. GENDERCHOICES = ( ( "", ("---")), (6, ("Male")), (7, ("Female")), (8, ("Notknown")), )
Please help.
我在名为Customer的应用程序中有一个名为NameModel的模型。我想重用该模型是我的另一个应用程序模型或forms.py中的一个选择。我怎样才能做到这一点。以下是我在客户应用程序中的表单代码。 GENDERCHOICES =((“”,(“---”)),(6,(“男性”)),(7,(“女性”)),(8,(“未知”)),)请帮忙。
1 个解决方案