Python
文章平均质量分 55
wuwh无非
这个作者很懒,什么都没留下…
展开
-
python-->django使用过程中碰到的异常总结
1. SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xa1 in position 0: invalid start byte: 这是因为代码中有中文字符,在网上搜了一下,可以用 u("中文").encode("utf-8") 或者 unicode(“中文”).encode("utf-8")来解原创 2015-08-24 21:24:32 · 679 阅读 · 0 评论 -
【0】依照Django官网:实现第一个django app 安装必要的工具/模块
依照django官网,一步一步编写一个django web应用原创 2015-08-16 23:50:58 · 830 阅读 · 0 评论 -
【2】依照Django官网,创建一个web app 创建app/创建对应的数据库表
1. Creating app $ python manage.py startapp polls That’ll create a directory polls, which is laid out like this: polls/ __init__.py admin.py migrations/ __init_原创 2015-08-17 00:28:30 · 1391 阅读 · 0 评论 -
【3】依照django官网:创建一个web app 创建superuser/runserver
1 Creating an admin user $ python manage.py createsuperuser UserName: wuwh Password: ganbare 2 Start the development server¶ $ python manage.py runserver 8088 visit :h原创 2015-08-17 00:34:59 · 1242 阅读 · 0 评论 -
python 基础环境配置
1.从官网下载安装包,安装至一个目录,如:D:\python 2.在环境变量中把安装目录、Scripts目录加到环境变量的path中。 ( D:\python + D:\python\Scripts ) 3.百度 easy_install,从官网下载ez_setup.py文件,并保存至一个目录,如:D:\python\easy_install, 并运行此脚本:原创 2015-08-21 14:39:20 · 773 阅读 · 0 评论 -
【1】依照Django官网,编写一个web app 创建工程/配置数据库
1. Creating a project From the command line, cd into a directory where you’d like to store your code, then run the following command: $ django-admin startproject mysite Let’s look at原创 2015-08-17 00:08:28 · 1119 阅读 · 0 评论