A simple application of django

django-admin startproject mysite to create a django project

python manage.py startapp blog creation application command

Create a database model

admin management database

Pycharm root directory created in the environment variable

python manage.py runserver 8080 to start the project

return HttpResponse("hello")

render (request, "index_html", { "time": t}) The first argument is the request object, is a second page, the third alternative is the rear front end

Returns HttpResponse

Guess you like

Origin www.cnblogs.com/jintian/p/11129730.html