Hi, I'm sorry about that. All the ManyToManyFields have this sorta thing:
LEM = models.ManyToManyField ( Person, related_name = 'LEM', filter_interface = models.HORIZONTAL, limit_choices_to = { 'role__pk': Role.objects.get(name = 'LEM').id}, ) This is the sqlall output for people: BEGIN; CREATE TABLE "people_person" ( "id" integer NOT NULL PRIMARY KEY, "first_name" varchar(100) NOT NULL, "last_name" varchar(100) NOT NULL, "user_id" integer NULL REFERENCES "auth_user" ("id") ); CREATE TABLE "people_role" ( "id" integer NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL UNIQUE ); CREATE TABLE "people_person_role" ( "id" integer NOT NULL PRIMARY KEY, "person_id" integer NOT NULL REFERENCES "people_person" ("id"), "role_id" integer NOT NULL REFERENCES "people_role" ("id"), UNIQUE ("person_id", "role_id") ); CREATE INDEX people_person_user_id ON "people_person" ("user_id"); COMMIT; And for services: BEGIN; CREATE TABLE "services_service" ( "id" integer NOT NULL PRIMARY KEY, "day" varchar(200) NOT NULL, "date" date NOT NULL, "time" time NOT NULL, "slug" varchar(50) NOT NULL, "priest_id" integer NOT NULL REFERENCES "people_person" ("id"), "celebrant_id" integer NOT NULL REFERENCES "people_person" ("id"), "crucifer_id" integer NOT NULL REFERENCES "people_person" ("id"), "left_torch_id" integer NOT NULL REFERENCES "people_person" ("id"), "right_torch_id" integer NOT NULL REFERENCES "people_person" ("id"), "banner_bearer_id" integer NOT NULL REFERENCES "people_person" ("id"), "sermon_id" integer NULL REFERENCES "sermons_sermon" ("id") ); CREATE TABLE "services_service_LEM" ( "id" integer NOT NULL PRIMARY KEY, "service_id" integer NOT NULL REFERENCES "services_service" ("id"), "person_id" integer NOT NULL REFERENCES "people_person" ("id"), UNIQUE ("service_id", "person_id") ); CREATE TABLE "services_service_lector" ( "id" integer NOT NULL PRIMARY KEY, "service_id" integer NOT NULL REFERENCES "services_service" ("id"), "person_id" integer NOT NULL REFERENCES "people_person" ("id"), UNIQUE ("service_id", "person_id") ); CREATE TABLE "services_service_usher" ( "id" integer NOT NULL PRIMARY KEY, "service_id" integer NOT NULL REFERENCES "services_service" ("id"), "person_id" integer NOT NULL REFERENCES "people_person" ("id"), UNIQUE ("service_id", "person_id") ); CREATE TABLE "services_service_greeter" ( "id" integer NOT NULL PRIMARY KEY, "service_id" integer NOT NULL REFERENCES "services_service" ("id"), "person_id" integer NOT NULL REFERENCES "people_person" ("id"), UNIQUE ("service_id", "person_id") ); CREATE TABLE "services_service_childrens_chapel" ( "id" integer NOT NULL PRIMARY KEY, "service_id" integer NOT NULL REFERENCES "services_service" ("id"), "person_id" integer NOT NULL REFERENCES "people_person" ("id"), UNIQUE ("service_id", "person_id") ); CREATE TABLE "services_service_altar_flowers" ( "id" integer NOT NULL PRIMARY KEY, "service_id" integer NOT NULL REFERENCES "services_service" ("id"), "person_id" integer NOT NULL REFERENCES "people_person" ("id"), UNIQUE ("service_id", "person_id") ); CREATE TABLE "services_service_flower_delivery" ( "id" integer NOT NULL PRIMARY KEY, "service_id" integer NOT NULL REFERENCES "services_service" ("id"), "person_id" integer NOT NULL REFERENCES "people_person" ("id"), UNIQUE ("service_id", "person_id") ); CREATE TABLE "services_service_altar_guild" ( "id" integer NOT NULL PRIMARY KEY, "service_id" integer NOT NULL REFERENCES "services_service" ("id"), "person_id" integer NOT NULL REFERENCES "people_person" ("id"), UNIQUE ("service_id", "person_id") ); CREATE TABLE "services_service_food_delivery" ( "id" integer NOT NULL PRIMARY KEY, "service_id" integer NOT NULL REFERENCES "services_service" ("id"), "person_id" integer NOT NULL REFERENCES "people_person" ("id"), UNIQUE ("service_id", "person_id") ); CREATE TABLE "services_service_summer_punch" ( "id" integer NOT NULL PRIMARY KEY, "service_id" integer NOT NULL REFERENCES "services_service" ("id"), "person_id" integer NOT NULL REFERENCES "people_person" ("id"), UNIQUE ("service_id", "person_id") ); CREATE INDEX services_service_slug ON "services_service" ("slug"); CREATE INDEX services_service_priest_id ON "services_service" ("priest_id"); CREATE INDEX services_service_celebrant_id ON "services_service" ("celebrant_id"); CREATE INDEX services_service_crucifer_id ON "services_service" ("crucifer_id"); CREATE INDEX services_service_left_torch_id ON "services_service" ("left_torch_id"); CREATE INDEX services_service_right_torch_id ON "services_service" ("right_torch_id"); CREATE INDEX services_service_banner_bearer_id ON "services_service" ("banner_bearer_id"); CREATE INDEX services_service_sermon_id ON "services_service" ("sermon_id"); COMMIT; Thanks! Seemant --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---