随笔分类 -  Django

Django相关文档
摘要:在网上找了很多博客,看了vs code的官方文档,最终拼凑起来,终于搭建起来了djangode开发虚拟环境(win10下) 一、新建项目文件夹 F:\Python\temp\django_demo(例子) 二、在项目文件夹创建虚拟python环境 # macOS/Linux sudo apt-get 阅读全文
posted @ 2019-08-27 12:36 CelonY 阅读(3481) 评论(0) 推荐(0) 编辑
摘要:import osimport hashlibfrom django.shortcuts import render,render_to_response,redirect,HttpResponseRedirectfrom django.contrib.auth.models import User 阅读全文
posted @ 2018-12-24 16:28 CelonY 阅读(223) 评论(0) 推荐(0) 编辑
摘要:http://www.qttc.net/201404427.html 阅读全文
posted @ 2018-12-24 16:18 CelonY 阅读(2535) 评论(0) 推荐(0) 编辑
摘要:第一步:在app目录下建立static文件夹,将CSS文件、js文件放到static文件夹下 第二步:TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [os.path.join(BASE_DIR,'templates').replace... 阅读全文
posted @ 2018-12-24 14:37 CelonY 阅读(314) 评论(0) 推荐(0) 编辑
摘要:return HttpResponseRedirect('/index/')# 重定向返回url格式:http://127.0.0.1:8000/index/会去掉前期的所有路由重新写入/index/'路由urls代码 from django.urls import pathfrom django. 阅读全文
posted @ 2018-12-22 17:36 CelonY 阅读(514) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/lengfengyuyu/article/details/83342553#3_23 阅读全文
posted @ 2018-12-20 12:13 CelonY 阅读(253) 评论(0) 推荐(0) 编辑
摘要:http://www.cnblogs.com/yijiaming/p/9684601.html 方法一: 1、需要安装pymssql pip install pymssql 2、使用方法: 方法二: 1、安装必要的组件: pip install django-sqlserver django-pyt 阅读全文
posted @ 2018-12-20 10:22 CelonY 阅读(1427) 评论(0) 推荐(1) 编辑

点击右上角即可分享
微信分享提示