第一个django应用程序
Pre-Requirements:
前提条件:
Python 3.x/2.x
Python 3.x / 2.x版本
PyCharm [Professional Edition]2017/2018
PyCharm [专业版] 2017/2018
Django 1.9/2.x
Django 1.9 / 2.x
Virtualenv [Virtual Environment]
Virtualenv [虚拟环境]
Step 1: Open browser https://www.python.org/downloads/in and download Python Installer [Python 3.4.4]
第1步:打开浏览器https://www.python.org/downloads/in并下载Python Installer [Python 3.4.4]
Step 2: Double-Click on Installer and follow the steps.
步骤2:双击Installer,然后按照以下步骤操作。
Step 3: Check whether python is installed on your system or not. For this open "cmd" and type python –version
步骤3:检查系统上是否已安装python。 为此打开“ cmd”并键入python –version
Step 1: Open https://www.jetbrains.com/pycharm/download/#section=windows in browser and download Pycharm Professional Edition.
第1步:在浏览器中打开https://www.jetbrains.com/pycharm/download/#section=windows ,然后下载Pycharm专业版 。
Note: Django Project template is not available in Pycharm Community Edition
注意: Django Project模板在Pycharm Community Edition中不可用
Step 2: Double-Click on Installer and follow the steps.
步骤2:双击Installer,然后按照以下步骤操作。
Step 1: For this open Command Prompt (cmd) and type pip install Django==1.9
步骤1:对于此打开的命令提示符( cmd ),然后键入pip install Django == 1.9
Step 1: For this open Command Prompt (cmd)and type pip install virtualenv
步骤1:对于此打开的命令提示符( cmd )并键入pip install virtualenv
Step 1: Open Command Prompt (cmd)
第1步:打开命令提示符( cmd )
Step 2: Navigate to your Workspace (Location where we want to put our sample app) [C:\Users\phloe\Desktop\IncludeHelp\Articles\Django\Sample App Creation]
步骤2:导航到您的工作区(我们要放置示例应用程序的位置)[C:\ Users \ phloe \ Desktop \ IncludeHelp \ Articles \ Django \ Sample App Creation]
Step 3: Create a Sandbox [Virtual Environment]
步骤3:创建沙箱[虚拟环境]
Step 4: Activate the sandbox
步骤4:启动沙箱
Step 5: Install Django inside Sandbox
步骤5:在Sandbox中安装Django
Step 6: Create a Django Project
步骤6:建立Django专案
Step 6: Navigate inside Sample App. This App contains
步骤6:在Sample App中导航。 这个程序包含
Admin Module (It have same name as project name i.e. sample)
管理模块(与项目名称相同,即示例)
Manage.py
Manage.py
Step 7: Run the sample app.
步骤7:运行示例应用程序。
Step 8: Open browser and navigate to http://127.0.0.1:4500
第8步:打开浏览器并导航到http://127.0.0.1:4500
Step 1: Open PyCharm Professional Edition
第1步:打开PyCharm专业版
Step 2: Create New Project
步骤2:建立新专案
Step 3: Select your project in Project Explorer.
步骤3:在项目资源管理器中选择您的项目。
Step 4: Open Manage Task Console from Tools Menu
步骤4:从“工具”菜单打开“管理任务控制台”
Step 5: Type following command to run app runserver 4600
步骤5:键入以下命令以运行应用程序runserver 4600
Step 6: Open browser and navigate to http://127.0.0.1:4600
第6步:打开浏览器并导航到http://127.0.0.1:4600
翻译自: https://www.includehelp.com/Django/create-first-web-application.aspx
第一个django应用程序