I use in my models.py
class Pedido(models.Model):
data_pedido = models.DateField('Data do pedido')
cliente = models.ForeignKey(Cliente)
but runserver and add date via admin
show this message.
I use sqlite3.
See my project in github
I use in my models.py
class Pedido(models.Model):
data_pedido = models.DateField('Data do pedido')
cliente = models.ForeignKey(Cliente)
but runserver and add date via admin
show this message.
I use sqlite3.
See my project in github
Your
__unicode__
methods need to return a Unicode string, not adatetime.date
object. So you should adapt the following to return Unicode:For example:
Or you can format the date using a formatting method.