Install Django in Python and Run a Project

Hello guys! Recently, I got some requirements that pieces of people in the university are going to do a joint project using python. For your guys quickly setting up, here are some tips to install and use Django step by step.
Pre-required:  
1. Pycharm Community
2. Python interpreter
3. pip >= 19.0.x (package management tool)
4. setuptools >= 40.8.x
5. Usable python environment

Django Install

  1. Turn on Pycharm and create a new folder with any name you want to store your project.

  2. At the bottom, click Terminal.

  3. Input command pip install Django (NOTICE: python is case-sensitive).

  4. After installing sucessfully, you will get these in your Package. (Using pip list to check you package) Install_Django_in_Python_and_Run_a_Project_1.png

  5. And then, start your first project. Here is command django-admin startproject xxxx(project name). (I use DjangoTest as an example) Install_Django_in_Python_and_Run_a_Project_2.png

  6. Next, change your directory to “DjangoTest” using cd DjangoTest.

  7. Now it’s time to run your initial project. In terminal, input following command python manage.py runserver 127.0.0.1:8000 (If you do not have special requirements or preference, just do as I suggest).

  8. After you get the following picture, you have started your first Django project. Install_Django_in_Python_and_Run_a_Project_3.png

So far, you have run a new Django project on your local server successfully. Hopefully, it helps.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值