程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

pycharm installs django framework detailed steps (Python 3.8.1), write your first Django application

編輯:Python

1. Check out our python version.

2. View the correspondence between django and python versions.

3. Here we choose the django4.0 version.Directly enter the code to install the latest official version.

python -m pip install Django

4. The installation is complete.

5. Check the installed version.

python -m django --version

Indicates that the installation has been successful.

6. Start creating the project.In the terminal of the root directory of the new project, enter:

django-admin startproject firstDemo

To create a project named "firstDemo".

7. After successful creation, the following directory structure will be obtained:

8. Introduction:

manage.py: A command-line utility that lets you interact with this Django project in various ways.

__init__.py: An empty file that tells Python that this directory should be considered a Python package.

settings.py: Settings/configuration for this Django project.

urls.py: The URL declaration for this Django project; the "directory" of the site powered by Django.

asgi.py: The entry point to an ASGI-compatible web server serving your project.

wsgi.py: The entry point to the WSGI-compliant web server serving your project.

9. In the directory of the same level as manage, open the terminal and enter:

py manage.py runserver

10. If the terminal outputs, it means the project is starting:

11 Enter in the browser to access: http://127.0.0.1:8000/

Let me introduce myself first. The editor graduated from Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Ali in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a "full set of learning materials for java development" for everyone. The original intention is also very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved