Hello Soumen, you should use a CharField with the primary_key=True 
attribute for your model. This way no no automatic primary key field is 
generated, your field will be implicitly unique and non-null though. Only 
one primary key is allowed in a model.

class Foo(models.Model)
    id = models.CharField(max_length=15, primary_key=True)

Regards,
Oleg

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ab8fa10c-dcc4-4b53-ad6c-be04d59affe3n%40googlegroups.com.

Reply via email to