django - I keep getting "InterfaceError: Error binding parameter 0 - probably unsupported type." -
i trying work way through official django tutorial (https://docs.djangoproject.com/en/1.5/intro/tutorial01/) i'm running problem when trying use shell.
specifically, when try run python manage.py shell
error "interfaceerror: error binding parameter 0 - unsupported type."
i don't know means, , code i've written example code given in tutorial:
from django.db import models class poll(models.model): question = models.charfield(max_length=200) pub_date = models.datetimefield('date published') def __unicode__self(): return self.question class choice(models.model): poll = models.foreignkey(poll) choice_text = models.charfield(max_length=200) votes = models.integerfield(default=0) def __unicode__(self): return choice_text
i encountered problem "sqlite received naive datetime while time zone support active." used answer post ignore warning , don't think that's what's causing interfaceerror.
i'm running django 1.5 python 2.7 on ubuntu 12.10 , using sqlite3. if has ideas what's going on i'd appreciate help.
i had same problem. make sure have valid time zone in mysite\settings.py file.
i followed link http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#datetime-timezone-set-table given on django tutorial. however, keywords don't work sqlite.
look time zones on http://en.wikipedia.org/wiki/list_of_tz_zones_by_name. me it's america/new_york.
Comments
Post a Comment