i'm trying read data legacy database django 1.11. used inspectdb save database model app directory. anytime try open django shell or runserver error
valueerror: source code string cannot contain null bytes
can me solve error read data database?
my models:
# auto-generated django model module. # you'll have following manually clean up: # * rearrange models' order # * make sure each model has 1 field primary_key=true # * make sure each foreignkey has `on_delete` set desired behavior. # * remove `managed = false` lines if wish allow django create, modify, , delete table # feel free rename models, don't rename db_table values or field names. __future__ import unicode_literals django.db import models class justaccount(models.model): id = models.integerfield(primary_key=true) # autofield? account_name = models.charfield(db_column='account_name', max_length=100) # field name made lowercase. account_number = models.integerfield(db_column='account_number') # field name made lowercase. ammount = models.floatfield(db_column='ammount') # field name made lowercase. class meta: managed = false db_table = 'just_account'
Comments
Post a Comment