{"id":112,"date":"2024-02-17T05:00:43","date_gmt":"2024-02-17T05:00:43","guid":{"rendered":"https:\/\/mrcoder701.com\/?p=112"},"modified":"2024-03-15T16:56:51","modified_gmt":"2024-03-15T11:26:51","slug":"custom-user-in-django","status":"publish","type":"post","link":"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/","title":{"rendered":"Custom User in Django"},"content":{"rendered":"

Custom User Model in Django <\/p>

\"\"<\/figure>

This post explains step-by-step how to create a custom User model<\/a> in Django.<\/p>

Objectives<\/h1>

By the end of this article, you should be able to:<\/p>

  1. Describe the difference between AbstractUser<\/code> and AbstractBaseUser<\/code><\/li>\n\n
  2. Explain why you should set up a custom User model when starting a new Django project<\/li>\n\n
  3. Start a new Django project with a custom User model<\/li>\n\n
  4. Adding Custom fields like avatar, MobileNo fields<\/li>\n\n
  5. Practice test-first development while implementing a custom User model<\/li><\/ol>

    AbstractUser vs AbstractBaseUser<\/h1>

    Django documentation<\/a> says that AbstractUser<\/strong> provides the full implementation of the default User<\/strong> as an abstract model, which means you will get the complete fields which come with User<\/strong> model plus the fields that you define.<\/p>

    Example<\/strong><\/p>

    from django.db import models\nfrom django.contrib.auth.models import AbstractUser\n\nclass MyUser(AbstractUser):\n    address = models.CharField(max_length=30, blank=True)\n    birth_date = models.DateField()<\/code><\/pre>

    In the above example, you will get all the fields of the User<\/strong> model plus the fields we defined here which are address<\/strong> and birth_date<\/strong><\/p>

    AbstractBaseUser<\/strong> has the authentication functionality only , it has no actual fields, you will supply the fields to use when you subclass.<\/p>

    You also have to tell it what field will represents the username, the fields that are required, and how those users will be managed.<\/p>

    Lets say you want to use email<\/strong> in your authentication , Django normally uses username<\/strong> in authentication, so how do you change it to use email<\/strong> ?<\/p>

    Example<\/strong><\/h1>
    from django.db import models\nfrom django.contrib.auth.models import  AbstractBaseUser\n\nclass MyUser(AbstractBaseUser):\n    email = models.EmailField(\n        verbose_name='email address',\n        max_length=255,\n        unique=True,\n    )\n    date_of_birth = models.DateField()\n    is_active = models.BooleanField(default=True)\n    is_admin = models.BooleanField(default=False)\n    objects = MyUserManager()\n    USERNAME_FIELD = 'email'\n    REQUIRED_FIELDS = ['date_of_birth']<\/code><\/pre>

    USERNAME_FIELD<\/strong> is a string describing the name of the field on the user model that is used as the unique identifier.<\/p>

    In the above example, the field email<\/strong> is used as the identifying field.<\/p>

    It is important to note that you can also set email<\/strong> as your unique identifier by using AbstractUser<\/strong>, this can be done by setting username = None <\/code>and USERNAME_FIELD = 'email'<\/code><\/strong><\/p>

    Project Setup<\/h1>

    Start by creating a new Django project along with a users app:<\/p>

    $ mkdir custom-user-model && cd custom-user-model
    $ python3 -m venv env
    $ source env\/bin\/activate(env)$ pip install Django==3.2.2
    (env)$ django-admin startproject customeUsesr.
    (env)$ python manage.py startapp account<\/p>

    Feel free to swap out virtualenv and Pip for <\/em>Poetry<\/em><\/a> or <\/em>Pipenv<\/em><\/a>. For more, review <\/em>Modern Python Environments<\/em><\/a>.<\/em><\/p><\/blockquote>

    DO NOT apply the migrations. Remember: You must create the custom User model before<\/em> you apply your first migration.<\/p>

    Add the new app to the INSTALLED_APPS<\/code> list in settings.py<\/em>:<\/p>


    1)<\/strong> first comment in installed_apps this line 'django.contrib.admin',<\/strong><\/code><\/p>

    INSTALLED_APPS = [\n#'django.contrib.admin',\n'django.contrib.auth',\n'django.contrib.contenttypes',\n'django.contrib.sessions',\n'django.contrib.messages',\n'django.contrib.staticfiles',\n'account',\n]<\/code><\/pre>

    2)<\/strong> second comment in urls file path(\u2018admin\/\u2019, admin.site.urls)<\/p>

    <\/p>

    from django.contrib import admin\nfrom django.urls import path\n\nurlpatterns = [\n   #path('admin\/', admin.site.urls),\n]<\/code><\/pre>

    <\/p>

    3)<\/strong> open account folder and open file Models.py<\/p>

    from django.db import models\nfrom django.contrib.auth.models import AbstractUser\nfrom django.utils.translation import ugettext_lazy as _\n\n# Create your models here.\nclass User(AbstractUser):\n    username = models.CharField(max_length=30, unique=True)\n    email = models.EmailField(_('email address'),     max_length=254,unique=True, null=True, blank=True)\n    avtar = models.ImageField(upload_to='thumbpath', blank=True)\n    mobile_no = models.CharField(max_lenght=15)\n    class Meta(AbstractUser.Meta):\n       swappable = 'AUTH_USER_MODEL'<\/code><\/pre>

    Settings<\/h1>

    Add the following line to the settings.py<\/em> file so that Django knows to use the new User class:<\/p>

    AUTH_USER_MODEL = 'account.User'\nswappable = 'AUTH_USER_MODEL'<\/code><\/pre>

    Now, you can create and apply the migrations, which will create a new database that uses the custom User model.<\/p>

    (env)$ python manage.py makemigrations
    (env)$ python manage.py migrate<\/p>

    Then now uncomment the INSTALLED_APPS<\/code> list in settings.py
    <\/em>Uncomment in installed_apps this line'django.contrib.admin',<\/code>INSTALLED_APPS <\/p>

    INSTALLED_APPS = [\n    'django.contrib.admin',\n    'django.contrib.auth',\n    'django.contrib.contenttypes',\n    'django.contrib.sessions',\n    'django.contrib.messages',\n    'django.contrib.staticfiles',\n    'account',\n]<\/code><\/pre>

    second uncomment in urls file path(\u2018admin\/\u2019, admin.site.urls)<\/strong><\/p>

    from django.contrib import admin\nfrom django.urls import path\nurlpatterns = [\n   path('admin\/', admin.site.urls),\n]<\/code><\/pre>

    * create a superuser.(env)$<\/p>

    python manage.py createsuperuserEmail address: test@test.com
    Password:
    Password (again):
    Superuser created successfully.<\/p>

    *then later open \/account\/admin.py register user model<\/p>

    from django.contrib import admin\nfrom .models import User, UserProfile\n# Register your models here.\nadmin.site.register(User)<\/code><\/pre>
    \"\"<\/figure>
    \"\"<\/figure>

    Conclusion<\/h1>

    In this post, we looked at how to create a custom User model<\/p>

    You can find the final code for both options, AbstractUser<\/code> and AbstractBaseUser<\/code>, in the django-custom-user-model<\/a> repo.<\/p>

    Let\u2019s Get in Touch! Follow me on:<\/p>

    >Instagram: @rajput_gajanan_07<\/a>.<\/p>

    >GitHub: @gajanan0707<\/a><\/p>

    >Linkedin: Gajanan Rajput<\/a><\/p>

    >Medium: https:\/\/medium.com\/@rajputgajanan50<\/a><\/p>

    <\/p>

    <\/p>

    <\/p>

    <\/p>

    <\/p>

    <\/p>

    <\/p>

    <\/p>","protected":false},"excerpt":{"rendered":"

    Dive into the essentials of Custom User in Django and discover how to tailor the authentication system for scalability, security, and efficiency. This guide covers everything from planning and creation to integration and troubleshooting, providing a comprehensive roadmap for developers looking to customize their user model in Django projects<\/p>\n","protected":false},"author":2,"featured_media":293,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[115,17],"tags":[20,21,18,19,38,37,36,39,32,31],"class_list":["post-112","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-django","category-programming","tag-google","tag-medium","tag-python","tag-python3","tag-abstract_user","tag-custom_user_in_django","tag-django","tag-django_models","tag-programmingtips","tag-pythondev"],"yoast_head":"\nCustom User in Django - 🌟Code with MrCoder7️⃣0️⃣1️⃣<\/title>\n<meta name=\"description\" content=\"Unlock the full potential of your Django projects with a custom user model. Learn the ins and outs of implementing, customizing, and leveraging a Custom User in Django for enhanced flexibility, security, and performance. Perfect for developers aiming to elevate their web applications.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Custom User in Django - 🌟Code with MrCoder7️⃣0️⃣1️⃣\" \/>\n<meta property=\"og:description\" content=\"Unlock the full potential of your Django projects with a custom user model. Learn the ins and outs of implementing, customizing, and leveraging a Custom User in Django for enhanced flexibility, security, and performance. Perfect for developers aiming to elevate their web applications.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/\" \/>\n<meta property=\"og:site_name\" content=\"🌟Code with MrCoder7️⃣0️⃣1️⃣\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-17T05:00:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-15T11:26:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.mrcoder701.com\/wp-content\/uploads\/2024\/02\/Wardiere-In.-5.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2240\" \/>\n\t<meta property=\"og:image:height\" content=\"1260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"mr.coder\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"mr.coder\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/\"},\"author\":{\"name\":\"mr.coder\",\"@id\":\"https:\/\/www.mrcoder701.com\/#\/schema\/person\/ba1cd6b2ad26df384b1a655341eaef5d\"},\"headline\":\"Custom User in Django\",\"datePublished\":\"2024-02-17T05:00:43+00:00\",\"dateModified\":\"2024-03-15T11:26:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/\"},\"wordCount\":601,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/www.mrcoder701.com\/#\/schema\/person\/ba1cd6b2ad26df384b1a655341eaef5d\"},\"image\":{\"@id\":\"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.mrcoder701.com\/wp-content\/uploads\/2024\/02\/Wardiere-In.-5.png\",\"keywords\":[\"#google\",\"#medium\",\"#python\",\"#python3\",\"abstract_user\",\"custom_user_in_django\",\"Django\",\"django_models\",\"ProgrammingTips\",\"PythonDev\"],\"articleSection\":[\"Django\",\"Programming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/\",\"url\":\"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/\",\"name\":\"Custom User in Django - 🌟Code with MrCoder7️⃣0️⃣1️⃣\",\"isPartOf\":{\"@id\":\"https:\/\/www.mrcoder701.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.mrcoder701.com\/wp-content\/uploads\/2024\/02\/Wardiere-In.-5.png\",\"datePublished\":\"2024-02-17T05:00:43+00:00\",\"dateModified\":\"2024-03-15T11:26:51+00:00\",\"description\":\"Unlock the full potential of your Django projects with a custom user model. Learn the ins and outs of implementing, customizing, and leveraging a Custom User in Django for enhanced flexibility, security, and performance. Perfect for developers aiming to elevate their web applications.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/#primaryimage\",\"url\":\"https:\/\/www.mrcoder701.com\/wp-content\/uploads\/2024\/02\/Wardiere-In.-5.png\",\"contentUrl\":\"https:\/\/www.mrcoder701.com\/wp-content\/uploads\/2024\/02\/Wardiere-In.-5.png\",\"width\":2240,\"height\":1260},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.mrcoder701.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Custom User in Django\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.mrcoder701.com\/#website\",\"url\":\"https:\/\/www.mrcoder701.com\/\",\"name\":\"Blog With MrCoder701\",\"description\":\"Blog related to programming\",\"publisher\":{\"@id\":\"https:\/\/www.mrcoder701.com\/#\/schema\/person\/ba1cd6b2ad26df384b1a655341eaef5d\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.mrcoder701.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.mrcoder701.com\/#\/schema\/person\/ba1cd6b2ad26df384b1a655341eaef5d\",\"name\":\"mr.coder\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.mrcoder701.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.mrcoder701.com\/wp-content\/uploads\/2024\/06\/369B947D-A5EE-4B16-816A-5EE55D1DDF96_L0_001-10_6_2024-6-13-24-PM.png\",\"contentUrl\":\"https:\/\/www.mrcoder701.com\/wp-content\/uploads\/2024\/06\/369B947D-A5EE-4B16-816A-5EE55D1DDF96_L0_001-10_6_2024-6-13-24-PM.png\",\"width\":500,\"height\":500,\"caption\":\"mr.coder\"},\"logo\":{\"@id\":\"https:\/\/www.mrcoder701.com\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/mrcoder701.com\",\"https:\/\/www.instagram.com\/mr_coder_701\/\",\"https:\/\/www.youtube.com\/@mrcoder701\"],\"url\":\"https:\/\/www.mrcoder701.com\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Custom User in Django - 🌟Code with MrCoder7️⃣0️⃣1️⃣","description":"Unlock the full potential of your Django projects with a custom user model. Learn the ins and outs of implementing, customizing, and leveraging a Custom User in Django for enhanced flexibility, security, and performance. Perfect for developers aiming to elevate their web applications.","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":"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/","og_locale":"en_US","og_type":"article","og_title":"Custom User in Django - 🌟Code with MrCoder7️⃣0️⃣1️⃣","og_description":"Unlock the full potential of your Django projects with a custom user model. Learn the ins and outs of implementing, customizing, and leveraging a Custom User in Django for enhanced flexibility, security, and performance. Perfect for developers aiming to elevate their web applications.","og_url":"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/","og_site_name":"🌟Code with MrCoder7️⃣0️⃣1️⃣","article_published_time":"2024-02-17T05:00:43+00:00","article_modified_time":"2024-03-15T11:26:51+00:00","og_image":[{"width":2240,"height":1260,"url":"https:\/\/www.mrcoder701.com\/wp-content\/uploads\/2024\/02\/Wardiere-In.-5.png","type":"image\/png"}],"author":"mr.coder","twitter_card":"summary_large_image","twitter_misc":{"Written by":"mr.coder","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/#article","isPartOf":{"@id":"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/"},"author":{"name":"mr.coder","@id":"https:\/\/www.mrcoder701.com\/#\/schema\/person\/ba1cd6b2ad26df384b1a655341eaef5d"},"headline":"Custom User in Django","datePublished":"2024-02-17T05:00:43+00:00","dateModified":"2024-03-15T11:26:51+00:00","mainEntityOfPage":{"@id":"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/"},"wordCount":601,"commentCount":1,"publisher":{"@id":"https:\/\/www.mrcoder701.com\/#\/schema\/person\/ba1cd6b2ad26df384b1a655341eaef5d"},"image":{"@id":"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mrcoder701.com\/wp-content\/uploads\/2024\/02\/Wardiere-In.-5.png","keywords":["#google","#medium","#python","#python3","abstract_user","custom_user_in_django","Django","django_models","ProgrammingTips","PythonDev"],"articleSection":["Django","Programming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/","url":"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/","name":"Custom User in Django - 🌟Code with MrCoder7️⃣0️⃣1️⃣","isPartOf":{"@id":"https:\/\/www.mrcoder701.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/#primaryimage"},"image":{"@id":"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mrcoder701.com\/wp-content\/uploads\/2024\/02\/Wardiere-In.-5.png","datePublished":"2024-02-17T05:00:43+00:00","dateModified":"2024-03-15T11:26:51+00:00","description":"Unlock the full potential of your Django projects with a custom user model. Learn the ins and outs of implementing, customizing, and leveraging a Custom User in Django for enhanced flexibility, security, and performance. Perfect for developers aiming to elevate their web applications.","breadcrumb":{"@id":"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/#primaryimage","url":"https:\/\/www.mrcoder701.com\/wp-content\/uploads\/2024\/02\/Wardiere-In.-5.png","contentUrl":"https:\/\/www.mrcoder701.com\/wp-content\/uploads\/2024\/02\/Wardiere-In.-5.png","width":2240,"height":1260},{"@type":"BreadcrumbList","@id":"https:\/\/www.mrcoder701.com\/2024\/02\/17\/custom-user-in-django\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.mrcoder701.com\/"},{"@type":"ListItem","position":2,"name":"Custom User in Django"}]},{"@type":"WebSite","@id":"https:\/\/www.mrcoder701.com\/#website","url":"https:\/\/www.mrcoder701.com\/","name":"Blog With MrCoder701","description":"Blog related to programming","publisher":{"@id":"https:\/\/www.mrcoder701.com\/#\/schema\/person\/ba1cd6b2ad26df384b1a655341eaef5d"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mrcoder701.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.mrcoder701.com\/#\/schema\/person\/ba1cd6b2ad26df384b1a655341eaef5d","name":"mr.coder","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mrcoder701.com\/#\/schema\/person\/image\/","url":"https:\/\/www.mrcoder701.com\/wp-content\/uploads\/2024\/06\/369B947D-A5EE-4B16-816A-5EE55D1DDF96_L0_001-10_6_2024-6-13-24-PM.png","contentUrl":"https:\/\/www.mrcoder701.com\/wp-content\/uploads\/2024\/06\/369B947D-A5EE-4B16-816A-5EE55D1DDF96_L0_001-10_6_2024-6-13-24-PM.png","width":500,"height":500,"caption":"mr.coder"},"logo":{"@id":"https:\/\/www.mrcoder701.com\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/mrcoder701.com","https:\/\/www.instagram.com\/mr_coder_701\/","https:\/\/www.youtube.com\/@mrcoder701"],"url":"https:\/\/www.mrcoder701.com\/author\/admin\/"}]}},"rttpg_featured_image_url":{"full":["https:\/\/www.mrcoder701.com\/wp-content\/uploads\/2024\/02\/Wardiere-In.-5.png",2240,1260,false],"landscape":["https:\/\/www.mrcoder701.com\/wp-content\/uploads\/2024\/02\/Wardiere-In.-5.png",2240,1260,false],"portraits":["https:\/\/www.mrcoder701.com\/wp-content\/uploads\/2024\/02\/Wardiere-In.-5.png",2240,1260,false],"thumbnail":["https:\/\/www.mrcoder701.com\/wp-content\/uploads\/2024\/02\/Wardiere-In.-5-150x150.png",150,150,true],"medium":["https:\/\/www.mrcoder701.com\/wp-content\/uploads\/2024\/02\/Wardiere-In.-5-300x169.png",300,169,true],"large":["https:\/\/www.mrcoder701.com\/wp-content\/uploads\/2024\/02\/Wardiere-In.-5-1024x576.png",1024,576,true],"1536x1536":["https:\/\/www.mrcoder701.com\/wp-content\/uploads\/2024\/02\/Wardiere-In.-5-1536x864.png",1536,864,true],"2048x2048":["https:\/\/www.mrcoder701.com\/wp-content\/uploads\/2024\/02\/Wardiere-In.-5-2048x1152.png",2048,1152,true],"woocommerce_thumbnail":["https:\/\/www.mrcoder701.com\/wp-content\/uploads\/2024\/02\/Wardiere-In.-5-300x300.png",300,300,true],"woocommerce_single":["https:\/\/www.mrcoder701.com\/wp-content\/uploads\/2024\/02\/Wardiere-In.-5.png",600,338,false],"woocommerce_gallery_thumbnail":["https:\/\/www.mrcoder701.com\/wp-content\/uploads\/2024\/02\/Wardiere-In.-5-150x150.png",150,150,true]},"rttpg_author":{"display_name":"mr.coder","author_link":"https:\/\/www.mrcoder701.com\/author\/admin\/"},"rttpg_comment":1,"rttpg_category":"<a href=\"https:\/\/www.mrcoder701.com\/category\/django\/\" rel=\"category tag\">Django<\/a> <a href=\"https:\/\/www.mrcoder701.com\/category\/programming\/\" rel=\"category tag\">Programming<\/a>","rttpg_excerpt":"Dive into the essentials of Custom User in Django and discover how to tailor the authentication system for scalability, security, and efficiency. This guide covers everything from planning and creation to integration and troubleshooting, providing a comprehensive roadmap for developers looking to customize their user model in Django projects","_links":{"self":[{"href":"https:\/\/www.mrcoder701.com\/wp-json\/wp\/v2\/posts\/112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mrcoder701.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mrcoder701.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mrcoder701.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mrcoder701.com\/wp-json\/wp\/v2\/comments?post=112"}],"version-history":[{"count":8,"href":"https:\/\/www.mrcoder701.com\/wp-json\/wp\/v2\/posts\/112\/revisions"}],"predecessor-version":[{"id":301,"href":"https:\/\/www.mrcoder701.com\/wp-json\/wp\/v2\/posts\/112\/revisions\/301"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mrcoder701.com\/wp-json\/wp\/v2\/media\/293"}],"wp:attachment":[{"href":"https:\/\/www.mrcoder701.com\/wp-json\/wp\/v2\/media?parent=112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mrcoder701.com\/wp-json\/wp\/v2\/categories?post=112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mrcoder701.com\/wp-json\/wp\/v2\/tags?post=112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}