larken

勤奋的人生才有价值

导航

01-02

01.什么是Django  22:46

python 版本 3.5.3

pip install django == 2.0

pip list

 

02.入门仪式:Hello World 28:50

django-admin startproject mysite

mysite/urls.py

from . import views

urlpaterrn=['',views.index]

mysite/views.py

from django.http import HttpResponse

def index(request):

  return HttpResponse("Hello World")

127.0.0.1:8000 = localhost:8000

Python manage.py help - > python manage.py migrate - > python manage.py createsuperuser -> python manage.py runserver(“←”,“→”,“↑”,“↓” )

 

posted on 2019-04-01 14:40  larken  阅读(158)  评论(0编辑  收藏  举报