django第一个项目helloworld
djangoproject-urls
from django.contrib import admin from django.urls import path from app01.views import * from django.conf.urls import include urlpatterns = [ # path('admin/', admin.site.urls), path('',include('app01.urls')) ]
app01-urls
from django.urls import path from . import views urlpatterns = [ path('',views.index) ]
app01-views
from django.http import HttpResponse def index(request): return HttpResponse("hello world")
上班求生存,下班求发展