Re: Template Data

2016-11-18 Thread Vijay Khemlani
Test the "contact.contactnumber_set.all" in a shell, I'm not sure 100% sure on the syntax On Fri, Nov 18, 2016 at 11:51 AM, 'David Turner' via Django users < django-users@googlegroups.com> wrote: > Thankyou for this, although for some reason it does not work. > What other infromation would you ne

Re: Template Data

2016-11-18 Thread 'David Turner' via Django users
Thankyou for this, although for some reason it does not work. What other infromation would you need to further advise me. Thanks On 18 November 2016 at 13:42, Vijay Khemlani wrote: > In your model a contact may have multiple phone numbers (multiple > Contactnumber instances with foreign key to t

Re: Template Data

2016-11-18 Thread Vijay Khemlani
In your model a contact may have multiple phone numbers (multiple Contactnumber instances with foreign key to the same Contact instance) so your question is a bit vague. If you wanted to list all numbers for a given contact you could do somethinkg like {% for contact in practice.contacts.all %}