django启用超级管理员_如何启用和连接Django管理界面

django启用超级管理员 介绍 (Introduction)If you have followed along in the Django Development series, you’ve started a Django application, connected your application to MySQL, and created the database models f...
摘要由CSDN通过智能技术生成

django启用超级管理员

介绍 (Introduction)

If you have followed along in the Django Development series, you’ve started a Django application, connected your application to MySQL, and created the database models for the Posts and Comments data within your blog web application.

如果您遵循Django Development系列教程 ,那么您已经启动了Django应用程序,将应用程序连接到MySQL,并在博客Web应用程序中为PostsComments数据创建了数据库模型。

In this tutorial, we will connect to and enable the Django admin site so that you can manage your blog website. The Django admin site comes pre-built with a user interface that is designed to allow you and other trusted individuals to manage content for the website.

在本教程中,我们将连接并启用Django管理网站,以便您可以管理博客网站。 Django管理网站预先构建了一个用户界面,该界面旨在使您和其他受信任的个人可以管理网站的内容。

It is worth noting that Django’s official documentation points out that although this is ideal for an organization’s internal use, it is not recommended to build a web application around an automatically generated Django admin interface. If you find that your interface needs to be more process-centric or proves to abstract away the implementation details of database tables and fields, it would be best for you to write your own views for the admin side.

值得注意的是,Django的官方文档指出,尽管这对于组织内部使用而言是理想的选择,但不建议您围绕自动生成的Django管理界面构建Web应用程序。 如果您发现您的界面需要以流程为中心,或者被证明可以抽象出数据库表和字段的实现细节,那么最好为管理员编写自己的视图。

先决条件 (Prerequisites)

This tutorial is part of the Django Development series and is a continuation of that series.

本教程是Django开发系列的一部分,并且是该系列的继续。

If you have not followed along with this series, we are making the following assumptions:

如果您未遵循本系列文章,我们将进行以下假设:

As this tutorial is largely dealing with the Django Admin Interface, you may be able to follow along even if you have a somewhat different setup.

由于本教程主要涉及Django Admin Interface,因此即使设置有所不同,您也可以继续学习。

步骤1 —启用管理员 (Step 1 — Enable the Admin)

Whenever we begin doing work in Python and Django, we should activate our Python virtual environment and move into our app’s root directory. If yo

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值