On Thursday, October 16, 2014 2:28:38 PM UTC-7, Collin Anderson wrote: > > Hi Bovine, > > Your pub_date field needs a value. Maybe try this: > > from django.utils import timezone > > class MyModel(models.Model): > pub_date = models.DateField(default=timezone.now) > > Collin > > Thanks Collin but does this belong in my models.py, views.py or forms.py? I already had the following in my models.py:
from django.db import models from django.utils import timezone class Hardwareid(models.Model): hardwareid_text = models.CharField(max_length=200) pub_date = models.DateTimeField('date added') def __unicode__(self): return self.hardwareid_text -- 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 django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0a9f105f-7186-49a3-9de1-04f8f2cbd368%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.