09 2020 档案
分页系统
摘要:1.后台固定--生成一个分页规则类,可以直接调用class PageInfo(object): def __init__(self,current_page,all_count, per_page, base_url, show_page=11,): ''' :param current_page: 阅读全文
posted @ 2020-09-28 11:10 Test-Billy 阅读(305) 评论(0) 推荐(0)
ORM-数据处理
摘要:models文件下 class UserType(models.Model): title = models.CharField(max_length=32)class User(models.Model): name = models.CharField(max_length=32) age = 阅读全文
posted @ 2020-09-27 16:15 Test-Billy 阅读(152) 评论(0) 推荐(0)
Django的用法
摘要:1.python manage.py starapp app01 创建新的app目录 2.创建数据库DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'db2', 'USER': 'root', 'PAS 阅读全文
posted @ 2020-09-27 15:40 Test-Billy 阅读(117) 评论(0) 推荐(0)
登录cookie写法
摘要:def login(request): if request == "GET": return render(request,'login.html') else: user = request.POST.get('user') pwd = request.POST.get('pwd') if us 阅读全文
posted @ 2020-09-12 13:40 Test-Billy 阅读(243) 评论(0) 推荐(0)