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")

 

上一篇:Redis - RedisTemplate及4种序列化方式深入解读


下一篇:Redis(二) 数据类型操作指令以及对应的RedisTemplate方法