随笔分类 -  django_安装

摘要:目录:1.配置访问数据库在settings.py文件中添加:DATABASES = { 'default': { # 'ENGINE': 'django.db.backends.sqlite3', # 'NAME': os.path.join(BASE_DIR, '... 阅读全文
posted @ 2015-07-12 00:34 lanselanlan 阅读(6931) 评论(0) 推荐(0)
摘要:1.源html文件:命名为3.html文件模板模板3{% block content %} hello world{% endblock %}2.继承文件命名为:4.html,继承于3.html文件,内容如下: {% extends '3.html' %} {% block con... 阅读全文
posted @ 2015-07-12 00:23 lanselanlan 阅读(170) 评论(0) 推荐(0)
摘要:文件目录:1.同一个项目其他文件配置:在文件:settings.py中的这里面添加INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', ... 阅读全文
posted @ 2015-07-12 00:17 lanselanlan 阅读(180) 评论(0) 推荐(0)
摘要:1.原地址:http://my.oschina.net/slhong/blog/96159配置前的基本情况说明:win7 +python2.7.3+PostgreSQL9.22+ Django1.4.3psycopg2-2.4.6.win32-py2.7-pg9.2.2-release使用步骤:安装... 阅读全文
posted @ 2015-07-11 23:00 lanselanlan 阅读(1004) 评论(0) 推荐(0)
摘要:1.官网:http://www.djangoproject.com2.如果安装了pip,那么在、在cmd中输入命令:pip install Django==1.8.33.如果安装了Git,在cmd中输入:git clone https://github.com/django/django.git4.... 阅读全文
posted @ 2015-07-11 15:02 lanselanlan 阅读(197) 评论(0) 推荐(0)