Hello,

These are my tables:

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,
    "first" varchar(20) NOT NULL,
    "initial" varchar(2) NOT NULL,
    "last" varchar(20) NOT NULL,
    "year_graduated" datetime NOT NULL,
    "school_id" integer NOT NULL REFERENCES "wkw_school" ("id")
)
;
COMMIT;

(I changed "Education" to "School" because in the admin panel it
showed up as "Educations". I think "Schools" makes more sense.)


I created the admin and I registered School and Lawyer.

In the admin panel School link works fine but when I click on Lawyer
link I get a "TemplateSyntaxError at /admin/wkw/lawyer/
Caught an exception while rendering: no such column:
wkw_lawyer.school_id"

But according to the above tables, school_id has been created.

I tried to add in the shell,

p = Lawyer(school_id=1)

but

p.save()

throws an error.

Any ideas why Lawyer link in the admin panel does not work?

This is the offending line on the debug page:

78                {% result_list cl %}

Thank you.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to