<?xml version="1.0" encoding="UTF-8"?><!-- generator="WordPress/2.9.1" -->
<rss version="0.92">
<channel>
	<title>Flapping Head</title>
	<link>http://scottbarnham.com/blog</link>
	<description>Code and comments on web development, Django, Python and things (un)related.</description>
	<lastBuildDate>Sun, 07 Mar 2010 19:35:15 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	
	<item>
		<title>Emulating Django blocks with Smarty capture</title>
		<description><![CDATA[Django blocks considered addictive
I do Django development for Red Robot Studios and one of the many great things about the Django web framework is the template system.
Using blocks and inheritance, repetitive html is kept to a minimum.  For example you can do:
base.html
...
&#60;title&#62;{% block title %}Default Title{% endblock %}&#60;/title&#62;
...
&#60;div id="content"&#62;
{% block content %}{% endblock %}
&#60;/div&#62;
...
home.html
{% [...]]]></description>
		<link>http://scottbarnham.com/blog/2010/01/02/emulating-django-blocks-with-smarty-capture/</link>
			</item>
	<item>
		<title>Migrating Postgresql Databases the Easy Way</title>
		<description><![CDATA[When you upgrade Postgresl to a new major version (e.g. 8.1 to 8.3), all databases need to be dumped from the old version and loaded in to the new version.  It&#8217;s not difficult, but on Debian there&#8217;s a really easy way.
Debian has pg_createcluster, pg_dropcluster and pg_upgradecluster (plus a few others).  The one I&#8217;m [...]]]></description>
		<link>http://scottbarnham.com/blog/2009/06/23/migrating-postgresql-databases-the-easy-way/</link>
			</item>
	<item>
		<title>Gvim menu bar missing</title>
		<description><![CDATA[I just opened gvim on my Ubuntu (Hardy Heron) box and found there was no menu bar (File, Edit, etc).
After messing with some guioptions and getting nowhere I ran gvim as root (using sudo) and the menu bar was there.  The answer came from a forum post by &#8220;Marko&#8221;:
Delete the file ~/.gnome2/Vim
It will be [...]]]></description>
		<link>http://scottbarnham.com/blog/2009/03/09/gvim-menu-bar-missing/</link>
			</item>
	<item>
		<title>Layoff Talent &#8211; Django project just launched</title>
		<description><![CDATA[Andrew and I spent a few days this week putting together a new Django project.
It&#8217;s called Layoff Talent and it&#8217;s a place for people in the tech industry who have been laid off and are looking for a new job.  They can add a simple profile and then hopefully be picked up by employers [...]]]></description>
		<link>http://scottbarnham.com/blog/2008/12/11/layoff-talent-django-project-just-launched/</link>
			</item>
	<item>
		<title>Get User from session key in Django</title>
		<description><![CDATA[Error emails contain session key
When you get an error email from your Django app telling you someone got a server error, it&#8217;s not always easy to tell which user had a problem.  It might help your debugging to know or you might want to contact the user to tell them you have fixed the [...]]]></description>
		<link>http://scottbarnham.com/blog/2008/12/04/get-user-from-session-key-in-django/</link>
			</item>
	<item>
		<title>Dynamic upload paths in Django</title>
		<description><![CDATA[For a while I&#8217;ve been using the CustomImageField as a way to specify an upload path for images.  It&#8217;s a hack that lets you use ids or slugs from your models in the upload path, e.g.:
/path/to/media/photos/1234/flowers.jpg
or
/path/to/media/photos/scotland-trip/castle.jpg
CustomImageField no more
Since the FileStorageRefactor was merged in to trunk r8244, it&#8217;s no longer necessary to use the custom [...]]]></description>
		<link>http://scottbarnham.com/blog/2008/08/25/dynamic-upload-paths-in-django/</link>
			</item>
	<item>
		<title>Extending the Django User model with inheritance</title>
		<description><![CDATA[Extra fields for Users
Most of the Django projects I&#8217;ve worked on need to store information about each user in addition to the standard name and email address held by the contrib.auth.models.User model.
The old way: User Profiles
The solution in the past was to create a &#8220;user profile&#8221; model which is associated 1-to-1 with the user.  [...]]]></description>
		<link>http://scottbarnham.com/blog/2008/08/21/extending-the-django-user-model-with-inheritance/</link>
			</item>
	<item>
		<title>Django performance testing &#8211; a real world example</title>
		<description><![CDATA[About a week ago Andrew and I launched a new Django-powered site called Hey! Wall.  It&#8217;s a social site along the lines of &#8220;the wall&#8221; on social networks and gives groups of friends a place to leave messages, share photos, videos and links.
We wanted to gauge performance and try some server config and code [...]]]></description>
		<link>http://scottbarnham.com/blog/2008/04/28/django-performance-testing-a-real-world-example/</link>
			</item>
	<item>
		<title>Serving websites from svn checkout considered harmful</title>
		<description><![CDATA[Serving from a working copy
A simple way to update sites is to serve them from Subversion working copies.  Checkout the code on the server, develop and commit changes, then svn update the server when you&#8217;re ready to release.
Security concerns
There&#8217;s a potential security problem with this.  Subversion keeps track of meta-data and original versions [...]]]></description>
		<link>http://scottbarnham.com/blog/2008/04/22/serving-websites-from-svn-checkout-considered-harmful/</link>
			</item>
	<item>
		<title>ImageField and edit_inline revisited</title>
		<description><![CDATA[A while back I wrote about using edit inline with image and file fields.  Specifically, I suggested adding an uneditable BooleanField as the core field of the related model.  This means you don&#8217;t have to set the ImageField or FileField to be core (which would cause confusing behaviour).
Removing the related model
The downside to [...]]]></description>
		<link>http://scottbarnham.com/blog/2008/02/24/imagefield-and-edit_inline-revisited/</link>
			</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.283 seconds -->
<!-- Cached page served by WP-Cache -->
