<?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>peach³</title>
	<atom:link href="http://peach3.nl/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://peach3.nl/blog</link>
	<description>A web based course management system</description>
	<lastBuildDate>Mon, 24 Jan 2011 08:27:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>New release: version 1.0-beta4</title>
		<link>http://peach3.nl/blog/2010/05/new-release-version-1-0-beta4/</link>
		<comments>http://peach3.nl/blog/2010/05/new-release-version-1-0-beta4/#comments</comments>
		<pubDate>Mon, 31 May 2010 09:27:32 +0000</pubDate>
		<dc:creator>Erik Scheffers</dc:creator>
				<category><![CDATA[Peach³]]></category>
		<category><![CDATA[1.0-beta4]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://peach3.nl/blog/?p=169</guid>
		<description><![CDATA[A new version of peach³ has been released today.]]></description>
			<content:encoded><![CDATA[<p>Although not originally planned, today we&#8217;ve released an intermediate version of peach³. There have been several important changes and fixes to warrant this new release. Most changes are related to the course management functionality.</p>
<p>For a full list of changes, see the <a href="http://peach3.nl/trac/wiki/Changelog#a1.0-beta4" target="_blank">changelog on trac</a>.</p>
<p>The new release can be downloaded from the <a href="http://peach3.nl/trac/wiki/Downloads" target="_blank">peach³ download page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://peach3.nl/blog/2010/05/new-release-version-1-0-beta4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Largest open-source Django project</title>
		<link>http://peach3.nl/blog/2010/03/largest-open-source-django-project/</link>
		<comments>http://peach3.nl/blog/2010/03/largest-open-source-django-project/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 18:01:32 +0000</pubDate>
		<dc:creator>Erik Scheffers</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[Peach³]]></category>
		<category><![CDATA[Open source]]></category>
		<category><![CDATA[SLoC]]></category>

		<guid isPermaLink="false">http://peach3.nl/blog/?p=162</guid>
		<description><![CDATA[Thierry Schellenbach from YouTellMe.nl recently wrote on his blog that their site is probably the largest Django project in terms of codebase. Since their project isn&#8217;t open-source, it&#8217;s hard to tell if that claim is true or not.
But it got me wondering. What is the largest open-source Django-based project around?

Some times ago I already posted some &#8217;source [...]]]></description>
			<content:encoded><![CDATA[<p>Thierry Schellenbach from <a style="color: #87a019; text-decoration: none;" href="http://www.youtellme.nl/">YouTellMe.nl</a> recently <a href="http://www.mellowmorning.com/2010/03/19/django-based-startup-youtellme-nl/">wrote on his blog</a> that their site is probably the largest Django project in terms of codebase. Since their project isn&#8217;t open-source, it&#8217;s hard to tell if that claim is true or not.</p>
<p>But it got me wondering. What <em>is</em> the largest <strong>open-source</strong> Django-based project around?</p>
<p><span id="more-162"></span></p>
<p>Some times ago I already <a href="http://peach3.nl/blog/2009/11/slocs/">posted</a> some &#8217;source lines of code&#8217; (SLoCs) metrics about the Peach³ Django project (41209 at the time).</p>
<p>But is SLoCs the best way to define which project is the largest? Or maybe we should use some more &#8216;Django-based&#8217; metrics, like number of unique apps (22 for Peach³) or number of models (86)?</p>
<p>Or maybe the largest project is the project with the most people using it on a day-to-day basis (approximately 350 for Peach³ at the moment).</p>
<p>And, using any of these metrics, what would be the largest Django-based open-source project around at the moment? I could not find any metrics of any other projects.</p>
<p>I feel Peach³ might actually be one of the bigger projects out there, but I have nothing to base that feeling on.</p>
]]></content:encoded>
			<wfw:commentRss>http://peach3.nl/blog/2010/03/largest-open-source-django-project/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>First peach³ packaged release</title>
		<link>http://peach3.nl/blog/2009/12/first-peach3-packaged-release/</link>
		<comments>http://peach3.nl/blog/2009/12/first-peach3-packaged-release/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 15:05:14 +0000</pubDate>
		<dc:creator>Erik Scheffers</dc:creator>
				<category><![CDATA[Peach³]]></category>
		<category><![CDATA[1.0-beta3]]></category>
		<category><![CDATA[Open source]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://peach3.nl/blog/?p=157</guid>
		<description><![CDATA[Today we released the first &#8220;packaged&#8221; version of peach³, version 1.0-beta3.
The mercurial repository was already open for anyone interested in our project, but most people like a packaged version over a repository. Also installation documentation was lacking.
This has now all been solved with this packaged release.
Downloads for peach³ will from now on be available from [...]]]></description>
			<content:encoded><![CDATA[<p>Today we released the first &#8220;packaged&#8221; version of peach³, version 1.0-beta3.</p>
<p>The mercurial repository was already open for anyone interested in our project, but most people like a packaged version over a repository. Also installation documentation was lacking.</p>
<p><span id="more-157"></span>This has now all been solved with this packaged release.</p>
<p>Downloads for peach³ will from now on be available from the <a title="downloads" href="http://peach3.nl/trac/wiki/Downloads" target="_blank">downloads</a> page. Documentation is also linked from that page, and also included in the download.</p>
]]></content:encoded>
			<wfw:commentRss>http://peach3.nl/blog/2009/12/first-peach3-packaged-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SLoCs</title>
		<link>http://peach3.nl/blog/2009/11/slocs/</link>
		<comments>http://peach3.nl/blog/2009/11/slocs/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 13:52:04 +0000</pubDate>
		<dc:creator>Erik Scheffers</dc:creator>
				<category><![CDATA[Peach³]]></category>
		<category><![CDATA[SLoC]]></category>

		<guid isPermaLink="false">http://peach3.nl/blog/?p=153</guid>
		<description><![CDATA[Managers like numbers. Source Lines of Code (SLoC) is such a number. Today I counted the number of sourcelines written by me for peach³.
These statistics include the peach3-django, peach3-compare and  django-pdfviewer packages.

Python: 22247 lines
Javascript: 12146 lines
html: 4473 lines
css: 2343 lines

That&#8217;s a total of 41209 lines of code, written in just under 3 years.
]]></description>
			<content:encoded><![CDATA[<p>Managers like numbers. Source Lines of Code (SLoC) is such a number. Today I counted the number of sourcelines written by me for peach³.</p>
<p><span id="more-153"></span>These statistics include the peach3-django, peach3-compare and  django-pdfviewer packages.</p>
<ul>
<li><strong>Python</strong>: 22247 lines</li>
<li><strong>Javascript</strong>: 12146 lines</li>
<li><strong>html</strong>: 4473 lines</li>
<li><strong>css</strong>: 2343 lines</li>
</ul>
<p>That&#8217;s a total of 41209 lines of code, written in just under 3 years.</p>
]]></content:encoded>
			<wfw:commentRss>http://peach3.nl/blog/2009/11/slocs/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Public repository</title>
		<link>http://peach3.nl/blog/2009/08/public-repository/</link>
		<comments>http://peach3.nl/blog/2009/08/public-repository/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 12:56:22 +0000</pubDate>
		<dc:creator>Erik Scheffers</dc:creator>
				<category><![CDATA[Peach³]]></category>
		<category><![CDATA[Open source]]></category>

		<guid isPermaLink="false">http://peach3.nl/blog/?p=149</guid>
		<description><![CDATA[The peach³ repository is now open for anyone interested in the project.
I still have to write installation documentation, but as it is a Django project, the installation instructions over at the djangoproject.com site also apply to peach³. Once the current version has been tested to be stable (by a couple of hundred first-year students  [...]]]></description>
			<content:encoded><![CDATA[<p>The peach³ <a href="http://hg.peach3.nl/">repository</a> is now open for anyone interested in the project.</p>
<p>I still have to write installation documentation, but as it is a Django project, the installation instructions over at the <a href="http://djangoproject.com/">djangoproject.com</a> site also apply to peach³. Once the current version has been tested to be stable (by a couple of hundred first-year students <img src='http://peach3.nl/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ) a downloadable packaged version will be released.</p>
]]></content:encoded>
			<wfw:commentRss>http://peach3.nl/blog/2009/08/public-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Peach³ public demo live</title>
		<link>http://peach3.nl/blog/2009/06/peach%c2%b3-public-demo-live/</link>
		<comments>http://peach3.nl/blog/2009/06/peach%c2%b3-public-demo-live/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 20:13:27 +0000</pubDate>
		<dc:creator>Erik Scheffers</dc:creator>
				<category><![CDATA[Peach³]]></category>
		<category><![CDATA[demo]]></category>

		<guid isPermaLink="false">http://peach3.nl/blog/?p=146</guid>
		<description><![CDATA[The peach³ public demo is now available at http://demo.peach3.nl/
Registration is open for everyone.  Please read the Terms of Use before using the system.
]]></description>
			<content:encoded><![CDATA[<p>The peach³ public demo is now available at<a title="http://demo.peach3.nl/" href="http://demo.peach3.nl/" target="_blank"> http://demo.peach3.nl/</a></p>
<p>Registration is open for everyone.  Please read the <a title="Terms of Use" href="http://demo.peach3.nl/wiki/TermsOfUse" target="_blank">Terms of Use</a> before using the system.</p>
]]></content:encoded>
			<wfw:commentRss>http://peach3.nl/blog/2009/06/peach%c2%b3-public-demo-live/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrating Django models with south and converting data</title>
		<link>http://peach3.nl/blog/2009/02/migrating-django-models-with-south-and-converting-data/</link>
		<comments>http://peach3.nl/blog/2009/02/migrating-django-models-with-south-and-converting-data/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 10:08:05 +0000</pubDate>
		<dc:creator>Erik Scheffers</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[migration]]></category>
		<category><![CDATA[south]]></category>

		<guid isPermaLink="false">http://peach3.nl/blog/?p=125</guid>
		<description><![CDATA[I use South whenever a model needs to be changed. One thing that is not really documented in the South documentation is how to convert data. After some trial and error I found a way to use Django QuerySets to access both the old and new models to convert data.
 For example, I used to [...]]]></description>
			<content:encoded><![CDATA[<p>I use <a href="http://south.aeracode.org/" target="_blank">South</a> whenever a model needs to be changed. One thing that is not really documented in the South documentation is how to convert data. After some trial and error I found a way to use Django QuerySets to access both the old and new models to convert data.</p>
<p><span id="more-125"></span> For example, I used to have two models defined like this:</p>
<pre lang="python">class Assignment(models.Model):
    course = models.ForeignKey(Course)
    name = models.CharField(max_length=100)

class AssignmentEdition(models.Model):
    assignment = models.ForeignKey(Assignment)
    # ... other fields</pre>
<p>The way the assignments were defined, each edition of an assignment has the same name. I needed to change this into:</p>
<pre lang="python">class Assignment(models.Model):
    course = models.ForeignKey(Course)

class AssignmentEdition(models.Model):
    assignment = models.ForeignKey(Assignment)
    name = models.CharField(max_length=100)
    # ... other fields</pre>
<p>Each edition has it&#8217;s own name. It&#8217;s still possible for editions to have the same name, but it is also possible to have a different name and still be an edition of the same assignment.</p>
<p>During the migration I want each assignment edition to get the name of it&#8217;s assignment. One way to do this is to use SQL queries to get the names of the assignments and update the assignment edition names, but that&#8217;s not very Django-like. I want to use QuerySets. I solved it in the following way (this works with Django 1.0.2 and South 0.4):</p>
<pre lang="python">from south.db import db
from django.db import models

class Assignment(models.Model):
    name = models.CharField(max_length=100)

    class Meta:
        db_table = 'assignment_assignment'
        app_label = 'assignment_migrations_0002_assignment_names'

class AssignmentEdition(models.Model):
    assignment = models.ForeignKey(Assignment)
    name = models.CharField(max_length=100)

    class Meta:
        db_table = 'assignment_assignmentedition'
        app_label = 'assignment_migrations_0002_assignment_names'

class Migration:
    def forwards(self):
        db.start_transaction()

        # Add the new name column to AssignmentEdition
        db.add_column('assignment_assignmentedition', 'name',
                      models.CharField(max_length=100))

        # Convert the existing data
        if not db.dry_run:
            db.commit_transaction()
            db.start_transaction()

            for ae in AssignmentEdition.objects.all():
                ae.name = ae.assignment.name
                ae.save()

        # Delete the name column from Assignment
        db.delete_column('assignment_assignment', 'name')

        db.commit_transaction()

    def backwards(self):
        raise NotImplementedError</pre>
<p>First, I need to create the models as they are when I want to convert the data. I can&#8217;t rely on definitions in <code>models.py</code> because first of all Assignment won&#8217;t have any name defined there, and secondly a future migration might remove the name field from AssignmentEdition as well. Also I only include the fields that are needed for the conversion here, so eg. the course field in Assignment is not included.</p>
<p>The Meta options are required for Django to be able to find the correct database tables. The <code>db_table</code> meta option is the table name (as created by Django), the <code>app_label</code> meta option is required because Django caches it&#8217;s models, and if I were to define another AssignmentEdition in another migration, Django will use the AssignmentEdition defined here instead of the one for that migration. It uses <code>app_label</code> as the key for this caching, so <code>app_label</code> needs to be a unique label for this migration.</p>
<p>The rest is pretty straightforward: after adding the new <code>name</code> column and saving the transaction, I can loop over all existing assignment editions and update the name field using a standard Django QuerySet. After the conversion the name column in Assignment can be deleted.</p>
]]></content:encoded>
			<wfw:commentRss>http://peach3.nl/blog/2009/02/migrating-django-models-with-south-and-converting-data/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Poster</title>
		<link>http://peach3.nl/blog/2009/02/poster/</link>
		<comments>http://peach3.nl/blog/2009/02/poster/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 13:05:10 +0000</pubDate>
		<dc:creator>Erik Scheffers</dc:creator>
				<category><![CDATA[Peach³]]></category>
		<category><![CDATA[poster]]></category>

		<guid isPermaLink="false">http://peach3.nl/blog/?p=107</guid>
		<description><![CDATA[A poster explaining what peach is:

Download the pdf here.
]]></description>
			<content:encoded><![CDATA[<p>A poster explaining what peach is:</p>
<p><span id="more-107"></span></p>
<div id="attachment_113" class="wp-caption aligncenter" style="width: 410px"><a href="http://peach3.nl/trac/raw-attachment/wiki/Publications/peachposter.pdf"><img class="size-full wp-image-113" title="peachposter-400" src="http://peach3.nl/blog/wp-content/uploads/2009/02/peachposter-400.jpg" alt="peachposter-400" width="400" height="566" /></a><p class="wp-caption-text">Peach Poster</p></div>
<p>Download the pdf <a href="http://peach3.nl/trac/raw-attachment/wiki/Publications/peachposter.pdf" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://peach3.nl/blog/2009/02/poster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Django development environment</title>
		<link>http://peach3.nl/blog/2009/02/my-django-development-environment/</link>
		<comments>http://peach3.nl/blog/2009/02/my-django-development-environment/#comments</comments>
		<pubDate>Wed, 04 Feb 2009 14:10:39 +0000</pubDate>
		<dc:creator>Erik Scheffers</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[aptana]]></category>
		<category><![CDATA[buildout]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://peach3.nl/blog/?p=78</guid>
		<description><![CDATA[IDE
After using a few other IDE&#8217;s I settled down with Eclipse with Aptana plug-in as the IDE I use for peach³ development. This one environment has support for everything I need while developing a Django application: Python, HTML and JavaScript support is great, with code completion, including completion for the Ext.js javascript library. And I [...]]]></description>
			<content:encoded><![CDATA[<h3>IDE</h3>
<p>After using a <a href="http://pype.sourceforge.net/" target="_blank">few</a> <a href="http://pythonide.blogspot.com/" target="_blank">other</a> <a href="http://www.kdevelop.org/" target="_blank">IDE</a>&#8217;s I settled down with <a href="http://www.eclipse.org/" target="_blank">Eclipse</a> with <a href="http://www.aptana.com/" target="_blank">Aptana</a> plug-in as the IDE I use for peach³ development. This one environment has support for everything I need while developing a Django application: Python, HTML and JavaScript support is great, with code completion, including completion for the Ext.js javascript library. And I even have the idea that I&#8217;m not using the full power of Eclipse yet.</p>
<p><span id="more-78"></span></p>
<p>By default, Eclipse and Aptana have no Python support, but it can be integrated with <a href="http://fabioz.com/pydev/manual_101_root.html">PyDev</a>.</p>
<p>The only thing missing to make it <em>the</em> best environment (in my opinion) is support for Django template tags: a Django template tag inside a HTML or JavaScript file usually results in an inline error message. But you can just ignore these error messages.</p>
<p>For some of the most used Django management commands (runserver and test) I&#8217;ve defined &#8216;tools&#8217; in the Eclipse interface and I can now start my development server or run the testsuite with a single click inside Eclipse.</p>
<p>Here is how I set up the single-click runserver tool:</p>
<p>In &#8220;<em>Run</em> &gt; <em>External Tools</em> &gt; <em>External Tools&#8230;</em>&#8221; I&#8217;ve added a new tool called &#8220;Django Runserver&#8221; and I set up the following on the <em>Main</em>-tab of the tool configuration:</p>
<table border="0">
<tbody>
<tr>
<td><strong>Location:</strong></td>
<td><code>${workspace_loc:/django/bin/django}</code></td>
</tr>
<tr>
<td><strong>Working Directory:</strong></td>
<td><code>${workspace_loc:/django}</code></td>
</tr>
<tr>
<td><strong>Arguments:</strong></td>
<td><code>runserver localhost:8080</code></td>
</tr>
</tbody>
</table>
<p>I had to setup one more thing: without it, some of the output is lost and output on standard out and standard error won&#8217;t be in the correct order: On the <em>Environment</em>-tab of the tool configuration I had to add the environment variable &#8216;<code>PYTHONUNBUFFERED</code>&#8216; with value &#8216;Y&#8217;.</p>
<p>That&#8217;s it. Now you can click &#8216;Django runserver&#8217; in the tools menu (see picture below) and the Django development server starts, with it&#8217;s output captured inside Eclipse.</p>
<p><img class="aligncenter size-full wp-image-95" title="eclipse-tools" src="http://peach3.nl/blog/wp-content/uploads/2009/02/eclipse-tools.png" alt="eclipse-tools" width="500" height="298" /></p>
<p>I&#8217;ve set up a similar tool to run the tests and to update the development environment, for which I use buildout.</p>
<h3>zc.buildout</h3>
<p>Using tips <a href="http://www.stereoplex.com/two-voices/a-django-development-environment-with-zc-buildout" target="_blank">in this blog posting</a> I have set up a development environment that is seperate from my local python installation using zc.buildout. This has the advantage that I do not have to keep track of the versions of all the python packages and external Django apps I&#8217;m using, all this information is stored in the buildout configuration. A simple &#8220;<code>bin/buildout</code>&#8221; command suffices to setup a working environment for a local development version of peach³, and I&#8217;ve set this command up as another tool in Eclipse.</p>
<p>Here is snippet of my current <strong>buildout.cfg</strong>:</p>
<pre lang="text">[buildout]
parts =
  django
  extras
eggs =
  werkzeug
  pytz
  pygments
  chardet
  docutils
  south
  python-memcached
  mysql-python

[extras]
recipe = iw.recipe.subversion
urls =
  http://django-command-extensions.googlecode.com/svn/trunk/ django-command-extensions

[django]
recipe = djangorecipe
version = 1.0.2
settings = development
project = peach3
eggs =
  ${buildout:eggs}
extra-paths =
  ${extras:location}/django-command-extensions/</pre>
<p>This script contains everything needed to setup the right environment for the Django development server.</p>
]]></content:encoded>
			<wfw:commentRss>http://peach3.nl/blog/2009/02/my-django-development-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Article in &#8216;Olympiads in Informatics&#8217;</title>
		<link>http://peach3.nl/blog/2009/02/article-in-olympiads-in-informatics/</link>
		<comments>http://peach3.nl/blog/2009/02/article-in-olympiads-in-informatics/#comments</comments>
		<pubDate>Wed, 04 Feb 2009 12:09:47 +0000</pubDate>
		<dc:creator>Erik Scheffers</dc:creator>
				<category><![CDATA[Peach³]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[ioi]]></category>

		<guid isPermaLink="false">http://peach3.nl/blog/?p=84</guid>
		<description><![CDATA[In Olympiads in Informatics, 2008 vol. 2, an article was published on &#8220;Programming Task Packages: Peach Exchange Format&#8220;
]]></description>
			<content:encoded><![CDATA[<p>In <em>Olympiads in Informatics</em>, 2008 vol. 2, an article was published on &#8220;<a href="http://www.mii.lt/olympiads_in_informatics/htm/INFOL019.htm" target="_blank">Programming Task Packages: Peach Exchange Format</a>&#8220;</p>
]]></content:encoded>
			<wfw:commentRss>http://peach3.nl/blog/2009/02/article-in-olympiads-in-informatics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

