Sfoglia il codice sorgente

added auto_now_add for product.Item

master
Jonathan Moss 15 anni fa
parent
commit
e2bc21bcee
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1
    1
      oscar/product/models.py

+ 1
- 1
oscar/product/models.py Vedi File

37
     partner_id = models.CharField(max_length = 32)
37
     partner_id = models.CharField(max_length = 32)
38
     type = models.ForeignKey('product.Type')
38
     type = models.ForeignKey('product.Type')
39
     date_available = models.DateField()
39
     date_available = models.DateField()
40
-    date_created = models.DateTimeField()
40
+    date_created = models.DateTimeField(auto_now_add=True)
41
 
41
 
42
     def __unicode__(self):
42
     def __unicode__(self):
43
         return self.name
43
         return self.name

Loading…
Annulla
Salva