Thanks a lot man. It worked. I just made it as AutoField :)
On Apr 21, 5:15 pm, Mike Ramirez <gufym...@gmail.com> wrote: > On Tuesday 21 April 2009 05:07:06 am Anatoliy wrote: > > > Try to remove id field from model description. Django handles it > > automatically. > > > On Apr 21, 3:48 pm, Vicky <vicky87....@gmail.com> wrote: > > > I have a table with an 'id' field (Primary Key). When I insert the > > > data using admin interface it is asking me for the value of the > > > primary key field. But I want it to be filled automatically. Is there > > > a way to do it? > > you can also have > > id = AutoField(primary_key=True) or id = IntegerField(primary_key=True) > > http://docs.djangoproject.com/en/dev/ref/models/instances/#auto-incre... > > http://docs.djangoproject.com/en/dev/ref/models/fields/#primary-key > > Mike > > -- > This is the first age that's paid much attention to the future, which is a > little ironic since we may not have one. > -- Arthur Clarke > > signature.asc > < 1KViewDownload --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---