python - Django CharField primary key doesn't work, creating rowid primary key automatically -


i using django models sqlite database.

i defined charfield primary key (for example name of attribute a) physical database synced django shows primary key rowid instead of a.

i tried dropping table , re-sync couple of time still same.

why?

class testtable(models.model):     = models.charfield(max_length=10, primary_key=true, db_column='a') 

----------------------edit------------------------

django version 1.8.3


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -