{"id":4023,"date":"2023-11-04T23:14:00","date_gmt":"2023-11-04T23:14:00","guid":{"rendered":"http:\/\/localhost:10003\/how-to-implement-authentication-and-authorization-with-django\/"},"modified":"2023-11-05T05:48:24","modified_gmt":"2023-11-05T05:48:24","slug":"how-to-implement-authentication-and-authorization-with-django","status":"publish","type":"post","link":"http:\/\/localhost:10003\/how-to-implement-authentication-and-authorization-with-django\/","title":{"rendered":"How to Implement Authentication and Authorization with Django"},"content":{"rendered":"

Authentication and authorization are essential components of any web application. They allow you to control access to different resources and ensure that only authorized users can perform certain actions. Django, a popular Python web framework, provides built-in support for implementing authentication and authorization.<\/p>\n

In this tutorial, we will cover the steps to implement authentication and authorization in a Django application. We will discuss the following topics:<\/p>\n

    \n
  1. Setting up a Django project<\/li>\n
  2. Creating user registration and login views<\/li>\n
  3. Implementing user authentication<\/li>\n
  4. Adding authorization to your views<\/li>\n
  5. Securing static files<\/li>\n<\/ol>\n

    1. Setting up a Django project<\/h2>\n

    Before we can implement authentication and authorization, we need to set up a Django project. If you haven’t already, install Django by running the following command:<\/p>\n

    pip install Django\n<\/code><\/pre>\n

    Once Django is installed, you can create a new project by running:<\/p>\n

    django-admin startproject myproject\n<\/code><\/pre>\n

    This will create a new directory called myproject<\/code> with the basic structure of a Django project. Navigate to the project directory:<\/p>\n

    cd myproject\n<\/code><\/pre>\n

    Next, create a new Django app for our authentication functionality:<\/p>\n

    python manage.py startapp authentication\n<\/code><\/pre>\n

    Finally, open myproject\/settings.py<\/code> and add 'authentication'<\/code> to the INSTALLED_APPS<\/code> list:<\/p>\n

    INSTALLED_APPS = [\n    ...\n    'authentication',\n    ...\n]\n<\/code><\/pre>\n

    2. Creating user registration and login views<\/h2>\n

    To implement user authentication, we first need to create views for user registration and login. Create a new file called views.py<\/code> inside the authentication<\/code> directory, and add the following code:<\/p>\n

    from django.shortcuts import render, redirect\nfrom django.contrib.auth.forms import UserCreationForm, AuthenticationForm\nfrom django.contrib.auth import login, logout\n\ndef register(request):\n    if request.method == 'POST':\n        form = UserCreationForm(request.POST)\n        if form.is_valid():\n            form.save()\n            return redirect('\/')\n    else:\n        form = UserCreationForm()\n    return render(request, 'register.html', {'form': form})\n\ndef login_view(request):\n    if request.method == 'POST':\n        form = AuthenticationForm(request, data=request.POST)\n        if form.is_valid():\n            user = form.get_user()\n            login(request, user)\n            return redirect('\/')\n    else:\n        form = AuthenticationForm()\n    return render(request, 'login.html', {'form': form})\n\ndef logout_view(request):\n    logout(request)\n    return redirect('\/')\n<\/code><\/pre>\n

    These views use Django’s built-in forms for user registration and login. The register<\/code> view handles the registration form, saves the new user, and redirects to the homepage. The login_view<\/code> view handles the login form, authenticates the user, and redirects to the homepage. The logout_view<\/code> view logs out the user and redirects to the homepage.<\/p>\n

    3. Implementing user authentication<\/h2>\n

    To enable user authentication in our Django project, we need to configure the authentication backend and update the project’s URLs. Open myproject\/settings.py<\/code> and add the following lines at the end of the file:<\/p>\n

    LOGIN_REDIRECT_URL = '\/'\nLOGOUT_REDIRECT_URL = '\/'\n<\/code><\/pre>\n

    These lines configure the redirect URL after a successful login or logout.<\/p>\n

    Next, open myproject\/urls.py<\/code> and add the following code:<\/p>\n

    from django.urls import include, path\nfrom authentication.views import register, login_view, logout_view\n\nurlpatterns = [\n    # ...\n    path('register\/', register, name='register'),\n    path('login\/', login_view, name='login'),\n    path('logout\/', logout_view, name='logout'),\n    # ...\n]\n<\/code><\/pre>\n

    These lines map the registration, login, and logout views to their respective URLs.<\/p>\n

    Finally, create the HTML templates for the registration and login forms. Inside the authentication<\/code> directory, create a new directory called templates<\/code>. Inside the templates<\/code> directory, create a new file called register.html<\/code> and add the following code:<\/p>\n

    {% extends 'base.html' %}\n\n{% block content %}\n  <h2>Register<\/h2>\n  <form method=\"post\" action=\"{% url 'register' %}\">\n    {% csrf_token %}\n    {{ form.as_p }}\n    <button type=\"submit\">Register<\/button>\n  <\/form>\n{% endblock %}\n<\/code><\/pre>\n

    And create another file called login.html<\/code> with the following code:<\/p>\n

    {% extends 'base.html' %}\n\n{% block content %}\n  <h2>Login<\/h2>\n  <form method=\"post\" action=\"{% url 'login' %}\">\n    {% csrf_token %}\n    {{ form.as_p }}\n    <button type=\"submit\">Login<\/button>\n  <\/form>\n{% endblock %}\n<\/code><\/pre>\n

    These templates extend a base template called base.html<\/code> and render the registration and login forms.<\/p>\n

    4. Adding authorization to your views<\/h2>\n

    Now that we have implemented user authentication, let’s add authorization to our views. Authorization allows us to control access to certain views or resources based on the user’s permissions or roles.<\/p>\n

    First, let’s create a new Django model to represent a resource that we want to restrict access to. Inside the authentication<\/code> directory, open models.py<\/code> and add the following code:<\/p>\n

    from django.db import models\nfrom django.contrib.auth.models import User\n\nclass Document(models.Model):\n    title = models.CharField(max_length=100)\n    content = models.TextField()\n    owner = models.ForeignKey(User, on_delete=models.CASCADE)\n<\/code><\/pre>\n

    This model represents a document with a title, content, and an owner. The owner<\/code> field is a foreign key to the built-in User<\/code> model. It represents the user who owns the document.<\/p>\n

    Next, run the following command to create the database tables for our new model:<\/p>\n

    python manage.py migrate\n<\/code><\/pre>\n

    Now let’s update the views to restrict access to the Document<\/code> model. Open authentication\/views.py<\/code> and replace the code with the following:<\/p>\n

    from django.shortcuts import render, redirect\nfrom django.contrib.auth.forms import UserCreationForm, AuthenticationForm\nfrom django.contrib.auth import login, logout\nfrom django.contrib.auth.decorators import login_required\nfrom authentication.models import Document\n\n@login_required\ndef create_document(request):\n    if request.method == 'POST':\n        title = request.POST['title']\n        content = request.POST['content']\n        Document.objects.create(title=title, content=content, owner=request.user)\n        return redirect('\/')\n    return render(request, 'create_document.html')\n\n@login_required\ndef view_document(request, document_id):\n    document = Document.objects.get(id=document_id)\n    if document.owner == request.user:\n        return render(request, 'view_document.html', {'document': document})\n    else:\n        return render(request, 'access_denied.html')\n\n@login_required\ndef delete_document(request, document_id):\n    document = Document.objects.get(id=document_id)\n    if document.owner == request.user:\n        document.delete()\n        return redirect('\/')\n    else:\n        return render(request, 'access_denied.html')\n<\/code><\/pre>\n

    In these views, we use the @login_required<\/code> decorator to ensure that only authenticated users can access them. The create_document<\/code> view allows the user to create a new document. The view_document<\/code> view displays a document if the authenticated user is the owner, otherwise it renders an “Access Denied” page. The delete_document<\/code> view only allows the owner to delete a document.<\/p>\n

    To test these views, create the HTML templates for creating and viewing documents. Inside the authentication\/templates<\/code> directory, create a new file called create_document.html<\/code> with the following code:<\/p>\n

    {% extends 'base.html' %}\n\n{% block content %}\n  <h2>Create Document<\/h2>\n  <form method=\"post\" action=\"\/create\/\">\n    {% csrf_token %}\n    <input type=\"text\" name=\"title\" placeholder=\"Title\">\n    <textarea name=\"content\" placeholder=\"Content\"><\/textarea>\n    <button type=\"submit\">Create<\/button>\n  <\/form>\n{% endblock %}\n<\/code><\/pre>\n

    And another file called view_document.html<\/code> with the following code:<\/p>\n

    {% extends 'base.html' %}\n\n{% block content %}\n  <h2>{{ document.title }}<\/h2>\n  <p>{{ document.content }}<\/p>\n  <a href=\"\/delete\/{{ document.id }}\">Delete<\/a>\n{% endblock %}\n<\/code><\/pre>\n

    We also need to create an access_denied.html<\/code> template to display when a user tries to access a document they don’t own. Add the following code to a new file called access_denied.html<\/code>:<\/p>\n

    {% extends 'base.html' %}\n\n{% block content %}\n  <h2>Access Denied<\/h2>\n  <p>You don't have permission to access this document.<\/p>\n{% endblock %}\n<\/code><\/pre>\n

    5. Securing static files<\/h2>\n

    In addition to securing views and resources, it’s important to secure static files such as CSS, JavaScript, and images. Django provides a secure way to serve static files in production using the collectstatic<\/code> command.<\/p>\n

    Start by creating a new directory called static<\/code> at the same level as manage.py<\/code>. Inside the static<\/code> directory, create another directory called css<\/code>. In the css<\/code> directory, create a new file called styles.css<\/code> with the following code:<\/p>\n

    body {\n  background-color: #f1f1f1;\n  font-family: Arial, sans-serif;\n}\n\nh1 {\n  color: #333333;\n}\n\np {\n  color: #666666;\n}\n<\/code><\/pre>\n

    Next, open myproject\/settings.py<\/code> and add the following lines at the end of the file:<\/p>\n

    STATIC_URL = '\/static\/'\nSTATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')\nSTATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]\n<\/code><\/pre>\n

    These lines configure Django to serve static files from the static<\/code> directory.<\/p>\n

    Finally, run the following command to collect the static files into a single directory:<\/p>\n

    python manage.py collectstatic\n<\/code><\/pre>\n

    This will collect the static files from the static<\/code> directory and copy them to the staticfiles<\/code> directory.<\/p>\n

    To include the CSS file in our templates, update the base.html<\/code> file inside the templates<\/code> directory with the following code:<\/p>\n

    <!DOCTYPE html>\n<html>\n<head>\n  <title>My Project<\/title>\n  <link rel=\"stylesheet\" type=\"text\/css\" href=\"{% static 'css\/styles.css' %}\">\n<\/head>\n<body>\n  <h1>My Project<\/h1>\n  {% block content %}\n  {% endblock %}\n<\/body>\n<\/html>\n<\/code><\/pre>\n

    The {% static 'css\/styles.css' %}<\/code> code generates the correct URL for the CSS file.<\/p>\n

    And that’s it! You have successfully implemented authentication and authorization in your Django project. You now have user registration and login functionality, as well as authorization for certain views and resources.<\/p>\n

    Conclusion<\/h2>\n

    In this tutorial, we have covered the steps to implement authentication and authorization in a Django application. We started by creating user registration and login views using Django’s built-in forms. We then configured the authentication backend and updated the project’s URLs to enable user authentication. Next, we added authorization to our views to control access based on user permissions. Finally, we secured static files by serving them in a production environment.<\/p>\n

    Authentication and authorization are important security measures that every web application should implement. With Django’s built-in support, you can easily add these features to your application and ensure that only authorized users can access certain resources.<\/p>\n","protected":false},"excerpt":{"rendered":"

    Authentication and authorization are essential components of any web application. They allow you to control access to different resources and ensure that only authorized users can perform certain actions. Django, a popular Python web framework, provides built-in support for implementing authentication and authorization. In this tutorial, we will cover the Continue Reading<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"categories":[1],"tags":[366,877,117,75,878,49],"yoast_head":"\nHow to Implement Authentication and Authorization with Django - Pantherax Blogs<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/localhost:10003\/how-to-implement-authentication-and-authorization-with-django\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Implement Authentication and Authorization with Django\" \/>\n<meta property=\"og:description\" content=\"Authentication and authorization are essential components of any web application. They allow you to control access to different resources and ensure that only authorized users can perform certain actions. Django, a popular Python web framework, provides built-in support for implementing authentication and authorization. In this tutorial, we will cover the Continue Reading\" \/>\n<meta property=\"og:url\" content=\"http:\/\/localhost:10003\/how-to-implement-authentication-and-authorization-with-django\/\" \/>\n<meta property=\"og:site_name\" content=\"Pantherax Blogs\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-04T23:14:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-05T05:48:24+00:00\" \/>\n<meta name=\"author\" content=\"Panther\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Panther\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t \"@context\": \"https:\/\/schema.org\",\n\t \"@graph\": [\n\t {\n\t \"@type\": \"Article\",\n\t \"@id\": \"http:\/\/localhost:10003\/how-to-implement-authentication-and-authorization-with-django\/#article\",\n\t \"isPartOf\": {\n\t \"@id\": \"http:\/\/localhost:10003\/how-to-implement-authentication-and-authorization-with-django\/\"\n\t },\n\t \"author\": {\n\t \"name\": \"Panther\",\n\t \"@id\": \"http:\/\/localhost:10003\/#\/schema\/person\/b63d816f4964b163e53cbbcffaa0f3d7\"\n\t },\n\t \"headline\": \"How to Implement Authentication and Authorization with Django\",\n\t \"datePublished\": \"2023-11-04T23:14:00+00:00\",\n\t \"dateModified\": \"2023-11-05T05:48:24+00:00\",\n\t \"mainEntityOfPage\": {\n\t \"@id\": \"http:\/\/localhost:10003\/how-to-implement-authentication-and-authorization-with-django\/\"\n\t },\n\t \"wordCount\": 926,\n\t \"publisher\": {\n\t \"@id\": \"http:\/\/localhost:10003\/#organization\"\n\t },\n\t \"keywords\": [\n\t \"\\\"authentication\\\"\",\n\t \"\\\"Authorization\\\"\",\n\t \"\\\"Django\\\"\",\n\t \"\\\"Python\\\"\",\n\t \"\\\"User Management\\\"]\",\n\t \"\\\"Web development\\\"\"\n\t ],\n\t \"inLanguage\": \"en-US\"\n\t },\n\t {\n\t \"@type\": \"WebPage\",\n\t \"@id\": \"http:\/\/localhost:10003\/how-to-implement-authentication-and-authorization-with-django\/\",\n\t \"url\": \"http:\/\/localhost:10003\/how-to-implement-authentication-and-authorization-with-django\/\",\n\t \"name\": \"How to Implement Authentication and Authorization with Django - Pantherax Blogs\",\n\t \"isPartOf\": {\n\t \"@id\": \"http:\/\/localhost:10003\/#website\"\n\t },\n\t \"datePublished\": \"2023-11-04T23:14:00+00:00\",\n\t \"dateModified\": \"2023-11-05T05:48:24+00:00\",\n\t \"breadcrumb\": {\n\t \"@id\": \"http:\/\/localhost:10003\/how-to-implement-authentication-and-authorization-with-django\/#breadcrumb\"\n\t },\n\t \"inLanguage\": \"en-US\",\n\t \"potentialAction\": [\n\t {\n\t \"@type\": \"ReadAction\",\n\t \"target\": [\n\t \"http:\/\/localhost:10003\/how-to-implement-authentication-and-authorization-with-django\/\"\n\t ]\n\t }\n\t ]\n\t },\n\t {\n\t \"@type\": \"BreadcrumbList\",\n\t \"@id\": \"http:\/\/localhost:10003\/how-to-implement-authentication-and-authorization-with-django\/#breadcrumb\",\n\t \"itemListElement\": [\n\t {\n\t \"@type\": \"ListItem\",\n\t \"position\": 1,\n\t \"name\": \"Home\",\n\t \"item\": \"http:\/\/localhost:10003\/\"\n\t },\n\t {\n\t \"@type\": \"ListItem\",\n\t \"position\": 2,\n\t \"name\": \"How to Implement Authentication and Authorization with Django\"\n\t }\n\t ]\n\t },\n\t {\n\t \"@type\": \"WebSite\",\n\t \"@id\": \"http:\/\/localhost:10003\/#website\",\n\t \"url\": \"http:\/\/localhost:10003\/\",\n\t \"name\": \"Pantherax Blogs\",\n\t \"description\": \"\",\n\t \"publisher\": {\n\t \"@id\": \"http:\/\/localhost:10003\/#organization\"\n\t },\n\t \"potentialAction\": [\n\t {\n\t \"@type\": \"SearchAction\",\n\t \"target\": {\n\t \"@type\": \"EntryPoint\",\n\t \"urlTemplate\": \"http:\/\/localhost:10003\/?s={search_term_string}\"\n\t },\n\t \"query-input\": \"required name=search_term_string\"\n\t }\n\t ],\n\t \"inLanguage\": \"en-US\"\n\t },\n\t {\n\t \"@type\": \"Organization\",\n\t \"@id\": \"http:\/\/localhost:10003\/#organization\",\n\t \"name\": \"Pantherax Blogs\",\n\t \"url\": \"http:\/\/localhost:10003\/\",\n\t \"logo\": {\n\t \"@type\": \"ImageObject\",\n\t \"inLanguage\": \"en-US\",\n\t \"@id\": \"http:\/\/localhost:10003\/#\/schema\/logo\/image\/\",\n\t \"url\": \"http:\/\/localhost:10003\/wp-content\/uploads\/2023\/11\/cropped-9e7721cb-2d62-4f72-ab7f-7d1d8db89226.jpeg\",\n\t \"contentUrl\": \"http:\/\/localhost:10003\/wp-content\/uploads\/2023\/11\/cropped-9e7721cb-2d62-4f72-ab7f-7d1d8db89226.jpeg\",\n\t \"width\": 1024,\n\t \"height\": 1024,\n\t \"caption\": \"Pantherax Blogs\"\n\t },\n\t \"image\": {\n\t \"@id\": \"http:\/\/localhost:10003\/#\/schema\/logo\/image\/\"\n\t }\n\t },\n\t {\n\t \"@type\": \"Person\",\n\t \"@id\": \"http:\/\/localhost:10003\/#\/schema\/person\/b63d816f4964b163e53cbbcffaa0f3d7\",\n\t \"name\": \"Panther\",\n\t \"image\": {\n\t \"@type\": \"ImageObject\",\n\t \"inLanguage\": \"en-US\",\n\t \"@id\": \"http:\/\/localhost:10003\/#\/schema\/person\/image\/\",\n\t \"url\": \"http:\/\/2.gravatar.com\/avatar\/b8c0eda5a49f8f31ec32d0a0f9d6f838?s=96&d=mm&r=g\",\n\t \"contentUrl\": \"http:\/\/2.gravatar.com\/avatar\/b8c0eda5a49f8f31ec32d0a0f9d6f838?s=96&d=mm&r=g\",\n\t \"caption\": \"Panther\"\n\t },\n\t \"sameAs\": [\n\t \"http:\/\/localhost:10003\"\n\t ],\n\t \"url\": \"http:\/\/localhost:10003\/author\/pepethefrog\/\"\n\t }\n\t ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Implement Authentication and Authorization with Django - Pantherax Blogs","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/localhost:10003\/how-to-implement-authentication-and-authorization-with-django\/","og_locale":"en_US","og_type":"article","og_title":"How to Implement Authentication and Authorization with Django","og_description":"Authentication and authorization are essential components of any web application. They allow you to control access to different resources and ensure that only authorized users can perform certain actions. Django, a popular Python web framework, provides built-in support for implementing authentication and authorization. In this tutorial, we will cover the Continue Reading","og_url":"http:\/\/localhost:10003\/how-to-implement-authentication-and-authorization-with-django\/","og_site_name":"Pantherax Blogs","article_published_time":"2023-11-04T23:14:00+00:00","article_modified_time":"2023-11-05T05:48:24+00:00","author":"Panther","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Panther","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/localhost:10003\/how-to-implement-authentication-and-authorization-with-django\/#article","isPartOf":{"@id":"http:\/\/localhost:10003\/how-to-implement-authentication-and-authorization-with-django\/"},"author":{"name":"Panther","@id":"http:\/\/localhost:10003\/#\/schema\/person\/b63d816f4964b163e53cbbcffaa0f3d7"},"headline":"How to Implement Authentication and Authorization with Django","datePublished":"2023-11-04T23:14:00+00:00","dateModified":"2023-11-05T05:48:24+00:00","mainEntityOfPage":{"@id":"http:\/\/localhost:10003\/how-to-implement-authentication-and-authorization-with-django\/"},"wordCount":926,"publisher":{"@id":"http:\/\/localhost:10003\/#organization"},"keywords":["\"authentication\"","\"Authorization\"","\"Django\"","\"Python\"","\"User Management\"]","\"Web development\""],"inLanguage":"en-US"},{"@type":"WebPage","@id":"http:\/\/localhost:10003\/how-to-implement-authentication-and-authorization-with-django\/","url":"http:\/\/localhost:10003\/how-to-implement-authentication-and-authorization-with-django\/","name":"How to Implement Authentication and Authorization with Django - Pantherax Blogs","isPartOf":{"@id":"http:\/\/localhost:10003\/#website"},"datePublished":"2023-11-04T23:14:00+00:00","dateModified":"2023-11-05T05:48:24+00:00","breadcrumb":{"@id":"http:\/\/localhost:10003\/how-to-implement-authentication-and-authorization-with-django\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/localhost:10003\/how-to-implement-authentication-and-authorization-with-django\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/localhost:10003\/how-to-implement-authentication-and-authorization-with-django\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/localhost:10003\/"},{"@type":"ListItem","position":2,"name":"How to Implement Authentication and Authorization with Django"}]},{"@type":"WebSite","@id":"http:\/\/localhost:10003\/#website","url":"http:\/\/localhost:10003\/","name":"Pantherax Blogs","description":"","publisher":{"@id":"http:\/\/localhost:10003\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/localhost:10003\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"http:\/\/localhost:10003\/#organization","name":"Pantherax Blogs","url":"http:\/\/localhost:10003\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/localhost:10003\/#\/schema\/logo\/image\/","url":"http:\/\/localhost:10003\/wp-content\/uploads\/2023\/11\/cropped-9e7721cb-2d62-4f72-ab7f-7d1d8db89226.jpeg","contentUrl":"http:\/\/localhost:10003\/wp-content\/uploads\/2023\/11\/cropped-9e7721cb-2d62-4f72-ab7f-7d1d8db89226.jpeg","width":1024,"height":1024,"caption":"Pantherax Blogs"},"image":{"@id":"http:\/\/localhost:10003\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"http:\/\/localhost:10003\/#\/schema\/person\/b63d816f4964b163e53cbbcffaa0f3d7","name":"Panther","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/localhost:10003\/#\/schema\/person\/image\/","url":"http:\/\/2.gravatar.com\/avatar\/b8c0eda5a49f8f31ec32d0a0f9d6f838?s=96&d=mm&r=g","contentUrl":"http:\/\/2.gravatar.com\/avatar\/b8c0eda5a49f8f31ec32d0a0f9d6f838?s=96&d=mm&r=g","caption":"Panther"},"sameAs":["http:\/\/localhost:10003"],"url":"http:\/\/localhost:10003\/author\/pepethefrog\/"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/posts\/4023"}],"collection":[{"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/comments?post=4023"}],"version-history":[{"count":1,"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/posts\/4023\/revisions"}],"predecessor-version":[{"id":4519,"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/posts\/4023\/revisions\/4519"}],"wp:attachment":[{"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/media?parent=4023"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/categories?post=4023"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/tags?post=4023"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}