<?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; 开发技术类</title>
	<atom:link href="http://www.fresker.com/old2/archives/category/%e8%bd%af%e4%bb%b6%e5%bc%80%e5%8f%91/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手把手学习（环境篇）——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>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>
		<item>
		<title>Django手把手学习(缓存篇）——站点级缓存</title>
		<link>http://www.fresker.com/old2/archives/564</link>
		<comments>http://www.fresker.com/old2/archives/564#comments</comments>
		<pubDate>Wed, 15 Aug 2012 08:15:54 +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/564</guid>
		<description><![CDATA[django支持整站缓存，也叫站点级缓存 &#160; 指定CACHE_BACKEND,缓存整个网站，也就是所有不包含GET,POST参数的页面在第一次被请求之后就自动被缓存指定时间（timeout决定） &#160; 激活站点缓存 修改settings.py，MIDDLEWARE_CLASSES中添加 &#160;&#160;django.middleware.cache.UpdateCacheMiddleware&#160;&#160;django.middleware.cache.FetchFromCacheMiddleware 如下所示 &#160; 注意添加位置 MIDDLEWARE_CLASSES对添加位置有要求，Update行必须在第一行，Fetch行必须在最后一行，更多顺序规则请参看https://docs.djangoproject.com/en/1.4/topics/cache/#order-of-middleware-classes &#160;&#160;&#160; MIDDLEWARE_CLASSES = (&#160;&#160;&#160;&#160;&#160;'django.middleware.cache.UpdateCacheMiddleware',&#160;&#160;&#160;&#160;&#160;'django.middleware.common.CommonMiddleware',&#160;&#160;&#160;&#160;&#160;&#160;'django.middleware.cache.FetchFromCacheMiddleware',) 在settings.py中添加如下缓存配置项 CACHE_MIDDLEWARE_ALIAS&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;#缓存别名 CACHE_MIDDLEWARE_SECONDS&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;#缓存时间 CACHE_MIDDLEWARE_KEY_PREFIX&#160;&#160;&#160;&#160;#缓存前缀，区别公用一个django环境的其他站点 &#160; 如果CACHE_MIDDLEWARE_ANONYMOUS_ONLY 被设置为true，则只有匿名请求页面被缓存 使用CACHE_MIDDLEWARE_ANONYMOUS_ONLY 注意需要激活AuthenticationMiddleware，也就是在你的配置文件MIDDLEWARE_CLASSES&#160;的地方，&#160;AuthenticationMiddleware&#160;必须出现在&#160;CacheMiddleware&#160;前面 &#160; MIDDLEWARE自动在httpresponse完成的工作 设置Last-Modified 设置Expires 设置Cache-Control &#160; Middleware设置的过期时间可以通过修饰器方式修改，或者页面使用自己的缓存设置，如有一个max-age在Cache-Control中设置 django.views.decorators.cache&#160;&#160;&#160;&#160;使用cache_control设置过期时间或者使用never_cache取消缓存 &#160; &#160; 通过 为知笔记 发布]]></description>
		<wfw:commentRss>http://www.fresker.com/old2/archives/564/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django手把手学习(缓存篇）——模版片段缓存</title>
		<link>http://www.fresker.com/old2/archives/563</link>
		<comments>http://www.fresker.com/old2/archives/563#comments</comments>
		<pubDate>Wed, 15 Aug 2012 08:15:30 +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/563</guid>
		<description><![CDATA[django中可以使用模版片段缓存 要使用模版片段患者，在页面顶部位置添加 {% load cache %}{% cache 500 sidebar %}&#160;&#160;&#160;&#160;#包含只是2个参数，缓存时间，s计数，缓存名称sidebar&#160;&#160;&#160;&#160;..sidebar...{% endcache %} 通过 为知笔记 发布]]></description>
		<wfw:commentRss>http://www.fresker.com/old2/archives/563/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! -->