{"id":5969,"date":"2022-12-01T03:31:22","date_gmt":"2022-12-01T03:31:22","guid":{"rendered":"https:\/\/www.pythontutorial.net\/?page_id=5969"},"modified":"2023-08-17T09:44:11","modified_gmt":"2023-08-17T09:44:11","slug":"django-detailview","status":"publish","type":"page","link":"https:\/\/www.pythontutorial.net\/django-tutorial\/django-detailview\/","title":{"rendered":"Django DetailView"},"content":{"rendered":"\n<p><strong>Summary<\/strong>: in this tutorial, you&#8217;ll learn how to use the Django <code>DetailView<\/code> class to display an object.<\/p>\n\n\n\n<p class=\"note\">This tutorial begins where&nbsp;the&nbsp;<a href=\"https:\/\/www.pythontutorial.net\/django-tutorial\/django-listview\/\">Django ListView tutorial<\/a> left off.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='defining-a-detailview'>Defining a DetailView <a href=\"#defining-a-detailview\" class=\"anchor\" id=\"defining-a-detailview\" title=\"Anchor for Defining a DetailView\">#<\/a><\/h2>\n\n\n\n<p>The Django <code>DetailView<\/code> allows you to define a class-based view that displays the details of an object. To use the <code>DetailView<\/code> class, you define a class that inherits from the <code>DetailView<\/code> class.<\/p>\n\n\n\n<p>For example, the following defines the <code>TaskDetail<\/code> class-based view that displays the detail of a task of the <a href=\"https:\/\/www.pythontutorial.net\/django-tutorial\/django-todo-app\/\">Todo app<\/a>:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\"><span class=\"hljs-keyword\">from<\/span> django.shortcuts <span class=\"hljs-keyword\">import<\/span> render\n<span class=\"hljs-keyword\">from<\/span> django.views.generic.list <span class=\"hljs-keyword\">import<\/span> ListView\n<span class=\"hljs-keyword\">from<\/span> django.views.generic.detail <span class=\"hljs-keyword\">import<\/span> DetailView\n<span class=\"hljs-keyword\">from<\/span> .models <span class=\"hljs-keyword\">import<\/span> Task\n\n    \n<span class=\"hljs-class\"><span class=\"hljs-keyword\">class<\/span> <span class=\"hljs-title\">TaskDetail<\/span><span class=\"hljs-params\">(DetailView)<\/span>:<\/span>\n    model = Task\n    context_object_name = <span class=\"hljs-string\">'task'<\/span>\n    \n<span class=\"hljs-comment\">#...  <\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>How it works.<\/p>\n\n\n\n<p>First, import the <code>DetailView<\/code> from the <code>django.views<\/code>.<code>generic.detail<\/code>:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\"><span class=\"hljs-keyword\">from<\/span> django.views.generic.detail <span class=\"hljs-keyword\">import<\/span> DetailView<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Second, define a <code>TaskDetail<\/code> class that inherits from the <code>DetailView<\/code> class. In the <code>TaskDetail<\/code> class, we define the following attributes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>model<\/code> specifies the class of the object that will be displayed.<\/li>\n\n\n\n<li><code>context_object_name<\/code> specifies the name of the object in the template. By default, Django uses <code>object<\/code> as the object name in the template. To make it more obvious, we use the <code>task<\/code> as the object name instead.  <\/li>\n<\/ul>\n\n\n\n<p>By default, the <code>TaskDetail<\/code> class will load the template with the name <code>task_detail.html<\/code> from the <code>templates\/todo<\/code> application. <\/p>\n\n\n\n<p>If you want to use a different template name, you can use the <code>template_name<\/code> attribute in the <code>TaskDetail<\/code> class.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='create-the-task_detail-html-template'>Create the task_detail.html template <a href=\"#create-the-task_detail-html-template\" class=\"anchor\" id=\"create-the-task_detail-html-template\" title=\"Anchor for Create the task_detail.html template\">#<\/a><\/h2>\n\n\n\n<p>Create the <code>task_detail.html<\/code> template in the <code>templates\/blog<\/code> directory with the following code:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml\">{%extends 'base.html'%}\n\n{%block content%}\n\n <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">article<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"task\"<\/span>&gt;<\/span>\n\t<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">header<\/span>&gt;<\/span>\n\t\t<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h2<\/span>&gt;<\/span>{{ task.title }}<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">h2<\/span>&gt;<\/span>\n\t\t<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">span<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"badge {% if task.completed %}badge-completed{% else %}badge-pending{%endif%}\"<\/span>&gt;<\/span>\n\t\t\t{% if task.completed %} Completed {%else%} Pending {%endif%}\n\t\t<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">span<\/span>&gt;<\/span>\n\t<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">header<\/span>&gt;<\/span>\n\t<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">p<\/span>&gt;<\/span>{{task.description}}<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">p<\/span>&gt;<\/span>\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">article<\/span>&gt;<\/span>\n\n{%endblock content%}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The <code>task_detail.html<\/code> template extends <code>base.html<\/code> template. <\/p>\n\n\n\n<p>The <code>task_detail.html<\/code> template uses the <code>task<\/code> as the object and displays the task&#8217;s attributes including title, status (completed or not), and description.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='defining-a-route'>Defining a route <a href=\"#defining-a-route\" class=\"anchor\" id=\"defining-a-route\" title=\"Anchor for Defining a route\">#<\/a><\/h2>\n\n\n\n<p>Define a route that maps the URL that displays a task with the result of the <code>as_view()<\/code> method of the <code>TaskDetail<\/code> class:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\"><span class=\"hljs-keyword\">from<\/span> django.urls <span class=\"hljs-keyword\">import<\/span> path\n<span class=\"hljs-keyword\">from<\/span> .views <span class=\"hljs-keyword\">import<\/span> home, TaskList, TaskDetail\n\nurlpatterns = &#91;\n    path(<span class=\"hljs-string\">''<\/span>, home, name=<span class=\"hljs-string\">'home'<\/span>),\n    path(<span class=\"hljs-string\">'tasks\/'<\/span>, TaskList.as_view(),name=<span class=\"hljs-string\">'tasks'<\/span>),\n    path(<span class=\"hljs-string\">'task\/&lt;int:pk&gt;\/'<\/span>,TaskDetail.as_view(),name=<span class=\"hljs-string\">'task'<\/span>),\n]<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The URL accepts an integer as the id (or primary key, pk) of the task. The TaskDetail will take this <code>pk<\/code> parameter, select the task from the database by the id, construct a Task object, and pass it to a template.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='modifying-the-task_list-html-template'>Modifying the task_list.html template <a href=\"#modifying-the-task_list-html-template\" class=\"anchor\" id=\"modifying-the-task_list-html-template\" title=\"Anchor for Modifying the task_list.html template\">#<\/a><\/h2>\n\n\n\n<p>Modify the <code>task_list.html<\/code> template to include the link to each task on the task list using the <code>url<\/code> tag:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-code-table\"><span class='shcb-loc'><span>{%extends 'base.html'%}\n<\/span><\/span><span class='shcb-loc'><span>\n<\/span><\/span><span class='shcb-loc'><span>{%block content%}\n<\/span><\/span><span class='shcb-loc'><span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"center\"<\/span>&gt;<\/span>\n<\/span><\/span><span class='shcb-loc'><span>\t<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h2<\/span>&gt;<\/span>My Todo List<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">h2<\/span>&gt;<\/span>\n<\/span><\/span><span class='shcb-loc'><span>\t{% if tasks %}\n<\/span><\/span><span class='shcb-loc'><span>\t<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">ul<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"tasks\"<\/span>&gt;<\/span>\n<\/span><\/span><span class='shcb-loc'><span>\t\t{% for task in tasks %}\n<\/span><\/span><mark class='shcb-loc'><span>\t\t\t<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">li<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"{% url 'task' task.id %}\"<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"{% if task.completed%}completed{%endif%}\"<\/span>&gt;<\/span>{{ task.title }}<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">a<\/span>&gt;<\/span> \n<\/span><\/mark><span class='shcb-loc'><span>\t\t\t\t <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span>  <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"task-controls\"<\/span>&gt;<\/span>\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t \t<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"#\"<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">i<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"bi bi-trash\"<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">i<\/span>&gt;<\/span> <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">a<\/span>&gt;<\/span>\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"#\"<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">i<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"bi bi-pencil-square\"<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">i<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">a<\/span>&gt;<\/span>\n<\/span><\/span><span class='shcb-loc'><span>\t\t         <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n<\/span><\/span><span class='shcb-loc'><span>\t\t    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">li<\/span>&gt;<\/span>\n<\/span><\/span><span class='shcb-loc'><span>\t\t{% endfor %}\n<\/span><\/span><span class='shcb-loc'><span>\t{% else %}\n<\/span><\/span><span class='shcb-loc'><span>\t\t<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">p<\/span>&gt;<\/span>? Yay, you have no pending tasks!<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">p<\/span>&gt;<\/span>\n<\/span><\/span><span class='shcb-loc'><span>\t{% endif %}\n<\/span><\/span><span class='shcb-loc'><span>\t<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">ul<\/span>&gt;<\/span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n<\/span><\/span><span class='shcb-loc'><span>{%endblock content%}\n<\/span><\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>When you click the link of each tag, you&#8217;ll be redirected to the task detail page.<\/p>\n\n\n\n<p>Run the Django dev server:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"plaintext\" data-shcb-language-slug=\"plaintext\"><span><code class=\"hljs language-plaintext\">python manage.py runserver<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">plaintext<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">plaintext<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>and open the task list:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"plaintext\" data-shcb-language-slug=\"plaintext\"><span><code class=\"hljs language-plaintext\">http:&#47;&#47;127.0.0.1:8000\/tasks\/<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">plaintext<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">plaintext<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>you&#8217;ll see the following task list:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"705\" height=\"264\" src=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/11\/django-todo-list-ListView-Example.png\" alt=\"\" class=\"wp-image-5973\" srcset=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/11\/django-todo-list-ListView-Example.png 705w, https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/11\/django-todo-list-ListView-Example-300x112.png 300w\" sizes=\"auto, (max-width: 705px) 100vw, 705px\" \/><\/figure>\n\n\n\n<p>And click a task e.g., <code>Learn Python<\/code>, you&#8217;ll be redirected to the task detail page:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"478\" height=\"156\" src=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/11\/django-todo-list-DetailView.png\" alt=\"\" class=\"wp-image-5976\" srcset=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/11\/django-todo-list-DetailView.png 478w, https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/11\/django-todo-list-DetailView-300x98.png 300w\" sizes=\"auto, (max-width: 478px) 100vw, 478px\" \/><\/figure>\n\n\n\n<p class=\"note\">You can download the final code for this <a href=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/12\/todo_list_3_detail_view.zip\">Django DetailView tutorial<\/a> here.<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"444\" style=\"aspect-ratio: 724 \/ 444;\" width=\"724\" controls src=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/12\/django-DetailView-Demo.mp4\"><\/video><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id='summary'>Summary <a href=\"#summary\" class=\"anchor\" id=\"summary\" title=\"Anchor for Summary\">#<\/a><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use Django <code>DetailView<\/code> to display the detail of an object.<\/li>\n<\/ul>\n<div class=\"helpful-block-content\" data-title=\"\">\n\t<header>\n\t\t<div class=\"wth-question\">Was this tutorial helpful ?<\/div>\n\t\t<div class=\"wth-thumbs\">\n\t\t\t<button\n\t\t\t\tdata-post=\"5969\"\n\t\t\t\tdata-post-url=\"https:\/\/www.pythontutorial.net\/django-tutorial\/django-detailview\/\"\n\t\t\t\tdata-post-title=\"Django DetailView\"\n\t\t\t\tdata-response=\"1\"\n\t\t\t\tclass=\"wth-btn-rounded wth-yes-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\tclass=\"feather feather-thumbs-up block w-full h-full\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> Yes <\/span>\n\t\t\t<\/button>\n\n\t\t\t<button\n\t\t\t\tdata-response=\"0\"\n\t\t\t\tdata-post=\"5969\"\n\t\t\t\tdata-post-url=\"https:\/\/www.pythontutorial.net\/django-tutorial\/django-detailview\/\"\n\t\t\t\tdata-post-title=\"Django DetailView\"\n\t\t\t\tclass=\"wth-btn-rounded wth-no-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> No <\/span>\n\t\t\t<\/button>\n\t\t<\/div>\n\t<\/header>\n\n\t<div class=\"wth-form hidden\">\n\t\t<div class=\"wth-form-wrapper\">\n\t\t\t<div class=\"wth-title\"><\/div>\n\t\t\t<textarea class=\"wth-message\"><\/textarea>\n\t\t\t<input type=\"button\" name=\"wth-submit\" class=\"wth-btn wth-btn-submit\" id=\"wth-submit\" \/>\n\t\t\t<input type=\"button\" class=\"wth-btn wth-btn-cancel\" value=\"Cancel\" \/>\n\t\t<\/div>\n\t<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you&#8217;ll learn how to use the Django DetailView to display an object.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":5531,"menu_order":14,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-5969","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages\/5969","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/comments?post=5969"}],"version-history":[{"count":0,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages\/5969\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages\/5531"}],"wp:attachment":[{"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/media?parent=5969"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}