And again for your explanations. So I have changed my models as you advise. Also I've made a form from c12b model, and when it displays - I see all peoples from table with people. But I still can't fetch any results .... Maybe by queryset isn't good. manage.py sql <myapp> return this: people table: CREATE TABLE "Dolgnost" ( "A22" varchar(8) NOT NULL PRIMARY KEY, "U1" varchar(250) NOT NULL, "U2" varchar(50) NOT NULL, "U3" varchar(50) NOT NULL, "U4" varchar(2) NOT NULL ) ;
corp table CREATE TABLE "C12B" ( "A1" varchar(250) NOT NULL, "A2" varchar(50) NOT NULL, .... "A22" varchar(8) NOT NULL PRIMARY KEY, "A40" varchar(3) NOT NULL, .... #It seems it is a relation table by django CREATE TABLE "C12B_boss" ( "id" serial NOT NULL PRIMARY KEY, "c12b_id" varchar(8) NOT NULL REFERENCES "C12B" ("A22") DEFERRABLE INITIALLY DEFERRED, "dolgnost_id" varchar(8) NOT NULL REFERENCES "Dolgnost" ("A22") DEFERRABLE INITIALLY DEFERRED, UNIQUE ("c12b_id", "dolgnost_id") ) ; in models in Dolgnost model A22 = models.CharField ('Код ОКПО', max_length=8, blank=True, unique=False, primary_key=True) in c12b model A22 = models.CharField ('Код ОКПО', max_length=8, blank=True, primary_key=True) boss = models.ManyToManyField (Dolgnost) And I still get Caught an exception while rendering:relation "C12B_boss" doesn't exist Still can't realize what I need to do. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---