Its done now.. thank u everybody Now i want to do that it will show only the latest book with detail of a author
On Wed, 4 Sep, 2019, 6:07 PM Amit Samanta, <[email protected]> wrote: > i get all thank you for your help.. > the actuall funda is > i have to show author name with related to that i have to show books name > of the same author now the detail related to the books > this is wht i need > :-( > > On Wed, 4 Sep, 2019, 6:01 PM Devdutt Bhati, <[email protected]> > wrote: > >> if you created table in models.py. you can import table at view file >> like : from appname .models import table/class name . >> when you got the table data at views file then use it as >> *variable=Tablename.objects.all()* now get all values in variable. it >> can render in render function and use values at html page. >> use for loop. >> >> On Wed, Sep 4, 2019 at 12:58 AM Amit Samanta <[email protected]> >> wrote: >> >>> I want try is... >>> there will be a dashboard >>> >>> which will show >>> >>> Author name >>> >>> all the books which the author written >>> >>> details of the book published date , avout the book in the above format >>> >>> >>> On Wed, 4 Sep, 2019, 12:08 PM Anirudh Jain, <[email protected]> >>> wrote: >>> >>>> Could you please elaborate/be more clear about what you are really >>>> trying to do ? >>>> >>>> On Wed, 4 Sep 2019, 10:26 Bhoopesh sisoudiya, <[email protected]> >>>> wrote: >>>> >>>>> Hi Amit, >>>>> >>>>> You can use >>>>> =================≠===================== >>>>> Book.objects.select_related(FK).select_related(FK). values (select >>>>> column name which you want).all() >>>>> >>>>> >>>>> Thanks >>>>> Bhoopesh sisoudiya >>>>> >>>>> On Wed, Sep 4, 2019, 9:38 AM Amit Samanta <[email protected]> >>>>> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> I need help i am not understanding the keywords of joining and fetch >>>>>> value in veiw.py >>>>>> i have three tables in model.py >>>>>> >>>>>> Table 1(Author) : >>>>>> >>>>>> Table 2(books): >>>>>> >>>>>> Table 3 (details): >>>>>> FK of table1 >>>>>> FK of table2 >>>>>> >>>>>> Fk = foreign key >>>>>> >>>>>> I have to just show >>>>>> >>>>>> Author (author name) Books (dynamic) Books(author 2nd book) >>>>>> ... >>>>>> details(dynamic) >>>>>> details(dtl of author 2nd book) ... >>>>>> >>>>>> I have created the template >>>>>> >>>>>> now in views.py i an confused >>>>>> >>>>>> book=books.object(i do not get what to do) >>>>>> Author= (same ) >>>>>> details = (same) >>>>>> >>>>>> Please can anybody help that will be very greatfull. >>>>>> Thank you in advance >>>>>> >>>>>> >>>>>> >>>>>> Thanks and Regards >>>>>> Amit Samanta >>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "Django users" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to [email protected]. >>>>>> To view this discussion on the web visit >>>>>> https://groups.google.com/d/msgid/django-users/54483cc3-eadd-4559-8c61-c179cfbab933%40googlegroups.com >>>>>> <https://groups.google.com/d/msgid/django-users/54483cc3-eadd-4559-8c61-c179cfbab933%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Django users" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to [email protected]. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/django-users/CAAk3c1OzGXKSQg8GK1C8_5Ck-iQ%2B1WjsYMdD%2B%2B0_q3inb94jyw%40mail.gmail.com >>>>> <https://groups.google.com/d/msgid/django-users/CAAk3c1OzGXKSQg8GK1C8_5Ck-iQ%2B1WjsYMdD%2B%2B0_q3inb94jyw%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Django users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/django-users/CAC3mK7faT1yOHZXdHXc0DyeDYRtTpD_Pke39AJYmXRQW%2BOi09Q%40mail.gmail.com >>>> <https://groups.google.com/d/msgid/django-users/CAC3mK7faT1yOHZXdHXc0DyeDYRtTpD_Pke39AJYmXRQW%2BOi09Q%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Django users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/django-users/CAP4hbAbWFvE0CRoeX45psThD7yWbKHR16aJXH866-dCFdHSfZw%40mail.gmail.com >>> <https://groups.google.com/d/msgid/django-users/CAP4hbAbWFvE0CRoeX45psThD7yWbKHR16aJXH866-dCFdHSfZw%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/CAP1z-%3DLZqkq38wgz7w%2Bv%2BuzWcWkJsx1xUr-kdkpOGTKgBuwOQA%40mail.gmail.com >> <https://groups.google.com/d/msgid/django-users/CAP1z-%3DLZqkq38wgz7w%2Bv%2BuzWcWkJsx1xUr-kdkpOGTKgBuwOQA%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAP4hbAab9UsczyPeMU%2BhxbJo6sxwUSbykvkU1tV_TJEDfE-dgQ%40mail.gmail.com.

