On Sunday, 20 May 2018 15:31:08 UTC+1, Salty beggar wrote: > > Hi, I'm trying to set up Templates for Django. I already have models and > views that function, and now I'm trying to figure out a way to get an > actual page to show for it. > > <snip> >
> The views return JSON-formatted information, as you can see. What I'm > trying to achieve in the template is implement templates that display > countries and their data in a table on the bottom of a page. The table > should only be visible after user requests this view with a country code, > and above the table I'm trying to have links to all the continents in the > database. > > Why does your view return JSON if you want to use templates? Your view should be rendering the template, passing it data as context. -- DR. -- 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 post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ebcbb40f-7753-4cae-9e27-30093cadb845%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

