django
chap1 the first web
create: django-admin.py startproject mysite
startup: python manage.py runserver 8000
1. urls.py
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
from django.conf.urls import url from django.contrib import admin from mysite import views urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$',views.first_page) ]
2.
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
# -*- coding: utf-8 -*- from django.http import HttpResponse def first_page(request): return HttpResponse("<p>hello world!</p>")
3.