{"id":5560,"date":"2022-11-15T03:45:54","date_gmt":"2022-11-15T03:45:54","guid":{"rendered":"https:\/\/www.pythontutorial.net\/?page_id=5560"},"modified":"2023-11-01T00:22:32","modified_gmt":"2023-11-01T00:22:32","slug":"django-admin-page","status":"publish","type":"page","link":"https:\/\/www.pythontutorial.net\/django-tutorial\/django-admin-page\/","title":{"rendered":"Django Admin Page"},"content":{"rendered":"\n<p><strong>Summary<\/strong>: in this tutorial, you&#8217;ll learn how to create a superuser and use it to sign in to the Django admin page.<\/p>\n\n\n\n<p class=\"note\">This tutorial begins where&nbsp;the <a href=\"https:\/\/www.pythontutorial.net\/django-tutorial\/django-models\/\">Django models tut<\/a><a href=\"https:\/\/www.pythontutorial.net\/django-tutorial\/django-admin-page\/\">orial<\/a> left off.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='introduction-to-the-django-admin-page'>Introduction to the Django admin page <a href=\"#introduction-to-the-django-admin-page\" class=\"anchor\" id=\"introduction-to-the-django-admin-page\" title=\"Anchor for Introduction to the Django admin page\">#<\/a><\/h2>\n\n\n\n<p>When you create a new project using the <code>startproject<\/code> command, Django automatically generates the admin page for managing models including creating, reading, updating, and deleting which is often known as CRUD.<\/p>\n\n\n\n<p>To access the admin page, you navigate to the URL <code>http:\/\/127.0.0.1\/admin\/<\/code>. It&#8217;ll open the login page:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"809\" height=\"532\" src=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/11\/django-admin-page.png\" alt=\"django admin page\" class=\"wp-image-5562\" srcset=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/11\/django-admin-page.png 809w, https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/11\/django-admin-page-300x197.png 300w, https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/11\/django-admin-page-768x505.png 768w\" sizes=\"auto, (max-width: 809px) 100vw, 809px\" \/><\/figure>\n\n\n\n<p>Note that Django specifies the <code>admin\/<\/code> in the <code>urls.py<\/code> of the project:<\/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 shcb-code-table\"><span class='shcb-loc'><span><span class=\"hljs-keyword\">from<\/span> django.contrib <span class=\"hljs-keyword\">import<\/span> admin\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-keyword\">from<\/span> django.urls <span class=\"hljs-keyword\">import<\/span> path, include\n<\/span><\/span><span class='shcb-loc'><span>\n<\/span><\/span><span class='shcb-loc'><span>urlpatterns = &#91;\n<\/span><\/span><mark class='shcb-loc'><span>    path(<span class=\"hljs-string\">'admin\/'<\/span>, admin.site.urls),\n<\/span><\/mark><span class='shcb-loc'><span>    path(<span class=\"hljs-string\">''<\/span>,include(<span class=\"hljs-string\">'blog.urls'<\/span>))\n<\/span><\/span><span class='shcb-loc'><span>]\n<\/span><\/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>The Django admin requires an account to log in. Therefore, you need to create a user using a Django command.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id='creating-a-superuser-account'>Creating a superuser account <a href=\"#creating-a-superuser-account\" class=\"anchor\" id=\"creating-a-superuser-account\" title=\"Anchor for Creating a superuser account\">#<\/a><\/h3>\n\n\n\n<p>To create a superuser account, you use the <code>createsuperuser<\/code> command this:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"plaintext\" data-shcb-language-slug=\"plaintext\"><span><code class=\"hljs language-plaintext\">python manage.py createsuperuser<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><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>It&#8217;ll prompt for a username, email address, and password:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"plaintext\" data-shcb-language-slug=\"plaintext\"><span><code class=\"hljs language-plaintext\">Username: john          \nEmail address: john@pythontutorial.net\nPassword: \nPassword (again): \nSuperuser created successfully.<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><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>Run the Django development server:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" 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-4\"><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 login using the created user, you&#8217;ll see the default admin page that manages users &amp; groups:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"718\" height=\"394\" src=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/11\/django-admin-page-admin-panel.png\" alt=\"django admin page - admin panel\" class=\"wp-image-5565\" srcset=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/11\/django-admin-page-admin-panel.png 718w, https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/11\/django-admin-page-admin-panel-300x165.png 300w\" sizes=\"auto, (max-width: 718px) 100vw, 718px\" \/><\/figure>\n\n\n\n<p>To show the <code>Post<\/code> model on the admin page, you need to register it in the <code>admin.py<\/code> of the <code>blog<\/code> application:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python shcb-code-table\"><span class='shcb-loc'><span><span class=\"hljs-keyword\">from<\/span> django.contrib <span class=\"hljs-keyword\">import<\/span> admin\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-keyword\">from<\/span> .models <span class=\"hljs-keyword\">import<\/span> Post\n<\/span><\/span><span class='shcb-loc'><span>\n<\/span><\/span><span class='shcb-loc'><span>\n<\/span><\/span><mark class='shcb-loc'><span>admin.site.register(Post)\n<\/span><\/mark><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><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>In this code:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>First, import the <code>Post<\/code> from the <code>models.py<\/code> file.<\/li>\n\n\n\n<li>Second, register it using the <code>admin.site.register(Post)<\/code>.<\/li>\n<\/ul>\n\n\n\n<p>Once you register the model, you&#8217;ll see that it appears on the admin site:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"741\" height=\"611\" src=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/11\/django-admin-page-blog.png\" alt=\"django admin page - blog\" class=\"wp-image-5795\" srcset=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/11\/django-admin-page-blog.png 741w, https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/11\/django-admin-page-blog-300x247.png 300w\" sizes=\"auto, (max-width: 741px) 100vw, 741px\" \/><\/figure>\n\n\n\n<p>From here, you can manage the posts including creating, updating, deleting, and viewing the posts. For example, you can create a post by clicking the Add button:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"738\" height=\"747\" src=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/11\/django-admin-page-create-a-post.png\" alt=\"django admin page - create a post\" class=\"wp-image-5796\" srcset=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/11\/django-admin-page-create-a-post.png 738w, https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/11\/django-admin-page-create-a-post-296x300.png 296w\" sizes=\"auto, (max-width: 738px) 100vw, 738px\" \/><\/figure>\n\n\n\n<p>Let&#8217;s create three posts:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"731\" height=\"367\" src=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/11\/django-admin-page-post-list.png\" alt=\"django admin page - post list\" class=\"wp-image-5797\" srcset=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/11\/django-admin-page-post-list.png 731w, https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/11\/django-admin-page-post-list-300x151.png 300w\" sizes=\"auto, (max-width: 731px) 100vw, 731px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id='display-data-from-the-database'>Display data from the database <a href=\"#display-data-from-the-database\" class=\"anchor\" id=\"display-data-from-the-database\" title=\"Anchor for Display data from the database\">#<\/a><\/h3>\n\n\n\n<p>To display the posts from the database, you need to change the <code>home()<\/code> function in the <code>views.py<\/code> of the <code>blog<\/code> application:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" 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> .models <span class=\"hljs-keyword\">import<\/span> Post\n\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def<\/span> <span class=\"hljs-title\">home<\/span><span class=\"hljs-params\">(request)<\/span>:<\/span>\n    posts = Post.objects.all()\n    context = {<span class=\"hljs-string\">'posts'<\/span>: posts}\n    <span class=\"hljs-keyword\">return<\/span> render(request, <span class=\"hljs-string\">'blog\/home.html'<\/span>, context)\n\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def<\/span> <span class=\"hljs-title\">about<\/span><span class=\"hljs-params\">(request)<\/span>:<\/span>\n    <span class=\"hljs-keyword\">return<\/span> render(request, <span class=\"hljs-string\">'blog\/about.html'<\/span>)\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><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>Post<\/code> model from the <code>models.py<\/code> module:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\"><span class=\"hljs-keyword\">from<\/span> .models <span class=\"hljs-keyword\">import<\/span> Post<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><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>Next, get all posts from the database using the <code>Post<\/code> model:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\">posts = Post.objects.all()<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><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 <code>all()<\/code> method returns a <code>QuerySet<\/code> that contains all <code>Post<\/code> objects from the database. Note that you&#8217;ll learn more about how to interact with the database in the Django ORM section.<\/p>\n\n\n\n<p>Then, create a <code>context<\/code> dictionary with the key as <code>'posts'<\/code> and the value as the <code>posts<\/code> QuerySet:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">context = {<span class=\"hljs-string\">'posts'<\/span>: posts  }<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>After that, pass the <code>context<\/code> to the <code>render()<\/code> function:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-10\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\"><span class=\"hljs-keyword\">return<\/span> render(request,<span class=\"hljs-string\">'blog\/home.html'<\/span>, context)<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-10\"><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>Finally, show the <code>posts<\/code> in the <code>home.html<\/code> template:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-11\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml\">{% extends 'base.html' %}\n\t\n{% block content %}\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h1<\/span>&gt;<\/span>My Posts<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">h1<\/span>&gt;<\/span>\n\t{% for post in posts %}\n\t\t<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h2<\/span>&gt;<\/span>{{ post.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\">small<\/span>&gt;<\/span>Published on {{ post.published_at | date:\"M d, Y\" }} by {{ post.author | title}}<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">small<\/span>&gt;<\/span>\n\t\t<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">p<\/span>&gt;<\/span>{{ post.content }}<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">p<\/span>&gt;<\/span>\n\t{% endfor %}\n{% endblock content %}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-11\"><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>If you open the URL <code>http:\/\/127.0.0.1\/<\/code>, you&#8217;ll see three posts from the database:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"484\" height=\"606\" src=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/11\/django-admin-page-show-data-from-database.png\" alt=\"django admin page- show data from database\" class=\"wp-image-5838\" srcset=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/11\/django-admin-page-show-data-from-database.png 484w, https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2022\/11\/django-admin-page-show-data-from-database-240x300.png 240w\" sizes=\"auto, (max-width: 484px) 100vw, 484px\" \/><\/figure>\n\n\n\n<p class=\"note\"><a href=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2023\/01\/django_project_6.zip\" target=\"_blank\" rel=\"noreferrer noopener\">Download the Django Project source code<\/a><\/p>\n\n\n\n<p>If you download the project source code, the password for the superuser is <code>NJ24on7eJRSd8a2UlSpg<\/code><\/p>\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>Django comes with a default admin panel that allows you to manage users, groups, and models.<\/li>\n\n\n\n<li>Use the <code>createsuperuser<\/code> to create a superuser for logging in to the Django admin site.<\/li>\n\n\n\n<li>Use the <code>admin.site.register<\/code> method to register a model to the admin panel.<\/li>\n\n\n\n<li>Use the <code>all()<\/code> method of the <code>Model.objects<\/code> to get all models as a <code>QuerySet<\/code> from the database.<\/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=\"5560\"\n\t\t\t\tdata-post-url=\"https:\/\/www.pythontutorial.net\/django-tutorial\/django-admin-page\/\"\n\t\t\t\tdata-post-title=\"Django Admin Page\"\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=\"5560\"\n\t\t\t\tdata-post-url=\"https:\/\/www.pythontutorial.net\/django-tutorial\/django-admin-page\/\"\n\t\t\t\tdata-post-title=\"Django Admin Page\"\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 create a superuser and use it to sign in to the Django admin page.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":5531,"menu_order":5,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-5560","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages\/5560","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=5560"}],"version-history":[{"count":0,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages\/5560\/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=5560"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}