<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Fresker小站 &#187; python</title>
	<atom:link href="http://www.fresker.com/old2/archives/tag/python/feed" rel="self" type="application/rss+xml" />
	<link>http://www.fresker.com/old2</link>
	<description>天将降大任于斯人也，必先苦其心志，劳其筋骨，饿其体肤，空乏其身....</description>
	<lastBuildDate>Sat, 05 May 2018 04:20:42 +0000</lastBuildDate>
	<language></language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
		<item>
		<title>Django学习笔记——Django在windows上运行及开发</title>
		<link>http://www.fresker.com/old2/archives/597</link>
		<comments>http://www.fresker.com/old2/archives/597#comments</comments>
		<pubDate>Thu, 01 Nov 2012 06:22:10 +0000</pubDate>
		<dc:creator>Duke</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[Python开发工具]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[开发工具]]></category>
		<category><![CDATA[教程类]]></category>
		<category><![CDATA[python开发工具]]></category>

		<guid isPermaLink="false">http://www.fresker.com/archives/597</guid>
		<description><![CDATA[college admission essays div>总结一下django在windows上的开发 &#160; 开发工具使用pycharm2.6(window下或者linux下安装方法：pycharm安装及激活http://www.fresker.com/archives/586） //小注：下面提到pycharm开发django的便利性，此文基本基于pycharm做 &#160; 此处只是作为测试，使用sqlite3,免去安装数据库的繁琐，大家可相应修改（配置文件在settings.py) &#160; 由于django对python支持的原因 python2.7.3（python3.3貌似对django1.4.2的支持还有一点问题，此处的报错主要在except处经常出现） &#160; django1.4.2 &#160; python2.7.3在官网下载，一路next到底，选择安装路径依照个人喜欢（如d:/python27/)，在windows的环境变量中path添加;d:/python27/ django1.4.2在官网下载，解压到d:/django1.4.2/ &#160; window+r ==&#62; cmd&#160;&#160;&#160;&#160;//cmd下工作 &#160;d: cd django1.4.2&#160;&#160;&#160;&#160; python setup.py install&#160;&#160;&#160;&#160;//前面添加python安装路径到path是为了此处使用 &#160; 在pycharm中 new project 设置python编译器位置为上面的d:/python27/python.exe,填写project name,选择project type为django project，点击ok继续 &#160; 添加app name,点击ok继续 &#160; 可以得到一个常见的项目窗口 &#160;修改settings.py文件，设置databases DATABASES = {&#160;&#160;&#160;&#160;'default': {&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;'NAME': r'd:/sqlite3/test.db',&#160;&#160;&#160;&#160;&#160;#注意此处的r非常重要，否则容易出现路径无法识别的错误 My [...]]]></description>
		<wfw:commentRss>http://www.fresker.com/old2/archives/597/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django手把手学习（环境篇）——apache+mod_wsgi</title>
		<link>http://www.fresker.com/old2/archives/590</link>
		<comments>http://www.fresker.com/old2/archives/590#comments</comments>
		<pubDate>Tue, 11 Sep 2012 06:41:31 +0000</pubDate>
		<dc:creator>Duke</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[开发技术类]]></category>
		<category><![CDATA[教程类]]></category>
		<category><![CDATA[项目环境搭建]]></category>

		<guid isPermaLink="false">http://www.fresker.com/archives/590</guid>
		<description><![CDATA[Django手把手学习——Apache+mod_wsgi 参考http://code.google.com/p/modwsgi/wiki/QuickInstallationGuide &#160; 1.安装apache+python+mod_wsgi 2.为django创建虚拟机，增加配置文件 &#160; 环境： ubuntu12.04 &#160; 安装apache+python+mod_wsgi &#160; 安装apache(默认2.2.22） sudo apt-get install apache2sudo apt-get install apache2-prefork-dev&#160;&#160;&#160;&#160;(避免configure的时候出现miss apxs) &#160; 安装python（默认已安装python2.7.3） sudo apt-get install pythonsudo apt-get install python-dev&#160;&#160;&#160;&#160;(避免出现Python.h: No such file or directory错误） &#160; 下载wsgi,http://code.google.com/p/modwsgi/downloads/list wget -c http://modwsgi.googlecode.com/files/mod_wsgi-3.3.tar.gztar zxvf wsgi-3.3.tar.gzcd mod_wsgi-3.3/./configure &#160; 如果上面的apache和python为自定义或者编译安装，使用下面方式 ./configure --with-apxs=/apxs所在 --with-python=/python所在&#160;&#160;&#160;&#160;#可通过whereis apxs,whereis python查找makesudo make install&#160;&#160;&#160;&#160;#此处添加sudo是安装过程可能需要root权限 &#160; 修改default文件(或者在设置虚拟主机，下面将介绍),添加 LoadModule wsgi_module [...]]]></description>
		<wfw:commentRss>http://www.fresker.com/old2/archives/590/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django手把手学习（环境篇）——Nginx+uWSGI</title>
		<link>http://www.fresker.com/old2/archives/589</link>
		<comments>http://www.fresker.com/old2/archives/589#comments</comments>
		<pubDate>Tue, 11 Sep 2012 06:41:08 +0000</pubDate>
		<dc:creator>Duke</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[开发技术类]]></category>
		<category><![CDATA[教程类]]></category>
		<category><![CDATA[项目环境搭建]]></category>

		<guid isPermaLink="false">http://www.fresker.com/archives/589</guid>
		<description><![CDATA[基于性能等多方面考虑，搭建Nginx uWSGI环境 环境：ubuntu12.04 安装版本：nginx1.3.4 python2.7.3(系统自带) django1.4.1 uWSGI1.2.5 一.安装NGINX （使用官方 源安装最新版本） 注：先更新源，安装最新nginx版本1.3.4，参考 1）修改源信息： sudo vim /etc/apt/sources.list 增加下面2行（此版本为1.3.4开发版） deb http://ppa.launchpad.net/nginx/development/ubuntu precise Broken shower, It was will school them out this. You plan these only skin Dry this? A lighting wig but one amount. You"ll streak because both a other the accidentally: blue no soap will recommend, shifty [...]]]></description>
		<wfw:commentRss>http://www.fresker.com/old2/archives/589/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>pycharm安装及激活</title>
		<link>http://www.fresker.com/old2/archives/586</link>
		<comments>http://www.fresker.com/old2/archives/586#comments</comments>
		<pubDate>Tue, 11 Sep 2012 06:35:25 +0000</pubDate>
		<dc:creator>Duke</dc:creator>
				<category><![CDATA[Python开发工具]]></category>
		<category><![CDATA[开发工具]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[python开发工具]]></category>

		<guid isPermaLink="false">http://www.fresker.com/archives/586</guid>
		<description><![CDATA[pycharm安装下载地址： http://www.jetbrains.com/pycharm/download/index.html window下安装： 一路next基本就ok了，激活方式下面 ubuntu12.04下安装： 系统需求里提到需要sun jdk1.6+ 编译安装jdk可以参考下面文章http://www.arthurtoday.com/2012/05/ubuntu-11-oracle-sun-jdk-6.html#.UE63_o0gfRg sudo add-apt-repository ppa:flexiondotorg/java sudo apt-get update sudo apt-get install sun-java6-jdk sun-java6-plugin 安装完之后，可能需要切换sunjdk，如之前安装了openjdk,手动切换成sunjdk： sudo update-alternatives --config java 查看java版本 java -version 解压pycharm linux下安装文件 tar zxvf pycharm.tar.gz cd pycharm/bin/ sudo ./pycharm.sh 激活（如果能消费得起，请支持正版）： EMBRACE ===== LICENSE BEGIN ===== 14203-12042010 0000107Iq75C621P7X1SFnpJDivKnX 6zcwYOYaGK3euO3ehd1MiTT"2!Jny8 bff9VcTSJk7sRDLqKRVz1XGKbMqw3G ===== LICENSE END ===== 添加到桌面 桌面或面板右击－添加到面板－自定义应用程序启动器－名称随便填，单击命令后面的“浏览”，找到pycharm.sh，注意：要在路径前加上sh，这个要切记！！！！否则启动不了！！！ 通过 为知笔记 发布]]></description>
		<wfw:commentRss>http://www.fresker.com/old2/archives/586/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django手把手学习（环境篇）——内置服务器环境安装</title>
		<link>http://www.fresker.com/old2/archives/582</link>
		<comments>http://www.fresker.com/old2/archives/582#comments</comments>
		<pubDate>Mon, 20 Aug 2012 06:21:02 +0000</pubDate>
		<dc:creator>Duke</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[开发技术类]]></category>
		<category><![CDATA[教程类]]></category>

		<guid isPermaLink="false">http://www.fresker.com/archives/582</guid>
		<description><![CDATA[此处总结记录学习django的过程： 安装： 此处选择ubuntu12.04环境 内置python2.7.3 下载django1.4，解压，进入解压文件夹 安装django: tar zxvf django1.4.tar.gz cd django1.4 sudo python setup.py install 创建项目目录 cd /home/username/ mkdir djangoproject cd djangoproject django-admin startproject testproject1 当前目录下新建了testproject1目录 目录结构 manage.py    #可执行文件 djangotest1/          #项目目录 __init__.py  #表示这是python包，可通过import导入 urls.py         #处理url映射 setting.py     #django配置文件 wsgi.py 启动django内置的web服务器 ./manage.py runserver 0.0.0.0:8080    #ip和port可以省略，使用默认值127.0.0.1:8080,此处设置为0.0.0.0是为了可通过ip地址访问，ubuntu在虚拟机中 通过地址访问服务器 虚拟机地址192.168.56.101:8080    #此处的地址会有差别 本地访问127.0.0.1:8080 出现It&#8217;s worked页面，说明服务器启动ok &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- 在ubuntu中设置django内置服务器开机自动启动，便于测试 sudo vi /etc/rc.local 添加： python /home/username/djangoproject/testprojects/manage.py runserver [...]]]></description>
		<wfw:commentRss>http://www.fresker.com/old2/archives/582/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django手把手学习（环境篇）——实际环境</title>
		<link>http://www.fresker.com/old2/archives/581</link>
		<comments>http://www.fresker.com/old2/archives/581#comments</comments>
		<pubDate>Mon, 20 Aug 2012 06:20:58 +0000</pubDate>
		<dc:creator>Duke</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[开发技术类]]></category>
		<category><![CDATA[教程类]]></category>

		<guid isPermaLink="false">http://www.fresker.com/archives/581</guid>
		<description><![CDATA[django工作环境配置小结 服务器： apache + mod_python(这种方法在django1.5中将移除，建议使用mod_wsgi方式） apache + mod_wsgi(embedded model or daemon model) 配置方法https://docs.djangoproject.com/en/1.4/howto/deployment/wsgi/modwsgi/ nginx + uWSGI https://docs.djangoproject.com/en/1.4/howto/deployment/fastcgi/ 各种环境配置：https://code.djangoproject.com/wiki/ServerArrangements 数据库： MySQL(使用需要MySQLdb) http://www.mysql.com/ PostgreSQL (使用需要postgresql_psycopg2) http://www.postgresql.org/ Oracle(使用需要cx_Oracle) http://www.oracle.com/ SQLite http://www.sqlite.org/ others: Sybase SQL Anywhere http://code.google.com/p/sqlany-django/ IBM DB2 http://code.google.com/p/ibm-db/ Microsoft SQL Server 2005 http://code.google.com/p/django-mssql/ Firebird http://code.google.com/p/django-firebird/ ODBC http://code.google.com/p/django-pyodbc/ 通过 为知笔记 发布]]></description>
		<wfw:commentRss>http://www.fresker.com/old2/archives/581/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django手把手学习（环境篇）——apache+mod_wsgi</title>
		<link>http://www.fresker.com/old2/archives/580</link>
		<comments>http://www.fresker.com/old2/archives/580#comments</comments>
		<pubDate>Mon, 20 Aug 2012 06:20:51 +0000</pubDate>
		<dc:creator>Duke</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[开发技术类]]></category>
		<category><![CDATA[教程类]]></category>

		<guid isPermaLink="false">http://www.fresker.com/archives/580</guid>
		<description><![CDATA[Django手把手学习——Apache+mod_wsgi 参考http://code.google.com/p/modwsgi/wiki/QuickInstallationGuide &#160; 1.安装apache+python+mod_wsgi 2.为django创建虚拟机，增加配置文件 &#160; 环境： ubuntu12.04 &#160; 安装apache+python+mod_wsgi &#160; 安装apache(默认2.2.22） sudo apt-get install apache2sudo apt-get install apache2-prefork-dev&#160;&#160;&#160;&#160;(避免configure的时候出现miss apxs) &#160; 安装python（默认已安装python2.7.3） sudo apt-get install pythonsudo apt-get install python-dev&#160;&#160;&#160;&#160;(避免出现Python.h: No such file or directory错误） &#160; 下载wsgi,http://code.google.com/p/modwsgi/downloads/list wget -c http://modwsgi.googlecode.com/files/mod_wsgi-3.3.tar.gztar zxvf wsgi-3.3.tar.gzcd mod_wsgi-3.3/./configure &#160; 如果上面的apache和python为自定义或者编译安装，使用下面方式 ./configure --with-apxs=/apxs所在 --with-python=/python所在&#160;&#160;&#160;&#160;#可通过whereis apxs,whereis python查找makesudo make install&#160;&#160;&#160;&#160;#此处添加sudo是安装过程可能需要root权限 &#160; 修改default文件(或者在设置虚拟主机，下面将介绍),添加 LoadModule wsgi_module [...]]]></description>
		<wfw:commentRss>http://www.fresker.com/old2/archives/580/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django手把手学习(缓存篇）——memcached</title>
		<link>http://www.fresker.com/old2/archives/567</link>
		<comments>http://www.fresker.com/old2/archives/567#comments</comments>
		<pubDate>Wed, 15 Aug 2012 08:17:00 +0000</pubDate>
		<dc:creator>Duke</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[开发技术类]]></category>
		<category><![CDATA[教程类]]></category>

		<guid isPermaLink="false">http://www.fresker.com/archives/567</guid>
		<description><![CDATA[Django中使用memcached提升性能 &#160; 环境： ubuntu12.04 python2.7 django1.4 &#160; memcached安装 &#160; ubuntu12.04中安装（默认安装版本1.4.13） sudo apt-get install memcached &#160; 其他环境中的安装参考https://code.google.com/p/memcached/wiki/NewInstallFromPackage#Ubuntu &#160; &#160; 安装memcached绑定 libmemcached：下载地址https://launchpad.net/libmemcached/+download python-memcached: 下载地址ftp://ftp.tummy.com/pub/python-memcached/ &#160; 安装python-memcached: wget -c ftp://ftp.tummy.com/pub/python-memcached/python-memcached-1.48.tar.gzsudo apt-get install python-setuptools #注意先安装python-setuptools，否则可能在后面安装时出现can't import setuptools的错误tar zxvf python-memcached-1.48.tar.gzcd python-memcached-1.48sudo python setup.py install&#160;&#160;&#160;&#160;#注意使用sudo &#160; 启动memcached &#160; # /usr/local/bin/memcached -d -m 128 -u root&#160; -p 11212&#160; -P /tmp/memcached.pid -d选项是启动一个守护进程， -m是分配给Memcache使用的内存数量，单位是MB，我这里是128MB， [...]]]></description>
		<wfw:commentRss>http://www.fresker.com/old2/archives/567/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django手把手学习(缓存篇）——Database cache</title>
		<link>http://www.fresker.com/old2/archives/566</link>
		<comments>http://www.fresker.com/old2/archives/566#comments</comments>
		<pubDate>Wed, 15 Aug 2012 08:16:35 +0000</pubDate>
		<dc:creator>Duke</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[开发技术类]]></category>
		<category><![CDATA[教程类]]></category>

		<guid isPermaLink="false">http://www.fresker.com/archives/566</guid>
		<description><![CDATA[Django 数据库缓存 在快速，索引良好的数据库服务器中，数据库缓存效率非常高 配置数据库缓存 &#160; 创建缓存数据表 python manage.py createcachetable [cache_table_name] &#160; 修改setting.py,添加 CACHES = {&#160;&#160;&#160;&#160;&#160;'default': {&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;'BACKEND': 'django.core.cache.backends.db.DatabaseCache',&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;'LOCATION': 'my_cache_table',&#160;&#160;&#160;&#160;&#160;&#160;}} &#160; &#160; &#160; &#160; 通过 为知笔记 发布]]></description>
		<wfw:commentRss>http://www.fresker.com/old2/archives/566/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django手把手学习(缓存篇）——视图级缓存</title>
		<link>http://www.fresker.com/old2/archives/565</link>
		<comments>http://www.fresker.com/old2/archives/565#comments</comments>
		<pubDate>Wed, 15 Aug 2012 08:16:15 +0000</pubDate>
		<dc:creator>Duke</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[开发技术类]]></category>
		<category><![CDATA[教程类]]></category>

		<guid isPermaLink="false">http://www.fresker.com/archives/565</guid>
		<description><![CDATA[django支持对单个视图的缓存 作用对象：指定视图 方法（1）：对视图添加修饰器 &#160;&#160;&#160;&#160;from django.views.decorators.cache import cache_page&#160;&#160;&#160;&#160;@cache_page(15*60)&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;#参数指定缓存过期时间&#160;&#160;&#160;&#160;def views(request,params):&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;... 视图缓存与url无关，如果多个url指向同一个视图，每个视图分别缓存 如 urlpatterns = ('',&#160;&#160;&#160;&#160;(r'^foo/(d{1,2})/$',views),) 发送过来的请求/foo/1/ ,/foo/2/会分别缓存，如果再次请求/foo/2/会使用缓存的内容 &#160; 方法（2）：对urlconf添加修饰器 from django.views.decorators.cache import cache_pageurlpatterns = ('',&#160;&#160;&#160;&#160;(r'^foo/(d{1,2})/$',cache_page(60*15)(views)),) 方法1与方法2等效，个人喜欢方法2 &#160; cache_page(60*15,cache="special_cache")&#160;&#160;&#160;&#160;#参数cache指定特定缓存方式，在setting中指定cache_page(60*15,key_prefix="site1")&#160;&#160;&#160;&#160;#指定缓存关键字前缀，与CACHE_MIDDLEWARE_KEY_PREFIX同样作用 通过 为知笔记 发布]]></description>
		<wfw:commentRss>http://www.fresker.com/old2/archives/565/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->