简体   繁体   English

Django Admin应用程序的最佳用途是什么?

[英]What are the best uses for the Django Admin app?

On the website, it says this: 在网站上,它说:

One of the most powerful parts of Django is the automatic admin interface. Django最强大的部分之一是自动管理界面。 It reads metadata in your model to provide a powerful and production-ready interface that content producers can immediately use to start adding content to the site. 它读取模型中的元数据,以提供功能强大且可用于生产的界面,内容生产者可以立即使用该界面开始向网站添加内容。 In this document, we discuss how to activate, use and customize Django's admin interface.admin interface. 在本文档中,我们讨论如何激活,使用和自定义Django的admin interface.admin界面。

So what? 所以呢? I still don't understand what the Admin interface is used for. 我仍然不了解管理界面的用途。 Is it like a PHPMYADMIN? 像PHPMYADMIN吗? Why would I ever need this? 为什么我会需要这个?

Let's say you create a model called Entry. 假设您创建了一个称为Entry的模型。 IE an extremely simple blog. IE浏览器是一个非常简单的博客。 You write a view to show all the entries on the front page. 您编写一个视图以显示首页上的所有条目。 Now how do you put those entries on the webpage? 现在,您如何将这些条目放在网页上? How do you edit them? 您如何编辑它们?

Enter the admin. 输入管理员。 You register your model with the admin, create a superuser and log in to your running webapp. 您可以通过管理员注册模型,创建超级用户并登录到正在运行的Webapp。 It's there, with a fully functional interface for creating the entries. 它在那里,具有用于创建条目的功能齐全的界面。

Some of the uses I can think of - 我能想到的一些用途-

  1. Editing data or Adding data. 编辑数据或添加数据。 If you have any sort of data entry tasks, the admin app handles it like a breeze. 如果您有任何类型的数据输入任务,则管理应用程序将轻松处理它。 Django's admin especially shines when non-technical users need to be able to enter data. 当非技术用户需要能够输入数据时,Django的管理员尤其出色。
  2. If you have understood above point, then this makes it possible for programmers to work along with designers and content producers! 如果您已经了解了以上几点,那么程序员就可以与设计师和内容制作者一起工作!
  3. Permissions - An admin interface can be used to give permissions, create groups with similar permissions, make more than one administrators etc. (ie if you have a login kinda site). 权限 -管理员界面可用于授予权限,创建具有相似权限的组,任命多个管理员等(例如,如果您有某种登录网站)。
  4. Inspecting data models - when I have defined a new model, I call it up in the admin and enter some dummy data. 检查数据模型 -定义新模型后,我在管理员中调用它并输入一些虚拟数据。
  5. Managing acquired data - basically what a moderator does in case of auto-generated content sites. 管理获取的数据 -基本上是主持人在自动生成内容站点时的工作。
  6. Block out buggy features - Also if you tweak it a little, you can create an interface wherein say some new feature you coded is buggy. 屏蔽越野车功能 -同样,如果您对其稍作调整,则可以创建一个界面,其中说您编码的某些新功能越野车。 You could disable it from admin interface. 您可以从管理界面禁用它。

Think of the power this gives in a big organization where everyone need not know programming. 想想这对于每个人都不需要了解编程的大型组织所赋予的力量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在django admin中存储和编辑全局变量的最佳方法是什么? - What is best way to store and edit global variables in django admin? Django管理员:添加自定义列表视图的最佳方法是什么? - Django admin: What is the best way to add a custom list view? 在django admin中保存相关模型的最佳方法是什么? - What is the best way of saving related model in django admin? 为现有应用定制 django 管理页面的最佳方法 - Best approach to customize django admin page for existing app 用Django实现配置应用的最佳方法是什么? - What is the best approach to implement configuration app with Django? 访问Django的admin应用用于显示表字段名称的方法/过滤器 - Access the method / filter Django's admin app uses to present table field names 管理站点在Django 1.6中使用默认数据库 - Admin site uses default database in Django 1.6 将Django应用转换为Google App Engine的最佳方法是什么? - What are the best approaches to convert Django app to Google App Engine? 在django Web应用程序中实现“上次看到”功能的最佳方法是什么? - What is the best way to implement a 'last seen' function in a django web app? 构建我的django第三方应用程序的最佳方法是什么 - What is best way to structuring my django third party app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM