{"id":75919,"date":"2020-01-20T12:32:49","date_gmt":"2020-01-20T07:02:49","guid":{"rendered":"https:\/\/www.vskills.in\/certification\/tutorial\/?p=75919"},"modified":"2024-04-12T14:17:42","modified_gmt":"2024-04-12T08:47:42","slug":"the-zen-of-admin","status":"publish","type":"page","link":"https:\/\/www.vskills.in\/certification\/tutorial\/the-zen-of-admin\/","title":{"rendered":"The Zen of Admin"},"content":{"rendered":"<p>At its core, Django\u2019s admin interface is designed for a single activity: Trusted users editing structured content. Yes, it\u2019s extremely simple \u2014 but that simplicity is based on a whole host of assumptions. The entire philosophy of Django\u2019s admin interface follows directly from these assumptions, so let\u2019s dig into the subtext of this phrase in the sections that follow.<\/p>\n<p><strong>\u201cTrusted users \u2026\u201d<\/strong> &#8211; The admin interface is designed to be used by people whom you, the developer, <em>trust<\/em>. This doesn\u2019t just mean \u201cpeople who have been authenticated\u201d; it means that Django assumes that your content editors can be trusted to do the right thing. This in turn means that there\u2019s no approval process for editing content \u2014 if you trust your users, nobody needs to approve of their edits. Another implication is that the permission system, while powerful, has no support for limiting access on a per-object basis as of this writing. If you trust someone to edit his or her own stories, you trust that user not to edit anyone else\u2019s stories without permission.<\/p>\n<p><strong>\u201c\u2026 editing \u2026\u201d<\/strong> &#8211; The primary purpose of Django\u2019s admin interface is to let people edit data. This seems obvious at first, but again it has some subtle and powerful repercussions. For instance, although the admin interface is quite useful for reviewing data (as just described), it\u2019s not designed with that purpose in mind. For example, note the lack of a \u201ccan view\u201d permission (see Chapter 12). Django assumes that if people are allowed to view content in the admin interface, they\u2019re also allowed to edit it.<\/p>\n<p>Another more important thing to note is the lack of anything even remotely approaching \u201cworkflow.\u201d If a given task requires a series of steps, there\u2019s no support for enforcing that those steps be done in any particular order. Django\u2019s admin interface focuses on <em>editing<\/em>, not on activities surrounding editing. This avoidance of workflow also stems from the principle of trust: the admin interface\u2019s philosophy is that workflow is a personnel issue, not something to be implemented in code. Finally, note the lack of aggregation in the admin interface. That is, there\u2019s no support for displaying totals, averages, and so forth. Again, the admin interface is for editing \u2014 it\u2019s expected that you\u2019ll write custom views for all the rest.<\/p>\n<p><strong>\u201c\u2026 structured content\u201d<\/strong> &#8211; As with the rest of Django, the admin interface wants you to work with structured data. Thus, it only supports editing data stored in Django models; for anything else, such as data stored on a filesystem, you\u2019ll need custom views.<\/p>\n<p><strong>Full Stop<\/strong> &#8211; It should be clear by now that Django\u2019s admin interface does <em>not<\/em> try to be all things to all people; instead, we choose to focus tightly on one thing and do that thing extremely well. When it comes to extending Django\u2019s admin interface, much of that same philosophy holds (note that \u201cextensibility\u201d shows up nowhere in our goals). Because custom Django views can do <em>anything<\/em>, and because they can easily be visually integrated into the admin interface (as described in the next section), the built-in opportunities for customizing the admin interface are somewhat limited by design.<\/p>\n<p>You should keep in mind that the admin interface is \u201cjust an app,\u201d albeit a very complicated one. It doesn\u2019t do anything that any Django developer with sufficient time couldn\u2019t reproduce. It\u2019s entirely possible that in the future someone will develop a different admin interface that is based on a different set of assumptions and thus will behave differently.<\/p>\n<p>Finally, we should point out that, as of this writing, Django developers were working on a new version of the admin interface that allows for much more flexibility in customization. By the time you read this, those new features may have made their way into the bona fide Django distribution. To find out, ask somebody in the Django community whether the \u201cnewforms-admin\u201d branch has been integrated.<\/p>\n\n\n<p><a href=\"https:\/\/www.vskills.in\/certification\/tutorial\/certified-django-developer\/\" target=\"_blank\" rel=\"noreferrer noopener\">Back to Tutorial<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>At its core, Django\u2019s admin interface is designed for a single activity: Trusted users editing structured content. Yes, it\u2019s extremely simple \u2014 but that simplicity is based on a whole host of assumptions. The entire philosophy of Django\u2019s admin interface follows directly from these assumptions, so let\u2019s dig into the subtext of this phrase in&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[8655],"tags":[8860],"class_list":["post-75919","page","type-page","status-publish","hentry","category-django-web-development","tag-the-zen-of-admin"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>The Zen of Admin - Tutorial<\/title>\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.vskills.in\/certification\/tutorial\/the-zen-of-admin\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The Zen of Admin - Tutorial\" \/>\n<meta property=\"og:description\" content=\"At its core, Django\u2019s admin interface is designed for a single activity: Trusted users editing structured content. Yes, it\u2019s extremely simple \u2014 but that simplicity is based on a whole host of assumptions. The entire philosophy of Django\u2019s admin interface follows directly from these assumptions, so let\u2019s dig into the subtext of this phrase in...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vskills.in\/certification\/tutorial\/the-zen-of-admin\/\" \/>\n<meta property=\"og:site_name\" content=\"Tutorial\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/vskills.in\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-12T08:47:42+00:00\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/the-zen-of-admin\/\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/the-zen-of-admin\/\",\"name\":\"The Zen of Admin - Tutorial\",\"isPartOf\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#website\"},\"datePublished\":\"2020-01-20T07:02:49+00:00\",\"dateModified\":\"2024-04-12T08:47:42+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/the-zen-of-admin\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.vskills.in\/certification\/tutorial\/the-zen-of-admin\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/the-zen-of-admin\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The Zen of Admin\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#website\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\",\"name\":\"Tutorial\",\"description\":\"Vskills - A initiative in elearning and certification\",\"publisher\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.vskills.in\/certification\/tutorial\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#organization\",\"name\":\"Vskills\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg\",\"contentUrl\":\"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg\",\"width\":73,\"height\":55,\"caption\":\"Vskills\"},\"image\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/vskills.in\/\",\"https:\/\/x.com\/vskills_in\",\"https:\/\/www.linkedin.com\/company-beta\/1371554\/\",\"https:\/\/www.youtube.com\/channel\/UCMWnscxPwRF_PqXo9B7q_Tw\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"The Zen of Admin - Tutorial","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.vskills.in\/certification\/tutorial\/the-zen-of-admin\/","og_locale":"en_US","og_type":"article","og_title":"The Zen of Admin - Tutorial","og_description":"At its core, Django\u2019s admin interface is designed for a single activity: Trusted users editing structured content. Yes, it\u2019s extremely simple \u2014 but that simplicity is based on a whole host of assumptions. The entire philosophy of Django\u2019s admin interface follows directly from these assumptions, so let\u2019s dig into the subtext of this phrase in...","og_url":"https:\/\/www.vskills.in\/certification\/tutorial\/the-zen-of-admin\/","og_site_name":"Tutorial","article_publisher":"https:\/\/www.facebook.com\/vskills.in\/","article_modified_time":"2024-04-12T08:47:42+00:00","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/the-zen-of-admin\/","url":"https:\/\/www.vskills.in\/certification\/tutorial\/the-zen-of-admin\/","name":"The Zen of Admin - Tutorial","isPartOf":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#website"},"datePublished":"2020-01-20T07:02:49+00:00","dateModified":"2024-04-12T08:47:42+00:00","breadcrumb":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/the-zen-of-admin\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vskills.in\/certification\/tutorial\/the-zen-of-admin\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/the-zen-of-admin\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vskills.in\/certification\/tutorial\/"},{"@type":"ListItem","position":2,"name":"The Zen of Admin"}]},{"@type":"WebSite","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#website","url":"https:\/\/www.vskills.in\/certification\/tutorial\/","name":"Tutorial","description":"Vskills - A initiative in elearning and certification","publisher":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.vskills.in\/certification\/tutorial\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#organization","name":"Vskills","url":"https:\/\/www.vskills.in\/certification\/tutorial\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/","url":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg","contentUrl":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg","width":73,"height":55,"caption":"Vskills"},"image":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/vskills.in\/","https:\/\/x.com\/vskills_in","https:\/\/www.linkedin.com\/company-beta\/1371554\/","https:\/\/www.youtube.com\/channel\/UCMWnscxPwRF_PqXo9B7q_Tw"]}]}},"_links":{"self":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/75919","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/comments?post=75919"}],"version-history":[{"count":4,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/75919\/revisions"}],"predecessor-version":[{"id":83421,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/75919\/revisions\/83421"}],"wp:attachment":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/media?parent=75919"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/categories?post=75919"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/tags?post=75919"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}