Hello! I have a weird problem.
This is the model, really simple.
class Tags(models.Model):
tag_id = models.AutoField(primary_key=True)
name = models.CharField(max_length=100)
slug = models.SlugField(db_index=True,max_length=100,unique=True)
amount = models.IntegerField(editable=False,default=1)
objects = TagsManager()
def __unicode__(self):
return self.slug
When I'm trying to create a record in the db, the object id returned
is a long int:
>>> from notizie.models import Tags
>>> tag = Tags(name="try",slug="try")
>>> tag.save()
>>> tag.tag_id
2L
>>>
Why is that?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---