On Mar 28, 8:40 pm, Asim Yuksel <a.sinanyuk...@gmail.com> wrote: > I have two questions. > 1)I have two tables(People, Publication) and they are not related and > I want to display the fields of these tables on the same admin page. > So when I fill all the fields, I want to insert these values into > people and publication tables.
I do not fully understand your question, but if you would like to Iterate (loop over) 2 values in your template at the same time, you can use the zip command like blow In your views.py peo = People.objects.all() pub=Publications.objects.all() render_to_response(template.html, {'tables':zip(peo,pub)}) in your template (template.html) {% for pe, pu in tables %} {{pe.field1}} {{pu.field1}} {% endfor %} I am assuming that for each record in people, there is a matching one in publications > 2) I also want to insert the id values of people and publication to a > bridge table(lets say PeoplePublication) whenever I do the first step. > > I guess I cant do the 1st one with inlines. How can I do this? Why not use a ForeignKey? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.