7.10. Django Admin management tools

发布时间 :2025-10-25 12:24:15 UTC      

Django provides web-based management tools.

Django automatic management tools are part of django.contrib. You can see it in the INSTALLED_APPS in the project’s settings.py:

7.10.1. / HelloWorld/HelloWorld/settings.py file code:

INSTALLED_APPS=('django.contrib.admin','django.contrib.auth','django.contrib.contenttypes','django.contrib.sessions','django.contrib.messages','django.contrib.staticfiles',)

django.contrib是一套庞大的功能集,它是Django基本代码的组成部分。

Activate management tools

Usually we set it up automatically in urls.py when we build the project, we just need to remove the comments.

The configuration items are as follows:

7.10.2. / HelloWorld/HelloWorld/urls.py file code:

#
urls.pyfromdjango.conf.urlsimporturlfromdjango.contribimportadminurlpatterns=[url(r'^admin/',admin.site.urls),]

When all this is configured, the Django management tool is ready to run.

Use management tools

Start the development server, and then access http://127.0.0.1:8000/admin/ in the browser to get the following interface:

image0

You can take orders. python manage.py createsuperuser To create a superuser, as follows:

Principles, Technologies, and Methods of Geographic Information Systems  102

In recent years, Geographic Information Systems (GIS) have undergone rapid development in both theoretical and practical dimensions. GIS has been widely applied for modeling and decision-making support across various fields such as urban management, regional planning, and environmental remediation, establishing geographic information as a vital component of the information era. The introduction of the “Digital Earth” concept has further accelerated the advancement of GIS, which serves as its technical foundation. Concurrently, scholars have been dedicated to theoretical research in areas like spatial cognition, spatial data uncertainty, and the formalization of spatial relationships. This reflects the dual nature of GIS as both an applied technology and an academic discipline, with the two aspects forming a mutually reinforcing cycle of progress.