I havent defined more than one primary key. If primary key is defined, the
automatic field wouldnt be generated, right?
Sincerely yours,
Joel G Mathew
On Sat, 22 Dec 2018 at 16:13, Glen D souza wrote:
> if you check the error message
>
> DETAIL: Failing row contains (3, 1, Consultation OPD,
if you check the error message
DETAIL: Failing row contains (3, 1, Consultation OPD, 135, 135, null, 1).
There are total of 7 values
Check your model
class CGHSRates(models.Model):
rid = models.AutoField(primary_key=True)
serial = models.IntegerField(default=0)
name = models.CharField(max_lengt
Django - constraint error
I have the following python code in django which is deployed on heroku:
def newimportdb(request):
import xlrd
loc = ("./CGHS Rates 2014- Trivandrum.xlsx")
wb = xlrd.open_workbook(loc)
sheet = wb.sheet_by_index(0)
for i in range(sheet.nrows):
try:
sl = int(sheet.cell_valu
3 matches
Mail list logo