René's URL Explorer Experiment


Title: Customize the Django Admin With Python – Real Python

Open Graph Title: Customize the Django Admin With Python – Real Python

Description: In this tutorial, you'll learn how to customize Django's admin with Python. You'll use AdminModel objects to add display columns, calculate values, link to referring objects, and search and filter results. You'll also use template overriding to gain full control over the admin's HTML.

Open Graph Description: In this tutorial, you'll learn how to customize Django's admin with Python. You'll use AdminModel objects to add display columns, calculate values, link to referring objects, and search and filter results. You'll also use template overriding to gain full control over the admin's HTML.

Mail addresses
?subject=Python article for you&body=Customize the Django Admin With Python on Real Python https://realpython.com/customize-django-admin-python/

Opengraph URL: https://realpython.com/customize-django-admin-python/

X: @realpython

direct link

Domain: realpython.com


Hey, it has json ld scripts:
{
  "@context": "http://schema.org",
  "@type": "Article",
  "headline": "Customize the Django Admin With Python",
  "image": {
    "@type": "ImageObject",
    "url": "https://files.realpython.com/media/Customizing-the-Django-Admin_Watermarked.93a61880d155.jpg",
    "width": 1920,
    "height": 1080
  },
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://realpython.com/customize-django-admin-python/",
    "lastReviewed": "2024-08-07",
    "author": {
      "@type": "Person",
      "name": "Christopher Trudeau",
      "image": "https://realpython.com/cdn-cgi/image/width=1174,height=1174,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/headshot_alt_crop.4769ad082e9a.jpeg",
      "url": "https://realpython.com/team/ctrudeau/",
      "affiliation": {
        "@type": "Organization",
        "@id": "https://realpython.com/#organization",
        "name": "Real Python",
        "url": "https://realpython.com",
        "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
      }
    },
    "reviewedBy": [
      {
        "@type": "Person",
        "name": "Aldren Santos",
        "image": "https://realpython.com/cdn-cgi/image/width=500,height=500,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Aldren_Santos_Real_Python.6b0861d8b841.png",
        "url": "https://realpython.com/team/asantos/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Brad Solomon",
        "image": "https://realpython.com/cdn-cgi/image/width=1188,height=1188,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Screen_Shot_2021-09-28_at_3.13.21_PM.3310c56e90bd.jpg",
        "url": "https://realpython.com/team/bsolomon/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Geir Arne Hjelle",
        "image": "https://realpython.com/cdn-cgi/image/width=800,height=800,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/gahjelle.470149ee709e.jpg",
        "url": "https://realpython.com/team/gahjelle/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Joanna Jablonski",
        "image": "https://realpython.com/cdn-cgi/image/width=800,height=800,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/jjablonksi-avatar.e37c4f83308e.jpg",
        "url": "https://realpython.com/team/jjablonski/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Jacob Schmitt",
        "image": "https://realpython.com/cdn-cgi/image/width=400,height=400,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/profile-small_js.2f4d0d8da1ca.jpg",
        "url": "https://realpython.com/team/jschmitt/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      }
    ]
  },
  "datePublished": "2020-08-03T14:00:00+00:00",
  "dateModified": "2024-08-07T00:07:21.963915+00:00",
  "publisher": {
    "@type": "Organization",
    "@id": "https://realpython.com/#organization",
    "name": "Real Python",
    "url": "https://realpython.com",
    "logo": {
      "@type": "ImageObject",
      "url": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png",
      "width": 512,
      "height": 512
    },
    "description": "Real Python is a leading provider of online Python education and one of the largest language-specific online communities for software developers. It publishes high-quality learning resources, such as tutorials, books, and courses to an audience of millions of developers, data scientists, and machine learning engineers each month.",
    "slogan": "Become a Python Expert",
    "email": "info@realpython.com",
    "sameAs": [
      "https://github.com/realpython",
      "https://www.youtube.com/realpython",
      "https://twitter.com/realpython",
      "https://x.com/realpython",
      "https://www.linkedin.com/company/realpython-com/",
      "https://www.facebook.com/learnrealpython",
      "https://www.instagram.com/realpython",
      "https://www.tiktok.com/@realpython.com"
    ]
  },
  "author": {
    "@type": "Person",
    "name": "Christopher Trudeau",
    "image": "https://realpython.com/cdn-cgi/image/width=1174,height=1174,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/headshot_alt_crop.4769ad082e9a.jpeg",
    "url": "https://realpython.com/team/ctrudeau/",
    "affiliation": {
      "@type": "Organization",
      "@id": "https://realpython.com/#organization",
      "name": "Real Python",
      "url": "https://realpython.com",
      "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
    }
  },
  "description": "In this tutorial, you'll learn how to customize Django's admin with Python. You'll use AdminModel objects to add display columns, calculate values, link to referring objects, and search and filter results. You'll also use template overriding to gain full control over the admin's HTML."
}

authorReal Python
twitter:cardsummary_large_image
twitter:imagehttps://files.realpython.com/media/Customizing-the-Django-Admin_Watermarked.93a61880d155.jpg
og:imagehttps://files.realpython.com/media/Customizing-the-Django-Admin_Watermarked.93a61880d155.jpg
twitter:creator@realpython
og:typearticle

Links:

https://realpython.com/
Start Herehttps://realpython.com/start-here/
Learn Python https://realpython.com/customize-django-admin-python/
Python Tutorials →In-depth articles and video courseshttps://realpython.com/search?kind=article&kind=course&order=newest
Learning Paths →Guided study plans for accelerated learninghttps://realpython.com/learning-paths/
Quizzes & Exercises →Check your learning progresshttps://realpython.com/quizzes/
Browse Topics →Focus on a specific area or skill levelhttps://realpython.com/tutorials/all/
Community Chat →Learn with other Pythonistashttps://realpython.com/community/
Office Hours →Live Q&A calls with Python expertshttps://realpython.com/office-hours/
Podcast →Hear what’s new in the world of Pythonhttps://realpython.com/podcasts/rpp/
Books →Round out your knowledge and learn offlinehttps://realpython.com/products/books/
Reference →Concise definitions for common Python termshttps://realpython.com/ref/
Code Mentor →BetaPersonalized code assistance & learning toolshttps://realpython.com/mentor/
Unlock All Content →https://realpython.com/account/join/
More https://realpython.com/customize-django-admin-python/
Learner Storieshttps://realpython.com/learner-stories/
Python Newsletterhttps://realpython.com/newsletter/
Python Job Boardhttps://www.pythonjobshq.com
Meet the Teamhttps://realpython.com/team/
Become a Tutorial Writerhttps://realpython.com/write-for-us/
Become a Video Instructorhttps://realpython.com/become-an-instructor/
Searchhttps://realpython.com/search
https://realpython.com/search
Joinhttps://realpython.com/account/join/
Sign‑Inhttps://realpython.com/account/login/?next=%2Fcustomize-django-admin-python%2F
Browse Topicshttps://realpython.com/tutorials/all/
Guided Learning Pathshttps://realpython.com/learning-paths/
Basicshttps://realpython.com/search?level=basics
Intermediatehttps://realpython.com/search?level=intermediate
Advancedhttps://realpython.com/search?level=advanced
aihttps://realpython.com/tutorials/ai/
algorithmshttps://realpython.com/tutorials/algorithms/
apihttps://realpython.com/tutorials/api/
best-practiceshttps://realpython.com/tutorials/best-practices/
careerhttps://realpython.com/tutorials/career/
communityhttps://realpython.com/tutorials/community/
databaseshttps://realpython.com/tutorials/databases/
data-sciencehttps://realpython.com/tutorials/data-science/
data-structureshttps://realpython.com/tutorials/data-structures/
data-vizhttps://realpython.com/tutorials/data-viz/
devopshttps://realpython.com/tutorials/devops/
djangohttps://realpython.com/tutorials/django/
dockerhttps://realpython.com/tutorials/docker/
editorshttps://realpython.com/tutorials/editors/
flaskhttps://realpython.com/tutorials/flask/
front-endhttps://realpython.com/tutorials/front-end/
gamedevhttps://realpython.com/tutorials/gamedev/
guihttps://realpython.com/tutorials/gui/
machine-learninghttps://realpython.com/tutorials/machine-learning/
newshttps://realpython.com/tutorials/news/
numpyhttps://realpython.com/tutorials/numpy/
projectshttps://realpython.com/tutorials/projects/
pythonhttps://realpython.com/tutorials/python/
stdlibhttps://realpython.com/tutorials/stdlib/
testinghttps://realpython.com/tutorials/testing/
toolshttps://realpython.com/tutorials/tools/
web-devhttps://realpython.com/tutorials/web-dev/
web-scrapinghttps://realpython.com/tutorials/web-scraping/
Table of Contentshttps://realpython.com/customize-django-admin-python/#toc
Prerequisiteshttps://realpython.com/customize-django-admin-python/#prerequisites
Setting Up the Django Adminhttps://realpython.com/customize-django-admin-python/#setting-up-the-django-admin
Customizing the Django Adminhttps://realpython.com/customize-django-admin-python/#customizing-the-django-admin
Modifying a Change List Using list_displayhttps://realpython.com/customize-django-admin-python/#modifying-a-change-list-using-list_display
Providing Links to Other Object Pageshttps://realpython.com/customize-django-admin-python/#providing-links-to-other-object-pages
Adding Filters to the List Screenhttps://realpython.com/customize-django-admin-python/#adding-filters-to-the-list-screen
Adding Search to the List Screenhttps://realpython.com/customize-django-admin-python/#adding-search-to-the-list-screen
Changing How Models Are Editedhttps://realpython.com/customize-django-admin-python/#changing-how-models-are-edited
Overriding Django Admin Templateshttps://realpython.com/customize-django-admin-python/#overriding-django-admin-templates
Conclusionhttps://realpython.com/customize-django-admin-python/#conclusion
https://realpython.com/feedback/survey/article/customize-django-admin-python/liked/?from=article-sidebar
https://realpython.com/feedback/survey/article/customize-django-admin-python/disliked/?from=article-sidebar
Django Admin Customization 29m · 11 lessons https://realpython.com/courses/django-admin-customization/
Christopher Trudeauhttps://realpython.com/customize-django-admin-python/#author
https://realpython.com/customize-django-admin-python/#reader-comments
advancedhttps://realpython.com/tutorials/advanced/
djangohttps://realpython.com/tutorials/django/
web-devhttps://realpython.com/tutorials/web-dev/
Prerequisiteshttps://realpython.com/customize-django-admin-python/#prerequisites
Setting Up the Django Adminhttps://realpython.com/customize-django-admin-python/#setting-up-the-django-admin
Customizing the Django Adminhttps://realpython.com/customize-django-admin-python/#customizing-the-django-admin
Modifying a Change List Using list_displayhttps://realpython.com/customize-django-admin-python/#modifying-a-change-list-using-list_display
Providing Links to Other Object Pageshttps://realpython.com/customize-django-admin-python/#providing-links-to-other-object-pages
Adding Filters to the List Screenhttps://realpython.com/customize-django-admin-python/#adding-filters-to-the-list-screen
Adding Search to the List Screenhttps://realpython.com/customize-django-admin-python/#adding-search-to-the-list-screen
Changing How Models Are Editedhttps://realpython.com/customize-django-admin-python/#changing-how-models-are-edited
Overriding Django Admin Templateshttps://realpython.com/customize-django-admin-python/#overriding-django-admin-templates
Conclusionhttps://realpython.com/customize-django-admin-python/#conclusion
Remove adshttps://realpython.com/account/join/
Django Admin Customizationhttps://realpython.com/courses/django-admin-customization/
Djangohttps://www.djangoproject.com/
administrative toolhttps://docs.djangoproject.com/en/3.0/ref/contrib/admin/
Click here to get access to a free Django Learning Resources Guide (PDF)https://realpython.com/bonus/django-resources-learing-guide/
https://realpython.com/customize-django-admin-python/#prerequisites
virtual environmenthttps://realpython.com/python-virtual-environments-a-primer/
Get Started With Django Part 1: Build a Portfolio Apphttps://realpython.com/get-started-with-django-1/
What is Pip? A Guide for New Pythonistashttps://realpython.com/what-is-pip/
Managing Multiple Python Versions With pyenvhttps://realpython.com/intro-to-pyenv/
What Virtual Environments Are Good Forhttps://realpython.com/lessons/what-virtual-environments-are-good-for/
Django tutorialshttps://realpython.com/tutorials/django/
Remove adshttps://realpython.com/account/join/
https://realpython.com/customize-django-admin-python/#setting-up-the-django-admin
Django projecthttps://realpython.com/django-setup/
https://files.realpython.com/media/customize-django-admin-db.ba7ba1f27a98.png
https://files.realpython.com/media/customize-django-admin-core.f29840db4348.png
https://files.realpython.com/media/customize-django-admin-empty-person.132d2d3c6b75.png
listhttps://realpython.com/python-lists-tuples/
https://files.realpython.com/media/customize-django-admin-new-person.a6af5c041147.png
https://files.realpython.com/media/customize-django-admin-person-str.cb626cb94d38.png
Remove adshttps://realpython.com/account/join/
https://realpython.com/customize-django-admin-python/#customizing-the-django-admin
documentationhttps://docs.djangoproject.com/en/3.0/ref/contrib/admin/
create multiple admin siteshttps://docs.djangoproject.com/en/3.0/ref/contrib/admin/#multiple-admin-sites-in-the-same-urlconf
different permissionshttps://realpython.com/manage-users-in-django-admin/
https://realpython.com/customize-django-admin-python/#modifying-a-change-list-using-list_display
stringhttps://realpython.com/python-strings/
https://files.realpython.com/media/customize-django-admin-fname.d7ad0aafad94.png
https://files.realpython.com/media/customize-django-admin-avg.3788bff8b9e3.png
sorting these columnshttps://docs.djangoproject.com/en/3.0/ref/contrib/admin/#django.contrib.admin.ModelAdmin.sortable_by
https://files.realpython.com/media/customize-django-admin-fancy.2e5f9cdf6707.png
f-stringhttps://realpython.com/python-f-strings/
Remove adshttps://realpython.com/account/join/
https://realpython.com/customize-django-admin-python/#providing-links-to-other-object-pages
https://files.realpython.com/media/customize-django-admin-student-link.2ff3a05ec623.png
Xander didn’t make it to universityhttps://www.imdb.com/title/tt0533498/?ref_=ttep_ep1
reverse()https://docs.djangoproject.com/en/3.0/ref/urlresolvers/
field lookupshttps://docs.djangoproject.com/en/3.0/topics/db/queries/#field-lookups
documentationhttps://docs.djangoproject.com/en/3.0/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_display
https://realpython.com/customize-django-admin-python/#adding-filters-to-the-list-screen
https://files.realpython.com/media/customize-django-admin-course-filter.8b2b5fa45ff7.png
filter objectshttps://docs.djangoproject.com/en/3.0/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_filter
Remove adshttps://realpython.com/account/join/
https://realpython.com/customize-django-admin-python/#adding-search-to-the-list-screen
https://files.realpython.com/media/customize-django-admin-search.38ff1f1bb765.png
documentationhttps://docs.djangoproject.com/en/3.0/ref/contrib/admin/#django.contrib.admin.ModelAdmin.get_search_results
https://realpython.com/customize-django-admin-python/#changing-how-models-are-edited
ModelFormhttps://docs.djangoproject.com/en/3.0/topics/forms/modelforms/
https://files.realpython.com/media/customize-django-admin-add-fields.b79a4e061ce0.png
rich validation mechanismhttps://docs.djangoproject.com/en/3.0/topics/forms/modelforms/
https://files.realpython.com/media/customize-django-admin-no-vampires.04edbbfe2d9a.png
Remove adshttps://realpython.com/account/join/
https://realpython.com/customize-django-admin-python/#overriding-django-admin-templates
template mechanismhttps://docs.djangoproject.com/en/3.0/topics/templates/
https://files.realpython.com/media/customize-django-admin-leaving-sunnydale.eb84fcca550e.png
Grappellihttps://grappelliproject.com/
Django Admin Bootstraphttps://github.com/douglasmiranda/django-admin-bootstrap
https://realpython.com/customize-django-admin-python/#conclusion
documentationhttps://docs.djangoproject.com/en/3.0/ref/contrib/admin/
https://realpython.com/feedback/survey/article/customize-django-admin-python/liked/?from=article-footer
https://realpython.com/feedback/survey/article/customize-django-admin-python/disliked/?from=article-footer
Django Admin Customizationhttps://realpython.com/courses/django-admin-customization/
https://realpython.com/team/ctrudeau/
» More about Christopherhttps://realpython.com/team/ctrudeau/
https://realpython.com/team/asantos/
Aldrenhttps://realpython.com/team/asantos/
https://realpython.com/team/bsolomon/
Bradhttps://realpython.com/team/bsolomon/
https://realpython.com/team/gahjelle/
Geir Arnehttps://realpython.com/team/gahjelle/
https://realpython.com/team/jjablonski/
Joannahttps://realpython.com/team/jjablonski/
https://realpython.com/team/jschmitt/
Jacobhttps://realpython.com/team/jschmitt/
Level Up Your Python Skills »https://realpython.com/account/join/?utm_source=rp_article_footer&utm_content=customize-django-admin-python
Level Up Your Python Skills »https://realpython.com/account/join/?utm_source=rp_article_footer&utm_content=customize-django-admin-python
https://realpython.com/feedback/survey/article/customize-django-admin-python/liked/?from=article-comments
https://realpython.com/feedback/survey/article/customize-django-admin-python/disliked/?from=article-comments
LinkedInhttps://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Frealpython.com%2Fcustomize-django-admin-python%2F
Twitterhttps://twitter.com/intent/tweet/?text=Interesting%20Python%20article%20on%20%40realpython%3A%20Customize%20the%20Django%20Admin%20With%20Python&url=https%3A%2F%2Frealpython.com%2Fcustomize-django-admin-python%2F
Blueskyhttps://bsky.app/intent/compose?text=Interesting%20Python%20article%20on%20%40realpython.com%3A%20Customize%20the%20Django%20Admin%20With%20Python%20https%3A%2F%2Frealpython.com%2Fcustomize-django-admin-python%2F
Facebookhttps://facebook.com/sharer/sharer.php?u=https%3A%2F%2Frealpython.com%2Fcustomize-django-admin-python%2F
Get tips for asking good questionshttps://realpython.com/python-beginner-tips/#tip-9-ask-good-questions
get answers to common questions in our support portalhttps://support.realpython.com
Real Python Community Chathttps://realpython.com/community/
“Office Hours” Live Q&A Sessionhttps://realpython.com/office-hours/
advancedhttps://realpython.com/tutorials/advanced/
djangohttps://realpython.com/tutorials/django/
web-devhttps://realpython.com/tutorials/web-dev/
Django Admin Customizationhttps://realpython.com/courses/django-admin-customization/?utm_source=realpython&utm_medium=web&utm_campaign=related-course&utm_content=customize-django-admin-python
What You Need to Know to Manage Users in Django Adminhttps://realpython.com/manage-users-in-django-admin/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=customize-django-admin-python
Get Started With Django User Managementhttps://realpython.com/django-user-management/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=customize-django-admin-python
Getting Started With Testing in Pythonhttps://realpython.com/python-testing/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=customize-django-admin-python
https://realpython.com/account/signup/?intent=continue_reading&utm_source=rp&utm_medium=web&utm_campaign=rwn&utm_content=v1&next=%2Fcustomize-django-admin-python%2F
Continue »https://realpython.com/account/signup/?intent=continue_reading&utm_source=rp&utm_medium=web&utm_campaign=rwn&utm_content=v1&next=%2Fcustomize-django-admin-python%2F
Sign-Inhttps://realpython.com/account/login/?next=/customize-django-admin-python/
Start Herehttps://realpython.com/start-here/
Learning Resourceshttps://realpython.com/search
Code Mentorhttps://realpython.com/mentor/
Python Referencehttps://realpython.com/ref/
Python Cheat Sheethttps://realpython.com/cheatsheets/python/
Support Centerhttps://support.realpython.com/
Learning Pathshttps://realpython.com/learning-paths/
Quizzes & Exerciseshttps://realpython.com/quizzes/
Browse Topicshttps://realpython.com/tutorials/all/
Live Courseshttps://realpython.com/live/
Bookshttps://realpython.com/books/
Podcasthttps://realpython.com/podcasts/rpp/
Newsletterhttps://realpython.com/newsletter/
Community Chathttps://realpython.com/community/
Office Hourshttps://realpython.com/office-hours/
Learner Storieshttps://realpython.com/learner-stories/
Plans & Pricinghttps://realpython.com/account/join/
Team Planshttps://realpython.com/account/join-team/
For Businesshttps://realpython.com/account/join-team/inquiry/
For Schoolshttps://realpython.com/account/join-team/education-inquiry/
Reviewshttps://realpython.com/learner-stories/
About Ushttps://realpython.com/about/
Teamhttps://realpython.com/team/
Mission & Valueshttps://realpython.com/mission/
Editorial Guidelineshttps://realpython.com/editorial-guidelines/
Sponsorshipshttps://realpython.com/sponsorships/
Careershttps://realpython.workable.com
Press Kithttps://realpython.com/media-kit/
Merchhttps://realpython.com/merch
https://www.youtube.com/realpython
https://x.com/realpython
https://www.linkedin.com/company/realpython-com
https://www.facebook.com/LearnRealPython
https://github.com/realpython/
Privacy Policyhttps://realpython.com/privacy-policy/
Terms of Usehttps://realpython.com/terms/
Securityhttps://realpython.com/security/
Contacthttps://realpython.com/contact/
https://realpython.com/

Viewport: width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover

Robots: max-image-preview:large


URLs of crawlers that visited me.