[django: 1.1 beta 1 SVN-10407, python 2.5.2, ubuntu]
My first django toy app. I've been working through the tutorial
http://docs.djangoproject.com/en/dev/intro/tutorial02/.
I've already done a few cycles of (change-model, ./manage.py syncdb)
with success.
I just added email and birthday fields to my Person model:
class Person(models.Model):
name = models.CharField(max_length=200)
def formalname(self):
return 'Mr(Ms) ' + self.name
phone = models.CharField(max_length=13)
address = models.ForeignKey(Address)
email = models.EmailField()
birthday = models.DateField()
def __unicode__(self):
return self.name
I killed the server process(maybe not necessary). I did ./manage.py
syncdb .
Now "./manage.py sql phones" reports:
CREATE TABLE "phones_person" (
"id" integer NOT NULL PRIMARY KEY,
"name" varchar(200) NOT NULL,
"phone" varchar(13) NOT NULL,
"address_id" integer NOT NULL REFERENCES "phones_address" ("id"),
"email" varchar(75) NOT NULL,
"birthday" date NOT NULL
)
but dbshell shows:
CREATE TABLE "phones_person" (
"id" integer NOT NULL PRIMARY KEY,
"name" varchar(200) NOT NULL,
"phone" varchar(13) NOT NULL,
"address_id" integer NOT NULL REFERENCES "phones_address" ("id")
);
I restart the server and http://127.0.0.1:8000/admin/phones/person/
gets me "Exception Value:
no such column: phones_person.email".
Why is my change not making it into the DB? I even did "./manage.py
flush" and it still fails on the email field.
-- George
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---