随笔分类 -  Django

Django go go
摘要:20160302 Excel,PDF 处理 GeoDjango学习:GIS编程,百度地图 Javascript 邮件系统 图像处理 阅读全文
posted @ 2016-03-02 13:30 南湖鹄
摘要:1.一个Model.py中简单调用多个数据库,不写数据库路由 阅读全文
posted @ 2016-03-02 12:22 南湖鹄 阅读(133) 评论(0) 推荐(0)
摘要:such as images, JavaScript, or CSS https://docs.djangoproject.com/en/1.9/howto/static-files/ django.contrib.staticfiles 1.polls/static/polls/style.css 阅读全文
posted @ 2016-03-01 19:49 南湖鹄 阅读(236) 评论(0) 推荐(0)
摘要:def xx(): 冒号下一行要缩进 ATD http://blog.csdn.net/doupei2006/article/details/7657547 http://www.jb51.net/article/64633.htm >>> import datetime >>> from djan 阅读全文
posted @ 2016-02-25 18:07 南湖鹄 阅读(161) 评论(0) 推荐(0)
摘要:不用数据库不用Models 省却 startapp urls +链接 view以下 添加Model 在project/settings.py的installed_app 添加config 在models.py中新建class 注意intended block 缩进 阅读全文
posted @ 2016-02-25 17:11 南湖鹄 阅读(122) 评论(0) 推荐(0)
摘要:https://docs.djangoproject.com/en/1.9/py-modindex/ django.conf.urls django.contrib.admin django.db.migrations django.http django.shortcuts django.temp 阅读全文
posted @ 2016-02-25 14:20 南湖鹄 阅读(161) 评论(0) 推荐(0)
摘要:In Django, web pages and other content are delivered by views. To get from a URL to a view, Django uses what are known as ‘URLconfs’. A URLconf maps U 阅读全文
posted @ 2016-02-22 16:44 南湖鹄 阅读(273) 评论(0) 推荐(0)
摘要:配置 数据库 默认sqlite, 支持Mysql,postgresql,oracle 更改时区 查看表结构 .schema (SQLite), display the tables Django created. 新建Models models原始文件 from django.db import m 阅读全文
posted @ 2016-02-22 11:01 南湖鹄 阅读(569) 评论(0) 推荐(0)
摘要:The url() function is passed four arguments, two required: regex and view, and two optional: kwargs, and name. url(r'^$', views.index, name='index'), 阅读全文
posted @ 2016-02-19 14:25 南湖鹄 阅读(300) 评论(0) 推荐(0)
摘要:1.安装好Python 2.7.10 2.下载解压Django Django-1.9.2.tar.gz cmd cd到解压缩目录(***) python setup.py install 3.检测是否安装成功 import django django.Version print (django.__ 阅读全文
posted @ 2016-02-18 16:45 南湖鹄 阅读(412) 评论(0) 推荐(0)