Ok, thanks. I started over and created a new project sw1 and module wkw1, and now it all works. But now I noticed that, the "initial" field in "Lawyer" is required. But I want it to be optional. Do I need to start over again to make that change :(
And also in the "Year Graduated" field I just need the year, so I need to remove, day, month, and time. How do I make these changes? There must be a way without starting over and creating a new project. Thanks. On Nov 10, 8:06 am, Daniel Roseman <dan...@roseman.org.uk> wrote: > On Nov 10, 12:57 pm, Zeynel <azeyn...@gmail.com> wrote: > > > > > > > Hi Tim, > > > Yes, I syncdb several times. > > > C:\sw\sw>manage.py syncdb > > > C:\sw\sw>manage.py sql wkw > > > BEGIN; > > CREATE TABLE "wkw_school" ( > > "id" integer NOT NULL PRIMARY KEY, > > "school" varchar(200) NOT NULL > > ) > > ; > > CREATE TABLE "wkw_lawyer" ( > > "id" integer NOT NULL PRIMARY KEY, > > "school_id" integer NOT NULL REFERENCES "wkw_school" ("id"), > > "first" varchar(20) NOT NULL, > > "initial" varchar(2) NOT NULL, > > "last" varchar(20) NOT NULL, > > "year_graduated" datetime NOT NULL > > ) > > ; > > COMMIT; > > > C:\sw\sw> > > > On Nov 10, 5:27 am, Tim Chase <django.us...@tim.thechases.com> wrote: > > > > > (I changed "Education" to "School" because in the admin panel it > > > > showed up as "Educations". I think "Schools" makes more sense.) > > > > Did you remember to syncdb afterwards? I'd be interested to see > > > if the SQL you showed is what the tables in the DB actually look > > > like. > > > > > Any ideas why Lawyer link in the admin panel does not work? > > > > It's on retainer? Hahahaha...sorry...a little 4:30am lawyer humor :) > > > > -tim > > syncdb does not change existing table definitions. And sql will just > show what the sql should be, not what it actually is. If you're not > using a migrations system such as South, your best bet is to drop your > tables and start again. > -- > DR. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---