Monday, 2 September 2013

Another Django newbie

Another Django newbie

Need your help,especially in sqlite3: started django book and on the first
step i'm stuck. I have noticed that when creating an argument
class Poll(models.Model):
question = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
in models.py the output must be like this
BEGIN;
CREATE TABLE "polls_poll" (
"id" serial NOT NULL PRIMARY KEY,
"question" varchar(200) NOT NULL,
"pub_date" timestamp with time zone NOT NULL
);
instead i'm getting
BEGIN;
CREATE TABLE "polls_poll" (
"id" integer NOT NULL PRIMARY KEY,
"question" varchar(200) NOT NULL,
"pub_date" datetime NOT NULL
);
;
Don't understand what i'm doing wrong. Tried to recreate a db but result
stays the same

No comments:

Post a Comment