Reputation: 38352
I am using django 1.4. I have a primary key filed called city_id
. when i go to add a new record in django admin, it asks me to enter the primary key. why is it doing so.
class CityMaster(models.Model):
city_id = models.IntegerField(primary_key=True)
Upvotes: 1
Views: 980
Reputation: 313
If you do so, it means no automatic key will be provided by django which is why you have to provide it by hands.
Upvotes: 1