<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>s3kvir pascon</title>
	<atom:link href="http://pascon.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://pascon.wordpress.com</link>
	<description>Just one more information</description>
	<lastBuildDate>Tue, 02 Nov 2010 15:00:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='pascon.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>s3kvir pascon</title>
		<link>http://pascon.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://pascon.wordpress.com/osd.xml" title="s3kvir pascon" />
	<atom:link rel='hub' href='http://pascon.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Running django admin docs</title>
		<link>http://pascon.wordpress.com/2010/11/02/running-django-admin-docs/</link>
		<comments>http://pascon.wordpress.com/2010/11/02/running-django-admin-docs/#comments</comments>
		<pubDate>Tue, 02 Nov 2010 15:00:50 +0000</pubDate>
		<dc:creator>pascon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://pascon.wordpress.com/?p=15</guid>
		<description><![CDATA[In last post we enabled in application two urls &#8211; for admin and admin-docs sites. When testing application by running runserver command we are able to visit admin site. But why admin-doc returns an error? The problem is that our installation of python doesn&#8217;t have docutils package required by admin-doc site. To fix it we [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pascon.wordpress.com&amp;blog=444566&amp;post=15&amp;subd=pascon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In last post we enabled in application two urls &#8211; for admin and admin-docs sites. When testing application by running runserver command we are able to visit admin site. But why admin-doc returns an error?</p>
<p>The problem is that our installation of python doesn&#8217;t have <a href="http://pypi.python.org/pypi/docutils"><code>docutils</code></a> package required by admin-doc site. To fix it we need to install this package. Here I describe steps needed to fix admin-doc site.</p>
<h3>Installing <code>setuptools</code></h3>
<p>Default <a href="http://www.instantdjango.com/">Instant Django</a> installation doesn&#8217;t contain <code>setuptools</code> package, which we use for installing <code>docutils</code>. If we want to install setuptools on Windows system we can <a href="http://stackoverflow.com/questions/309412/how-to-setup-setuptools-for-python-2-6-on-windows">pass into some troubles</a>. But after a while we find a solution:</p>
<blockquote>
<ol>
<li>Download <a href="http://pypi.python.org/pypi/setuptools#downloads">setuptools-XXX.tar.gz</a></li>
<li>Download <a href="http://pypi.python.org/pypi/setuptools#downloads">setuptools-XXX.egg</a> to a folder(directory) outside your Windows Python installation folder</li>
<li>Use <a href="http://www.7-zip.org/">7-zip</a> to extract <code>ez_setup.py</code> in the same folder as <a href="http://pypi.python.org/pypi/setuptools#downloads">setuptools-XXX.egg</a></li>
<li>Run start.exe from our Instant Django installation</li>
<li>Go to the folder containing extracted setuptools and run <code>python.exe ez_setup.py setuptools-XXX.egg </code>from the command prompt</li>
</ol>
</blockquote>
<h3>Installing <code>docutils</code></h3>
<p>If installation of <code>setuptools</code> package went ok, we are able to install <code>docutils</code> just by running:</p>
<blockquote>
<pre>easy_install.exe docutils</pre>
</blockquote>
<p>That&#8217;s all for now. Stay tune!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pascon.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pascon.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pascon.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pascon.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pascon.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pascon.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pascon.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pascon.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pascon.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pascon.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pascon.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pascon.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pascon.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pascon.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pascon.wordpress.com&amp;blog=444566&amp;post=15&amp;subd=pascon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pascon.wordpress.com/2010/11/02/running-django-admin-docs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1484f202f3bb0a7af3b5938b9bdae828?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pascon</media:title>
		</media:content>
	</item>
		<item>
		<title>Django begin</title>
		<link>http://pascon.wordpress.com/2010/11/01/django-begin/</link>
		<comments>http://pascon.wordpress.com/2010/11/01/django-begin/#comments</comments>
		<pubDate>Mon, 01 Nov 2010 14:10:21 +0000</pubDate>
		<dc:creator>pascon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://pascon.wordpress.com/?p=9</guid>
		<description><![CDATA[From some time I was wondering how to visualize presence of deputies on sessions in lower house of the Polish parliament. I was also fascinated of Zbigniew Braniecki&#8217;s work, but because of small activity in project I started thinking about something similar developed on my own. I don&#8217;t know well python either django. So from [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pascon.wordpress.com&amp;blog=444566&amp;post=9&amp;subd=pascon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>From some time I was wondering how to visualize presence of deputies on sessions in <a href="https://secure.wikimedia.org/wikipedia/en/wiki/Sejm_of_the_Republic_of_Poland">lower house of the Polish parliament</a>. I was also fascinated of <a href="http://code.google.com/p/openpolitics">Zbigniew Braniecki&#8217;s work</a>, but because of small activity in project I started thinking about something similar developed on my own. I don&#8217;t know well python either <a href="http://www.djangoproject.com/">django</a>. So from beginning, step by step I&#8217;m going to document my journey through<em><em> </em> </em>it&#8217;s world.</p>
<h3>Installing django on Windows</h3>
<p>I found interesting project having all I need. <a href="http://www.instantdjango.com/">Instant Django</a> contains Python, django and additional utilities like Notepad++, Mercurial, WinMerge and Sqlite. All bundled in one executable. When ran it unpacks it&#8217;s content to selected directory. To start playing with python, just fire <code>start.bat</code> and windows-shell came upon with modified <code>PATH</code> variable containing links to python and django specified folders.</p>
<h3>Setting up project</h3>
<p>To create django project execute command</p>
<blockquote>
<pre>django-admin startproject govstats</pre>
</blockquote>
<p>First argument is command to execute, second is parameter passing to it. In this case we want to <code>startproject</code> named <code>govstats</code>. After project is created we need to change it&#8217;s setting in <code>govstats/setting.py</code> file.</p>
<p>First modify section <code>DATABASE</code> to contain information about sqlite3 engine and path to database file. I also changed timezone and language code for Polish and enabled admin and admin-docs sites.</p>
<blockquote>
<pre>DATABASES = {
 'default': {
 'ENGINE': 'django.db.backends.sqlite3',
 'NAME': 'govstats.db',
 'USER': '',
 'PASSWORD': '',
 'HOST': '',
 'PORT': '',
 }
}
TIME_ZONE = 'Europe/Warsaw'
LANGUAGE_CODE = 'pl-pl'
INSTALLED_APPS = (
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.admin',
 'django.contrib.admindocs',
)</pre>
</blockquote>
<p>To enable connecting to admin and admin-docs sites we also need to modify <code>govstats/urls.py</code> file:</p>
<blockquote>
<pre>from django.conf.urls.defaults import *

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
 # Example:
 # (r'^govstats/', include('govstats.foo.urls')),

 (r'^admin/doc/', include('django.contrib.admindocs.urls')),
 (r'^admin/', include(admin.site.urls)),
)</pre>
</blockquote>
<p>When we set up those files we can create database file using command, executing in <code>govstats</code> directory:</p>
<blockquote>
<pre>python.exe manage.py syncdb</pre>
</blockquote>
<h3>Testing project</h3>
<p>To check our site we can run django integrated web server executing command below and visit <code>http://localhost:80</code>/admin address.</p>
<blockquote>
<pre>python.exe manage.py runserver :80</pre>
</blockquote>
<p>That&#8217;s all for now. Stay tuned!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pascon.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pascon.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pascon.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pascon.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pascon.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pascon.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pascon.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pascon.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pascon.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pascon.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pascon.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pascon.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pascon.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pascon.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pascon.wordpress.com&amp;blog=444566&amp;post=9&amp;subd=pascon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pascon.wordpress.com/2010/11/01/django-begin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1484f202f3bb0a7af3b5938b9bdae828?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pascon</media:title>
		</media:content>
	</item>
	</channel>
</rss>
