Hi all,
I have a custom primary key, but I can NOT get data from db.
===========================
**models.py**
class BuildRecord(models.Model):
sku_name = models.CharField(max_length=600, primary_key=True,
db_column='SKU_name')
download_link = models.CharField(max_length=1500, blank=True)
class Meta:
db_table = u'build_record'
**view.py**
records = BuildRecord.objects.using("rom_request").all()
**Error msg**
invalid literal for int() with base 10: 'sku_name'
===========================
I can get the same db with different table with primary key(id:int),
but I always failed with custom primary key.
Do I miss anything? or Any Suggestion?
Thanks.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.