Django Framework « Django InspectDb Oracle помогите исправить сгенерированную модель
Использую Django inspectdb cx_Oracle (Oracle 10g) получилась такая модель
/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */ .python.geshi_code {font-family:monospace;} .python.geshi_code .imp {font-weight: bold; color: red;} .python.geshi_code .kw1 {color: #ff7700;font-weight:bold;} .python.geshi_code .kw2 {color: #008000;} .python.geshi_code .kw3 {color: #dc143c;} .python.geshi_code .kw4 {color: #0000cd;} .python.geshi_code .co1 {color: #808080; font-style: italic;} .python.geshi_code .coMULTI {color: #808080; font-style: italic;} .python.geshi_code .es0 {color: #000099; font-weight: bold;} .python.geshi_code .br0 {color: black;} .python.geshi_code .sy0 {color: #66cc66;} .python.geshi_code .st0 {color: #483d8b;} .python.geshi_code .nu0 {color: #ff4500;} .python.geshi_code .me1 {color: black;} .python.geshi_code span.xtra { display:block; }
Но Django не понимает их. Что делать?
/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */ .python.geshi_code {font-family:monospace;} .python.geshi_code .imp {font-weight: bold; color: red;} .python.geshi_code .kw1 {color: #ff7700;font-weight:bold;} .python.geshi_code .kw2 {color: #008000;} .python.geshi_code .kw3 {color: #dc143c;} .python.geshi_code .kw4 {color: #0000cd;} .python.geshi_code .co1 {color: #808080; font-style: italic;} .python.geshi_code .coMULTI {color: #808080; font-style: italic;} .python.geshi_code .es0 {color: #000099; font-weight: bold;} .python.geshi_code .br0 {color: black;} .python.geshi_code .sy0 {color: #66cc66;} .python.geshi_code .st0 {color: #483d8b;} .python.geshi_code .nu0 {color: #ff4500;} .python.geshi_code .me1 {color: black;} .python.geshi_code span.xtra { display:block; }
class UAbiturient(models.Model):
fsregnumber$up = models.CharField(max_length=20)
fsfio$up = models.CharField(max_length=60)
fwaddfld[1] = models.IntegerField()
fwaddfld[2] = models.IntegerField()
fwaddfld[3] = models.IntegerField()
fwaddfld[4] = models.IntegerField()
fwaddfld[5] = models.IntegerField()
fsregnumber$up = models.CharField(max_length=20)
fsfio$up = models.CharField(max_length=60)
fwaddfld[1] = models.IntegerField()
fwaddfld[2] = models.IntegerField()
fwaddfld[3] = models.IntegerField()
fwaddfld[4] = models.IntegerField()
fwaddfld[5] = models.IntegerField()
Но Django не понимает их. Что делать?
1 ответов
Кому интересно
fsfioup = models.CharField(max_length=60,db_column='fsfio$up')
fwaddfld1 = models.IntegerField(db_column=' fwaddfld[1]')
fwaddfld1 = models.IntegerField(db_column=' fwaddfld[1]')