03 2021 档案

摘要:示例 from django.shortcuts import render from django.contrib.auth import authenticate,login,logout from django.http import HttpResponse,JsonResponse,Htt 阅读全文
posted @ 2021-03-17 17:39 李家琦 阅读(79) 评论(0) 推荐(0) 编辑
摘要:创建一个app单独作为用户使用 新建app需要配置的三个步骤: 1.新建一个accounts的app python manage.py startapp accounts 2.配置url #主urlurl(r'^accounts/', include("accounts.urls")),#app里面 阅读全文
posted @ 2021-03-12 10:44 李家琦 阅读(147) 评论(0) 推荐(0) 编辑
摘要:实现用户登录的步骤: 1.配置django数据库 2.同步数据 3.Django API创建用户 4.执行用户登录 5.深入解析用户登录过程 配置django数据库 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'N 阅读全文
posted @ 2021-03-11 13:56 李家琦 阅读(1975) 评论(0) 推荐(0) 编辑
摘要:创建一个简单表单 (env) [root@ES-10-1-21-55-B28 dashboard]# cat templates/test.html <form method='post'> <ul> {% csrf_token %} <li>用户名: <input type="text" name 阅读全文
posted @ 2021-03-05 17:34 李家琦 阅读(84) 评论(0) 推荐(0) 编辑
摘要:纽约时间比加州时间早三个小时, New York is 3 hours ahead of California, 但加州时间并没有变慢。 but it does not make California slow. 有人22岁就毕业了, Someone graduated at the age of 阅读全文
posted @ 2021-03-05 09:40 李家琦 阅读(110) 评论(0) 推荐(0) 编辑