On 1/1/07, Ramdas S <[EMAIL PROTECTED]> wrote:
class billnumber(models.Model):
    date = models.DateTimeField(auto_now_add=True, primary_key = True)
    def __str__(self):
        return self.id

You added the 'primary_key' attribute to your date field, therefore
your model will not have an 'id' field which you are trying to access
in __str__().

Remove the 'primary_key' attribute from the date field in your model,
or else, modify your __str__() method.

Regards,
Jorge

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to