{"id":1714,"date":"2026-09-21T05:19:06","date_gmt":"2026-09-21T05:19:06","guid":{"rendered":"https:\/\/nayananimsara.online\/?p=1714"},"modified":"2026-09-22T07:06:03","modified_gmt":"2026-09-22T07:06:03","slug":"django-dynamic-urls-and-templates-tutorial","status":"publish","type":"post","link":"https:\/\/nayananimsara.online\/django-dynamic-urls-and-templates-tutorial\/","title":{"rendered":"Django Views and URLs Part 2: Dynamic URLs and Templates Made Simple"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Django dynamic URLs and templates tutorial In Part 1, I got a plain &#8220;Hello, world&#8221; message showing up on my homepage, and honestly, that felt like a big enough win at the time. But real websites don&#8217;t just show static text \u2014 they show HTML pages, and they show different content depending on which specific item you&#8217;re looking at, like <code>\/post\/3\/<\/code> versus <code>\/post\/7\/<\/code>. That&#8217;s what we&#8217;re building today.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you haven&#8217;t gone through Part 1 yet, I&#8217;d start there first \u2014 this post assumes you already have a working <code>home<\/code> view and a connected <code>urls.py<\/code>.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#from-plain-text-to-real-html\">From Plain Text to Real HTML (Django dynamic URLs and templates tutorial)<\/a><\/li><li><a href=\"#passing-data-into-a-template\">Passing Data Into a Template<\/a><\/li><li><a href=\"#now-dynamic-ur-ls\">Now, Dynamic URLs<\/a><\/li><li><a href=\"#writing-the-view-that-handles-it\">Writing the View That Handles It<\/a><\/li><li><a href=\"#connecting-it-to-real-data\">Connecting It to Real Data<\/a><\/li><li><a href=\"#putting-the-full-flow-together\">Putting the Full Flow Together<\/a><\/li><li><a href=\"#a-small-habit-worth-building-now\">A Small Habit Worth Building Now<\/a><\/li><li><a href=\"#common-mistakes-at-this-stage\">Common Mistakes at This Stage<\/a><\/li><li><a href=\"#where-to-go-from-here\">Where to Go From Here<\/a><\/li><li><a href=\"#final-thoughts\">Final Thoughts<\/a><\/li><li><a href=\"#plain-text-\u0d91\u0d9a\u0dd9\u0db1\u0dca-real-html-\u0d91\u0d9a\u0da7\">Plain Text \u0d91\u0d9a\u0dd9\u0db1\u0dca Real HTML \u0d91\u0d9a\u0da7<\/a><\/li><li><a href=\"#template-\u0d91\u0d9a\u0d9a\u0da7-data-pass-\u0d9a\u0dd2\u0dbb\u0dd3\u0db8\">Template \u0d91\u0d9a\u0d9a\u0da7 Data Pass \u0d9a\u0dd2\u0dbb\u0dd3\u0db8<\/a><\/li><li><a href=\"#\u0daf\u0dd0\u0db1\u0dca-dynamic-ur-ls\">\u0daf\u0dd0\u0db1\u0dca Dynamic URLs<\/a><\/li><li><a href=\"#\u0d92\u0d9a-handle-\u0d9a\u0dbb\u0db1-view-\u0d91\u0d9a-\u0dbd\u0dd2\u0dba\u0db1-\u0d91\u0d9a\">\u0d92\u0d9a Handle \u0d9a\u0dbb\u0db1 View \u0d91\u0d9a \u0dbd\u0dd2\u0dba\u0db1 \u0d91\u0d9a<\/a><\/li><li><a href=\"#real-data-\u0d91\u0d9a\u0da7-connect-\u0d9a\u0dd2\u0dbb\u0dd3\u0db8\">Real Data \u0d91\u0d9a\u0da7 Connect \u0d9a\u0dd2\u0dbb\u0dd3\u0db8<\/a><\/li><li><a href=\"#full-flow-\u0d91\u0d9a-\u0d91\u0d9a\u0da7-\u0d91\u0d9a\u0dad\u0dd4-\u0d9a\u0dd2\u0dbb\u0dd3\u0db8\">Full Flow \u0d91\u0d9a \u0d91\u0d9a\u0da7 \u0d91\u0d9a\u0dad\u0dd4 \u0d9a\u0dd2\u0dbb\u0dd3\u0db8<\/a><\/li><li><a href=\"#\u0daf\u0dd0\u0db1\u0dca-\u0dc4\u0daf\u0dcf\u0d9c\u0db1\u0dca\u0db1-\u0dc0\u0da7\u0dd2\u0db1-small-habit-\u0d91\u0d9a\u0d9a\u0dca\">\u0daf\u0dd0\u0db1\u0dca \u0dc4\u0daf\u0dcf\u0d9c\u0db1\u0dca\u0db1 \u0dc0\u0da7\u0dd2\u0db1 Small Habit \u0d91\u0d9a\u0d9a\u0dca<\/a><\/li><li><a href=\"#\u0db8\u0dda-stage-\u0d91\u0d9a\u0dda\u0daf\u0dd3-common-mistakes\">\u0db8\u0dda Stage \u0d91\u0d9a\u0dda\u0daf\u0dd3 Common Mistakes<\/a><\/li><li><a href=\"#\u0db8\u0dd9\u0dad\u0db1\u0dd2\u0db1\u0dca-\u0d89\u0daf\u0dd2\u0dbb\u0dd2\u0dba\u0da7\">\u0db8\u0dd9\u0dad\u0db1\u0dd2\u0db1\u0dca \u0d89\u0daf\u0dd2\u0dbb\u0dd2\u0dba\u0da7<\/a><\/li><li><a href=\"#\u0d85\u0dc0\u0dc3\u0dcf\u0db1\">\u0d85\u0dc0\u0dc3\u0dcf\u0db1 <\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 id=\"from-plain-text-to-real-html\" class=\"wp-block-heading\">From Plain Text to Real HTML (Django dynamic URLs and templates tutorial)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">So far, our views have returned plain text using <code>HttpResponse<\/code>. That works for testing, but it&#8217;s not how real pages are built. Instead, Django uses <code>render()<\/code> to combine a view with an HTML template.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First, create a folder structure inside your app:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pages\/\n    templates\/\n        pages\/\n            home.html<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Yes, the nested <code>pages<\/code> folder inside <code>templates<\/code> looks repetitive, but it prevents naming conflicts once you have multiple apps with templates of the same name.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Inside <code>home.html<\/code>, add some basic HTML:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">html<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n    &lt;title&gt;My First Django Page&lt;\/title&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n    &lt;h1&gt;Welcome to my site!&lt;\/h1&gt;\n    &lt;p&gt;This page is rendered from a real HTML template.&lt;\/p&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now update your view in <code>views.py<\/code>:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">python<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from django.shortcuts import render\n\ndef home(request):\n    return render(request, 'pages\/home.html')<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Refresh your browser, and instead of plain text, you&#8217;ll see a properly styled HTML page. This one change opens the door to everything \u2014 CSS, images, dynamic content, all of it.<\/p>\n\n\n\n<h2 id=\"passing-data-into-a-template\" class=\"wp-block-heading\">Passing Data Into a Template<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A template becomes genuinely useful once it can display data from your view. Update your view like this:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">python<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def home(request):\n    context = {\n        'name': 'Nima Academy',\n        'post_count': 12,\n    }\n    return render(request, 'pages\/home.html', context)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then inside <code>home.html<\/code>, use Django&#8217;s template syntax to display those values:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">html<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;h1&gt;Welcome to {{ name }}!&lt;\/h1&gt;\n&lt;p&gt;We currently have {{ post_count }} posts.&lt;\/p&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The double curly braces are how Django templates pull in Python values. I remember this being the moment templates finally felt powerful to me \u2014 the same HTML file can show completely different content depending on what the view sends it.<\/p>\n\n\n\n<h2 id=\"now-dynamic-ur-ls\" class=\"wp-block-heading\">Now, Dynamic URLs<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Here&#8217;s the part I was most excited to learn. Instead of a fixed page like <code>\/about\/<\/code>, you can build a URL that changes based on what&#8217;s requested, like <code>\/post\/1\/<\/code>, <code>\/post\/2\/<\/code>, and so on, all handled by one single view.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Update your <code>urls.py<\/code> to accept a number:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">python<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from django.urls import path\nfrom . import views\n\nurlpatterns = &#91;\n    path('', views.home, name='home'),\n    path('post\/&lt;int:post_id&gt;\/', views.post_detail, name='post_detail'),\n]<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">That <code>&lt;int:post_id&gt;<\/code> part tells Django to capture whatever number appears in that position of the URL and pass it into the view as an argument.<\/p>\n\n\n\n<h2 id=\"writing-the-view-that-handles-it\" class=\"wp-block-heading\">Writing the View That Handles It<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now in <code>views.py<\/code>, write a view that accepts that captured value:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">python<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def post_detail(request, post_id):\n    return HttpResponse(f\"You're viewing post number {post_id}.\")<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Visit <code>\/post\/5\/<\/code> in your browser, and you&#8217;ll see &#8220;You&#8217;re viewing post number 5.&#8221; Change the number in the URL, and the page updates automatically. One view, unlimited pages \u2014 that&#8217;s the part that made dynamic URLs click for me.<\/p>\n\n\n\n<h2 id=\"connecting-it-to-real-data\" class=\"wp-block-heading\">Connecting It to Real Data<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This becomes genuinely useful once you connect it to your models, something I covered in my earlier post on the Django app structure. Here&#8217;s what a more realistic version looks like:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">python<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from django.shortcuts import render, get_object_or_404\nfrom .models import Post\n\ndef post_detail(request, post_id):\n    post = get_object_or_404(Post, id=post_id)\n    return render(request, 'pages\/post_detail.html', {'post': post})<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>get_object_or_404<\/code> fetches the matching database record, or automatically shows a proper &#8220;not found&#8221; page if it doesn&#8217;t exist. That single function saved me from writing a lot of repetitive error handling myself.<\/p>\n\n\n\n<h2 id=\"putting-the-full-flow-together\" class=\"wp-block-heading\">Putting the Full Flow Together<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Here&#8217;s the complete chain now: a visitor requests <code>\/post\/5\/<\/code>, <code>urls.py<\/code> captures <code>5<\/code> as <code>post_id<\/code>, the view fetches that specific post from the database, and <code>render()<\/code> combines it with an HTML template to produce the final page. This is genuinely how most content-driven pages on real Django sites work \u2014 blogs, product pages, user profiles, all following this exact pattern.<\/p>\n\n\n\n<h2 id=\"a-small-habit-worth-building-now\" class=\"wp-block-heading\">A Small Habit Worth Building Now<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As your templates grow, avoid repeating the same HTML \u2014 like your header and footer \u2014 on every page. Django supports template inheritance using a base template, which I&#8217;ll cover properly in a future post. For now, just know it exists so your <code>home.html<\/code> and <code>post_detail.html<\/code> files don&#8217;t end up with duplicated code.<\/p>\n\n\n\n<h2 id=\"common-mistakes-at-this-stage\" class=\"wp-block-heading\">Common Mistakes at This Stage<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Forgetting the <code>templates\/appname\/<\/code> nested folder structure, which causes a &#8220;template not found&#8221; error<\/li>\n\n\n\n<li>Mismatching the variable name between the view&#8217;s context dictionary and the template<\/li>\n\n\n\n<li>Using <code>&lt;int:post_id><\/code> in <code>urls.py<\/code> but naming the function parameter something different in <code>views.py<\/code><\/li>\n\n\n\n<li>Passing a value into the template but forgetting the double curly braces to display it<\/li>\n<\/ul>\n\n\n\n<h2 id=\"where-to-go-from-here\" class=\"wp-block-heading\">Where to Go From Here<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If this felt like a lot at once, that&#8217;s normal \u2014 dynamic URLs and templates were the point where Django started feeling like real web development to me, rather than just following steps. For deeper reference, the <a href=\"https:\/\/docs.djangoproject.com\/en\/stable\/topics\/templates\/\" target=\"_blank\" rel=\"noopener\">official Django documentation on templates<\/a> covers everything beyond what I touched on here.<\/p>\n\n\n\n<h2 id=\"final-thoughts\" class=\"wp-block-heading\">Final Thoughts<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You went from a single static page to a system that can display unlimited pieces of content through one view, driven entirely by the URL. That&#8217;s a genuinely big jump from Part 1. Try adding a second dynamic URL on your own \u2014 maybe <code>\/category\/&lt;str:name&gt;\/<\/code> \u2014 before moving on. It&#8217;s the fastest way to make this pattern stick.<\/p>\n\n\n\n<h1 id=\"django-views-ur-ls-part-2-dynamic-ur-ls-\u0dc3\u0dc4-templates-\u0dc3\u0dd2\u0d82\u0dc4\u0dbd\u0dd9\u0db1\u0dca\" class=\"wp-block-heading\">Django Views URLs Part 2 &#8211; Dynamic URLs \u0dc3\u0dc4 Templates \u0dc3\u0dd2\u0d82\u0dc4\u0dbd\u0dd9\u0db1\u0dca<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Part 1 \u0d91\u0d9a\u0dda\u0daf\u0dd3 \u0db8\u0db8 &#8220;Hello, world&#8221; message \u0d91\u0d9a\u0d9a\u0dca plain text \u0dc0\u0dd2\u0daf\u0dd2\u0dc4\u0da7 homepage \u0d91\u0d9a\u0dda \u0db4\u0dda\u0db1\u0dca\u0db1 \u0dc4\u0dd0\u0daf\u0dd4\u0dc0\u0dcf, \u0d87\u0dad\u0dca\u0dad\u0da7\u0db8 \u0d92 \u0dc0\u0dd9\u0dbd\u0dcf\u0dc0\u0dda \u0d92\u0d9a big win \u0d91\u0d9a\u0d9a\u0dca \u0dc0\u0d9c\u0dda feel \u0dc0\u0dd4\u0dab\u0dcf. \u0d92\u0dad\u0dca real websites plain text \u0dc0\u0dd2\u0dad\u0dbb\u0d9a\u0dca \u0db4\u0dd9\u0db1\u0dca\u0db1\u0db1\u0dca\u0db1\u0dda \u0db1\u0dd1 &#8211; \u0d92\u0dc0\u0dcf HTML pages \u0db4\u0dd9\u0db1\u0dca\u0db1\u0db1\u0dc0\u0dcf, \u0d94\u0dba\u0dcf \u0db6\u0dbd\u0db1 specific item \u0d91\u0d9a \u0d85\u0db1\u0dd4\u0dc0 different content \u0db4\u0dd9\u0db1\u0dca\u0db1\u0db1\u0dc0\u0dcf, <code>\/post\/3\/<\/code> \u0dc3\u0dc4 <code>\/post\/7\/<\/code> \u0dc0\u0d9c\u0dda. \u0d85\u0daf \u0d85\u0db4\u0dd2 \u0dc4\u0daf\u0db1\u0dca\u0db1\u0dda \u0d92\u0d9a\u0dba\u0dd2.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0d94\u0dba\u0dcf Part 1 \u0d9a\u0dd2\u0dba\u0dc0\u0dbd\u0dcf \u0db1\u0dd0\u0dad\u0dca\u0db1\u0db8\u0dca, \u0db8\u0dd4\u0dbd\u0dd2\u0db1\u0dca\u0db8 \u0d92\u0d9a\u0dd9\u0db1\u0dca start \u0d9a\u0dbb\u0db1\u0dca\u0db1 &#8211; \u0db8\u0dda post \u0d91\u0d9a\u0dd9\u0db1\u0dca assume \u0d9a\u0dbb\u0db1\u0dca\u0db1\u0dda \u0d94\u0dba\u0dcf\u0da7 already working <code>home<\/code> view \u0d91\u0d9a\u0d9a\u0dca \u0dc3\u0dc4 connect \u0d9a\u0dbb\u0db4\u0dd4 <code>urls.py<\/code> \u0d91\u0d9a\u0d9a\u0dca \u0dad\u0dd2\u0dba\u0dd9\u0db1\u0dc0\u0dcf \u0d9a\u0dd2\u0dba\u0dbd\u0dcf.<\/p>\n\n\n\n<h2 id=\"plain-text-\u0d91\u0d9a\u0dd9\u0db1\u0dca-real-html-\u0d91\u0d9a\u0da7\" class=\"wp-block-heading\">Plain Text \u0d91\u0d9a\u0dd9\u0db1\u0dca Real HTML \u0d91\u0d9a\u0da7<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0db8\u0dda \u0dc0\u0dd9\u0db1\u0d9a\u0db8\u0dca \u0d85\u0db4\u0dda views <code>HttpResponse<\/code> use \u0d9a\u0dbb\u0dbd\u0dcf plain text return \u0d9a\u0dc5\u0dcf. Testing \u0d91\u0d9a\u0da7 \u0d92\u0d9a \u0dc0\u0dd0\u0da9 \u0d9a\u0dbb\u0db1\u0dc0\u0dcf, \u0d92\u0dad\u0dca real pages \u0dc4\u0daf\u0db1\u0dca\u0db1\u0dda \u0d92 \u0dc0\u0dd2\u0daf\u0dd2\u0dc4\u0da7 \u0db1\u0dd9\u0dc0\u0dd9\u0dba\u0dd2. \u0d92 \u0dc0\u0dd9\u0db1\u0dd4\u0dc0\u0da7, Django <code>render()<\/code> use \u0d9a\u0dbb\u0dbd\u0dcf view \u0d91\u0d9a\u0d9a\u0dca HTML template \u0d91\u0d9a\u0d9a\u0dca \u0d91\u0d9a\u0dca\u0d9a combine \u0d9a\u0dbb\u0db1\u0dc0\u0dcf.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0db8\u0dd4\u0dbd\u0dd2\u0db1\u0dca\u0db8, \u0d94\u0dba\u0dcf\u0d9c\u0dda app \u0d91\u0d9a \u0d87\u0dad\u0dd4\u0dc5\u0dda folder structure \u0d91\u0d9a\u0d9a\u0dca create \u0d9a\u0dbb\u0db1\u0dca\u0db1:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pages\/\n    templates\/\n        pages\/\n            home.html<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0d94\u0dc0\u0dca, <code>templates<\/code> \u0d87\u0dad\u0dd4\u0dc5\u0dda nested <code>pages<\/code> folder \u0d91\u0d9a repetitive \u0dc0\u0d9c\u0dda \u0db4\u0dda\u0db1\u0dc0\u0dcf, \u0d92\u0dad\u0dca \u0d94\u0dba\u0dcf\u0da7 same name \u0d91\u0d9a\u0dda templates \u0dad\u0dd2\u0dba\u0dd9\u0db1 apps \u0d9c\u0ddc\u0da9\u0d9a\u0dca \u0d86\u0dc0\u0db8, \u0d92\u0d9a naming conflicts \u0dc0\u0dc5\u0d9a\u0dca\u0dc0\u0db1\u0dc0\u0dcf.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>home.html<\/code> \u0d87\u0dad\u0dd4\u0dc5\u0dda, basic HTML \u0da7\u0dd2\u0d9a\u0d9a\u0dca add \u0d9a\u0dbb\u0db1\u0dca\u0db1:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">html<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n    &lt;title&gt;My First Django Page&lt;\/title&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n    &lt;h1&gt;Welcome to my site!&lt;\/h1&gt;\n    &lt;p&gt;This page is rendered from a real HTML template.&lt;\/p&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0daf\u0dd0\u0db1\u0dca <code>views.py<\/code> \u0dc0\u0dbd \u0d94\u0dba\u0dcf\u0d9c\u0dda view \u0d91\u0d9a update \u0d9a\u0dbb\u0db1\u0dca\u0db1:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">python<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from django.shortcuts import render\n\ndef home(request):\n    return render(request, 'pages\/home.html')<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Browser \u0d91\u0d9a refresh \u0d9a\u0dbb\u0db1\u0dca\u0db1, plain text \u0dc0\u0dd9\u0db1\u0dd4\u0dc0\u0da7, \u0daf\u0dd0\u0db1\u0dca \u0d94\u0dba\u0dcf\u0da7 properly styled HTML page \u0d91\u0d9a\u0d9a\u0dca \u0db4\u0dda\u0db1\u0dc0\u0dcf. \u0db8\u0dda \u0d91\u0d9a change \u0d91\u0d9a\u0dd9\u0db1\u0dca CSS, images, dynamic content \u0d94\u0d9a\u0dca\u0d9a\u0ddc\u0da7\u0db8 door \u0d91\u0d9a open \u0dc0\u0dd9\u0db1\u0dc0\u0dcf.<\/p>\n\n\n\n<h2 id=\"template-\u0d91\u0d9a\u0d9a\u0da7-data-pass-\u0d9a\u0dd2\u0dbb\u0dd3\u0db8\" class=\"wp-block-heading\">Template \u0d91\u0d9a\u0d9a\u0da7 Data Pass \u0d9a\u0dd2\u0dbb\u0dd3\u0db8<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">View \u0d91\u0d9a\u0dd9\u0db1\u0dca \u0d91\u0dc0\u0db4\u0dd4 data \u0d91\u0d9a\u0d9a\u0dca display \u0d9a\u0dbb\u0db1\u0dca\u0db1 \u0db4\u0dd4\u0dc5\u0dd4\u0dc0\u0db1\u0dca \u0dc0\u0dd4\u0dab\u0dcf\u0db8, template \u0d91\u0d9a\u0d9a\u0dca \u0d87\u0dad\u0dca\u0dad\u0da7\u0db8 useful \u0dc0\u0dd9\u0db1\u0dc0\u0dcf. \u0d94\u0dba\u0dcf\u0d9c\u0dda view \u0d91\u0d9a \u0db8\u0dd9\u0dc4\u0dd9\u0db8 update \u0d9a\u0dbb\u0db1\u0dca\u0db1:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">python<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def home(request):\n    context = {\n        'name': 'Nima Academy',\n        'post_count': 12,\n    }\n    return render(request, 'pages\/home.html', context)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0d8a\u0da7 \u0db4\u0dc3\u0dca\u0dc3\u0dda <code>home.html<\/code> \u0d87\u0dad\u0dd4\u0dc5\u0dda, Django \u0d9c\u0dda template syntax use \u0d9a\u0dbb\u0dbd\u0dcf \u0d92 values \u0db4\u0dd9\u0db1\u0dca\u0db1\u0db1\u0dca\u0db1:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">html<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;h1&gt;Welcome to {{ name }}!&lt;\/h1&gt;\n&lt;p&gt;We currently have {{ post_count }} posts.&lt;\/p&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Double curly braces \u0da7\u0dd2\u0d9a \u0dad\u0db8\u0dba\u0dd2 Django templates Python values \u0d9c\u0dda\u0db1\u0dc0\u0dcf. \u0db8\u0da7 \u0db8\u0dad\u0d9a\u0dba\u0dd2 templates \u0d87\u0dad\u0dca\u0dad\u0da7\u0db8 powerful feel \u0dc0\u0dd4\u0dab\u0dda \u0db8\u0dda moment \u0d91\u0d9a\u0dda\u0daf\u0dd3 &#8211; same HTML file \u0d91\u0d9a\u0dd9\u0db1\u0dca view \u0d91\u0d9a \u0d91\u0dc0\u0db1 \u0daf\u0dda \u0d85\u0db1\u0dd4\u0dc0 \u0dc3\u0db8\u0dca\u0db4\u0dd6\u0dbb\u0dca\u0dab\u0dba\u0dd9\u0db1\u0dca\u0db8 \u0dc0\u0dd9\u0db1\u0dc3\u0dca content \u0db4\u0dd9\u0db1\u0dca\u0db1\u0db1\u0dca\u0db1 \u0db4\u0dd4\u0dc5\u0dd4\u0dc0\u0db1\u0dca.<\/p>\n\n\n\n<h2 id=\"\u0daf\u0dd0\u0db1\u0dca-dynamic-ur-ls\" class=\"wp-block-heading\">\u0daf\u0dd0\u0db1\u0dca Dynamic URLs<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0db8\u0db8 \u0d89\u0d9c\u0dd9\u0db1 \u0d9c\u0db1\u0dca\u0db1 \u0dc0\u0dd0\u0da9\u0dd2\u0db8 excite \u0dc0\u0dd4\u0dab \u0d9a\u0ddc\u0da7\u0dc3 \u0db8\u0dda\u0d9a\u0dba\u0dd2. <code>\/about\/<\/code> \u0dc0\u0d9c\u0dda fixed page \u0d91\u0d9a\u0d9a\u0dca \u0dc0\u0dd9\u0db1\u0dd4\u0dc0\u0da7, request \u0d9a\u0dbb\u0db1 \u0daf\u0dda \u0d85\u0db1\u0dd4\u0dc0 \u0dc0\u0dd9\u0db1\u0dc3\u0dca \u0dc0\u0dd9\u0db1 URL \u0d91\u0d9a\u0d9a\u0dca \u0dc4\u0daf\u0db1\u0dca\u0db1 \u0db4\u0dd4\u0dc5\u0dd4\u0dc0\u0db1\u0dca, <code>\/post\/1\/<\/code>, <code>\/post\/2\/<\/code> \u0dc0\u0d9c\u0dda, \u0d94\u0d9a\u0dca\u0d9a\u0ddc\u0db8 handle \u0d9a\u0dbb\u0db1\u0dca\u0db1\u0dda \u0d91\u0d9a\u0db8 view \u0d91\u0d9a\u0d9a\u0dd2\u0db1\u0dca.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>urls.py<\/code> \u0d91\u0d9a number \u0d91\u0d9a\u0d9a\u0dca accept \u0d9a\u0dbb\u0db1\u0dca\u0db1 update \u0d9a\u0dbb\u0db1\u0dca\u0db1:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">python<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from django.urls import path\nfrom . import views\n\nurlpatterns = &#91;\n    path('', views.home, name='home'),\n    path('post\/&lt;int:post_id&gt;\/', views.post_detail, name='post_detail'),\n]<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0d92 <code>&lt;int:post_id&gt;<\/code> \u0d9a\u0ddc\u0da7\u0dc3\u0dd9\u0db1\u0dca Django \u0da7 \u0d9a\u0dd2\u0dba\u0db1\u0dc0\u0dcf, URL \u0d91\u0d9a\u0dda \u0d92 position \u0d91\u0d9a\u0dda \u0d91\u0db1 number \u0d91\u0d9a capture \u0d9a\u0dbb\u0dbd\u0dcf, view \u0d91\u0d9a\u0da7 argument \u0d91\u0d9a\u0d9a\u0dca \u0dc0\u0dd2\u0daf\u0dd2\u0dc4\u0da7 pass \u0d9a\u0dbb\u0db1\u0dca\u0db1.<\/p>\n\n\n\n<h2 id=\"\u0d92\u0d9a-handle-\u0d9a\u0dbb\u0db1-view-\u0d91\u0d9a-\u0dbd\u0dd2\u0dba\u0db1-\u0d91\u0d9a\" class=\"wp-block-heading\">\u0d92\u0d9a Handle \u0d9a\u0dbb\u0db1 View \u0d91\u0d9a \u0dbd\u0dd2\u0dba\u0db1 \u0d91\u0d9a<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0daf\u0dd0\u0db1\u0dca <code>views.py<\/code> \u0dc0\u0dbd, \u0d92 capture \u0d9a\u0dbb\u0db4\u0dd4 value \u0d91\u0d9a accept \u0d9a\u0dbb\u0db1 view \u0d91\u0d9a\u0d9a\u0dca \u0dbd\u0dd2\u0dba\u0db1\u0dca\u0db1:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">python<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def post_detail(request, post_id):\n    return HttpResponse(f\"You're viewing post number {post_id}.\")<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Browser \u0d91\u0d9a\u0dda <code>\/post\/5\/<\/code> \u0d91\u0d9a\u0da7 visit \u0d9a\u0dbb\u0db1\u0dca\u0db1, &#8220;You&#8217;re viewing post number 5.&#8221; \u0d9a\u0dd2\u0dba\u0dbd\u0dcf \u0db4\u0dda\u0db1\u0dc0\u0dcf. URL \u0d91\u0d9a\u0dda number \u0d91\u0d9a change \u0d9a\u0dbb\u0db1\u0dca\u0db1, page \u0d91\u0d9a automatically update \u0dc0\u0dd9\u0db1\u0dc0\u0dcf. View \u0d91\u0d9a\u0d9a\u0dca, unlimited pages &#8211; dynamic URLs \u0db8\u0da7 click \u0dc0\u0dd4\u0dab \u0d9a\u0ddc\u0da7\u0dc3 \u0d92\u0d9a\u0dba\u0dd2.<\/p>\n\n\n\n<h2 id=\"real-data-\u0d91\u0d9a\u0da7-connect-\u0d9a\u0dd2\u0dbb\u0dd3\u0db8\" class=\"wp-block-heading\">Real Data \u0d91\u0d9a\u0da7 Connect \u0d9a\u0dd2\u0dbb\u0dd3\u0db8<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Django app structure \u0d9c\u0dd0\u0db1 \u0db8\u0d9c\u0dda \u0d9a\u0dbd\u0dd2\u0db1\u0dca post \u0d91\u0d9a\u0dda discuss \u0d9a\u0dbb\u0db4\u0dd4 models \u0dc0\u0dbd\u0da7 connect \u0d9a\u0dbb\u0dcf\u0da7 \u0db4\u0dc3\u0dca\u0dc3\u0dda, \u0db8\u0dda\u0d9a \u0d87\u0dad\u0dca\u0dad\u0da7\u0db8 useful \u0dc0\u0dd9\u0db1\u0dc0\u0dcf. More realistic version \u0d91\u0d9a\u0d9a\u0dca \u0db8\u0dd9\u0dc4\u0dd9\u0db8 \u0db4\u0dda\u0db1\u0dc0\u0dcf:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">python<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from django.shortcuts import render, get_object_or_404\nfrom .models import Post\n\ndef post_detail(request, post_id):\n    post = get_object_or_404(Post, id=post_id)\n    return render(request, 'pages\/post_detail.html', {'post': post})<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>get_object_or_404<\/code> matching database record \u0d91\u0d9a fetch \u0d9a\u0dbb\u0db1\u0dc0\u0dcf, \u0db1\u0dd0\u0dad\u0dca\u0db1\u0db8\u0dca \u0d92\u0d9a exist \u0db1\u0dd0\u0dad\u0dca\u0db1\u0db8\u0dca automatically proper &#8220;not found&#8221; page \u0d91\u0d9a\u0d9a\u0dca \u0db4\u0dd9\u0db1\u0dca\u0db1\u0db1\u0dc0\u0dcf. \u0d92 \u0d91\u0d9a function \u0d91\u0d9a\u0dd9\u0db1\u0dca \u0db8\u0da7 repetitive error handling \u0d9c\u0ddc\u0da9\u0d9a\u0dca \u0dbd\u0dd2\u0dba\u0db1\u0dca\u0db1\u0db8 \u0d95\u0db1 \u0dc0\u0dd4\u0dab\u0dda \u0db1\u0dd1.<\/p>\n\n\n\n<h2 id=\"full-flow-\u0d91\u0d9a-\u0d91\u0d9a\u0da7-\u0d91\u0d9a\u0dad\u0dd4-\u0d9a\u0dd2\u0dbb\u0dd3\u0db8\" class=\"wp-block-heading\">Full Flow \u0d91\u0d9a \u0d91\u0d9a\u0da7 \u0d91\u0d9a\u0dad\u0dd4 \u0d9a\u0dd2\u0dbb\u0dd3\u0db8<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0daf\u0dd0\u0db1\u0dca complete chain \u0d91\u0d9a \u0db8\u0dd9\u0dc4\u0dd9\u0db8\u0dba\u0dd2: visitor \u0d9a\u0dd9\u0db1\u0dd9\u0d9a\u0dca <code>\/post\/5\/<\/code> request \u0d9a\u0dbb\u0db1\u0dc0\u0dcf, <code>urls.py<\/code> \u0d91\u0d9a\u0dd9\u0db1\u0dca <code>5<\/code> <code>post_id<\/code> \u0dc0\u0dd2\u0daf\u0dd2\u0dc4\u0da7 capture \u0d9a\u0dbb\u0db1\u0dc0\u0dcf, view \u0d91\u0d9a\u0dd9\u0db1\u0dca database \u0d91\u0d9a\u0dd9\u0db1\u0dca \u0d92 specific post \u0d91\u0d9a fetch \u0d9a\u0dbb\u0db1\u0dc0\u0dcf, <code>render()<\/code> \u0d91\u0d9a\u0dd9\u0db1\u0dca \u0d92\u0d9a HTML template \u0d91\u0d9a\u0d9a\u0dca \u0d91\u0d9a\u0dca\u0d9a combine \u0d9a\u0dbb\u0dbd\u0dcf final page \u0d91\u0d9a \u0dc4\u0daf\u0db1\u0dc0\u0dcf. Real Django sites \u0dc0\u0dbd content-driven pages \u0d9c\u0ddc\u0da9\u0d9a\u0dca \u0dc0\u0dd0\u0da9 \u0d9a\u0dbb\u0db1\u0dca\u0db1\u0dda \u0db8\u0dda exact pattern \u0d91\u0d9a\u0dd9\u0db1\u0dca\u0db8\u0dba\u0dd2 &#8211; blogs, product pages, user profiles, \u0d94\u0d9a\u0dca\u0d9a\u0ddc\u0db8.<\/p>\n\n\n\n<h2 id=\"\u0daf\u0dd0\u0db1\u0dca-\u0dc4\u0daf\u0dcf\u0d9c\u0db1\u0dca\u0db1-\u0dc0\u0da7\u0dd2\u0db1-small-habit-\u0d91\u0d9a\u0d9a\u0dca\" class=\"wp-block-heading\">\u0daf\u0dd0\u0db1\u0dca \u0dc4\u0daf\u0dcf\u0d9c\u0db1\u0dca\u0db1 \u0dc0\u0da7\u0dd2\u0db1 Small Habit \u0d91\u0d9a\u0d9a\u0dca<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0d94\u0dba\u0dcf\u0d9c\u0dda templates growing \u0dc0\u0dd9\u0db1\u0d9a\u0ddc\u0da7, same HTML &#8211; header \u0dc3\u0dc4 footer \u0dc0\u0d9c\u0dda &#8211; \u0dc4\u0dd0\u0db8 page \u0d91\u0d9a\u0d9a\u0db8 repeat \u0d9a\u0dbb\u0db1 \u0d91\u0d9a avoid \u0d9a\u0dbb\u0db1\u0dca\u0db1. Django base template \u0d91\u0d9a\u0d9a\u0dca use \u0d9a\u0dbb\u0dbd\u0dcf template inheritance support \u0d9a\u0dbb\u0db1\u0dc0\u0dcf, \u0d92\u0d9a future post \u0d91\u0d9a\u0d9a\u0daf\u0dd3 properly cover \u0d9a\u0dbb\u0db1\u0dca\u0db1\u0db8\u0dca. \u0daf\u0dd0\u0db1\u0da7, \u0d92\u0d9a exist \u0dc0\u0dd9\u0db1\u0dc0\u0dcf \u0d9a\u0dd2\u0dba\u0dbd\u0dcf \u0daf\u0dd0\u0db1\u0d9c\u0db1\u0dca\u0db1, \u0d94\u0dba\u0dcf\u0d9c\u0dda <code>home.html<\/code> \u0dc3\u0dc4 <code>post_detail.html<\/code> files \u0dc0\u0dbd duplicate code \u0d91\u0db1\u0dca\u0db1\u0dd9 \u0db1\u0dd0\u0dad\u0dd2 \u0dc0\u0dd9\u0db1\u0dca\u0db1.<\/p>\n\n\n\n<h2 id=\"\u0db8\u0dda-stage-\u0d91\u0d9a\u0dda\u0daf\u0dd3-common-mistakes\" class=\"wp-block-heading\">\u0db8\u0dda Stage \u0d91\u0d9a\u0dda\u0daf\u0dd3 Common Mistakes<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>templates\/appname\/<\/code> nested folder structure \u0d91\u0d9a \u0d85\u0db8\u0dad\u0d9a \u0dc0\u0dd3\u0db8, \u0d92\u0d9a\u0dd9\u0db1\u0dca &#8220;template not found&#8221; error \u0d91\u0d9a\u0d9a\u0dca \u0d92\u0db8<\/li>\n\n\n\n<li>View \u0d91\u0d9a\u0dda context dictionary \u0d91\u0d9a\u0dda variable name \u0d91\u0d9a \u0dc3\u0dc4 template \u0d91\u0d9a\u0dda variable name \u0d91\u0d9a mismatch \u0dc0\u0dd3\u0db8<\/li>\n\n\n\n<li><code>urls.py<\/code> \u0dc0\u0dbd <code>&lt;int:post_id><\/code> use \u0d9a\u0dbb\u0dbd\u0dcf, <code>views.py<\/code> \u0dc0\u0dbd function parameter \u0d91\u0d9a\u0da7 \u0dc0\u0dd9\u0db1\u0dc3\u0dca name \u0d91\u0d9a\u0d9a\u0dca \u0daf\u0dd3\u0db8<\/li>\n\n\n\n<li>Template \u0d91\u0d9a\u0da7 value \u0d91\u0d9a\u0d9a\u0dca pass \u0d9a\u0dbb\u0dbd\u0dcf, \u0d92\u0d9a display \u0d9a\u0dbb\u0db1\u0dca\u0db1 double curly braces \u0d85\u0db8\u0dad\u0d9a \u0dc0\u0dd3\u0db8<\/li>\n<\/ul>\n\n\n\n<h2 id=\"\u0db8\u0dd9\u0dad\u0db1\u0dd2\u0db1\u0dca-\u0d89\u0daf\u0dd2\u0dbb\u0dd2\u0dba\u0da7\" class=\"wp-block-heading\">\u0db8\u0dd9\u0dad\u0db1\u0dd2\u0db1\u0dca \u0d89\u0daf\u0dd2\u0dbb\u0dd2\u0dba\u0da7<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0db8\u0dda\u0d9a \u0d91\u0d9a\u0db4\u0dcf\u0dbb\u0da7\u0db8 \u0d9c\u0ddc\u0da9\u0d9a\u0dca \u0dc0\u0d9c\u0dda feel \u0dc0\u0dd4\u0dab\u0dcf \u0db1\u0db8\u0dca, \u0d92\u0d9a normal &#8211; dynamic URLs \u0dc3\u0dc4 templates \u0dad\u0db8\u0dba\u0dd2 Django, steps follow \u0d9a\u0dd2\u0dbb\u0dd3\u0db8\u0d9a\u0dca \u0db1\u0dd9\u0dc0\u0dd9\u0dba\u0dd2, real web development \u0d91\u0d9a\u0d9a\u0dca \u0dc0\u0d9c\u0dda feel \u0dc0\u0dd9\u0db1\u0dca\u0db1 \u0db4\u0da7\u0db1\u0dca \u0d9c\u0dad\u0dca\u0dad point \u0d91\u0d9a. Deep reference \u0d91\u0d9a\u0d9a\u0dca \u0d95\u0db1 \u0db1\u0db8\u0dca, <a href=\"https:\/\/docs.djangoproject.com\/en\/stable\/topics\/templates\/\" target=\"_blank\" rel=\"noopener\">official Django documentation on templates<\/a> \u0d91\u0d9a\u0dda \u0db8\u0dd9\u0dad\u0db1 touch \u0d9a\u0dbb\u0db4\u0dd4 \u0daf\u0dda\u0da7 \u0dc0\u0da9\u0dcf \u0d9c\u0ddc\u0da9\u0d9a\u0dca \u0dad\u0dd2\u0dba\u0dd9\u0db1\u0dc0\u0dcf.<\/p>\n\n\n\n<h2 id=\"\u0d85\u0dc0\u0dc3\u0dcf\u0db1\" class=\"wp-block-heading\">\u0d85\u0dc0\u0dc3\u0dcf\u0db1 <\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0d94\u0dba\u0dcf single static page \u0d91\u0d9a\u0d9a\u0dd2\u0db1\u0dca, URL \u0d91\u0d9a\u0dd9\u0db1\u0dca\u0db8 drive \u0dc0\u0dd9\u0db1, \u0d91\u0d9a view \u0d91\u0d9a\u0d9a\u0dd2\u0db1\u0dca\u0db8 unlimited content pieces display \u0d9a\u0dbb\u0db1 system \u0d91\u0d9a\u0d9a\u0da7 \u0d9c\u0dd2\u0dba\u0dcf. Part 1 \u0d91\u0d9a\u0dd9\u0db1\u0dca \u0db8\u0dda\u0d9a \u0d87\u0dad\u0dca\u0dad\u0da7\u0db8 \u0dbd\u0ddc\u0d9a\u0dd4 jump \u0d91\u0d9a\u0d9a\u0dca. \u0d8a\u0dc5\u0d9f\u0da7 \u0dba\u0db1\u0dca\u0db1 \u0d9a\u0dbd\u0dd2\u0db1\u0dca, \u0d94\u0dba\u0dcf\u0d9c\u0dda\u0db8 second dynamic URL \u0d91\u0d9a\u0d9a\u0dca try \u0d9a\u0dbb\u0db1\u0dca\u0db1 &#8211; <code>\/category\/&lt;str:name&gt;\/<\/code> \u0dc0\u0d9c\u0dda \u0d91\u0d9a\u0d9a\u0dca. \u0db8\u0dda pattern \u0d91\u0d9a stick \u0d9a\u0dbb\u0d9c\u0db1\u0dca\u0db1 \u0dad\u0dd2\u0dba\u0dd9\u0db1 fastest way \u0d91\u0d9a \u0d92\u0d9a\u0dba\u0dd2.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/nayananimsara.online\/course\/django-course-sinhala\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/nayananimsara.online\/course\/django-course-sinhala\/\" rel=\"noreferrer noopener\">Full Course<\/a><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"tg-oembed-container\"><iframe title=\"WebHD 720p 10\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/eQL98i4YNuE?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/div>\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/drive.google.com\/file\/d\/1AQ5_RSgzLwkFrlQHuRqgF49dU-tO0zgv\/view?usp=sharing\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/drive.google.com\/file\/d\/1AQ5_RSgzLwkFrlQHuRqgF49dU-tO0zgv\/view?usp=sharing\" rel=\"noreferrer noopener\">Lesson File<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Django dynamic URLs and templates tutorial In Part 1, I got a plain &#8220;Hello, world&#8221; message showing up on my homepage, and honestly, that felt like a big enough win at the time. But real websites don&#8217;t just show static text \u2014 they show HTML pages, and they show different content depending on which specific [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1715,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"elearning_container_layout":"tg-site-layout--default","elearning_sidebar_layout":"tg-site-layout--default","elearning_remove_content_margin":false,"elearning_sidebar":"default","elearning_transparent_header":"customizer","elearning_logo":0,"elearning_header_style":"default","elearning_menu_item_color":"","elearning_menu_item_hover_color":"","elearning_menu_item_active_color":"","elearning_menu_item_active_style":"","elearning_page_header":true,"footnotes":""},"categories":[64],"tags":[],"class_list":["post-1714","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-django"],"_links":{"self":[{"href":"https:\/\/nayananimsara.online\/wp-json\/wp\/v2\/posts\/1714","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nayananimsara.online\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nayananimsara.online\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nayananimsara.online\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nayananimsara.online\/wp-json\/wp\/v2\/comments?post=1714"}],"version-history":[{"count":2,"href":"https:\/\/nayananimsara.online\/wp-json\/wp\/v2\/posts\/1714\/revisions"}],"predecessor-version":[{"id":1730,"href":"https:\/\/nayananimsara.online\/wp-json\/wp\/v2\/posts\/1714\/revisions\/1730"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nayananimsara.online\/wp-json\/wp\/v2\/media\/1715"}],"wp:attachment":[{"href":"https:\/\/nayananimsara.online\/wp-json\/wp\/v2\/media?parent=1714"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nayananimsara.online\/wp-json\/wp\/v2\/categories?post=1714"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nayananimsara.online\/wp-json\/wp\/v2\/tags?post=1714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}