<?xml version="1.0" encoding="UTF-8"?><!-- generator="WordPress/2.8.4" -->
<rss version="0.92">
<channel>
	<title>Blog from the Loft &#187; django</title>
	<link>http://www.pkshiu.com/loft</link>
	<description>Thoughts without walls</description>
	<lastBuildDate>Fri, 12 Mar 2010 16:07:11 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	
	<item>
		<title>My Accidental Connection with Senator Ted Kennedy</title>
		<description>Being Chinese in Boston, I always hear positive stories about the late Senator Ted Kennedy helping immigrants. In addition, I agree with most of his political views, he seemed like a good Senator. After learning of his death, I felt we had lost a great man. I added one of ...</description>
		<link>http://www.pkshiu.com/loft/archive/2009/08/my-accidental-connection-with-senator-ted-kennedy</link>
			</item>
	<item>
		<title>Django Production Error Handler</title>
		<description>I am working on an application that, besides providing a dynamic website, also talks to an iPhone application. What happens when the iPhone, or a web visitor, triggered a bug in the application?

Django actually provide a nice mechanism to report error in its "batteries included" goodness. You can easily setup ...</description>
		<link>http://www.pkshiu.com/loft/archive/2009/03/django-production-error-handler</link>
			</item>
	<item>
		<title>Fix Python source code to use spaces instead of tabs</title>
		<description>What if someone gave you a Python source file that is indented using tabs? If you are using emacs, the following will let you convert it back to using spaces:

# first set the buffer tab width to 4 (or whatever you like)

M-x set-variable &#60;return&#62; tab-width &#60; return&#62; 4

# then mark ...</description>
		<link>http://www.pkshiu.com/loft/archive/2008/12/fix-python-source-code-to-use-spaces-instead-of-tabs</link>
			</item>
	<item>
		<title>I am in the NY Times, sorta</title>
		<description>Check out the NYTimes article on WilsonDailyPrep. We at Imperial Consulting did the application, using Django and Python. It is a great service and a lot of fun to work on (my own vocab and grammar has gotten better, the Math quizzes are too easy). I am glad it is ...</description>
		<link>http://www.pkshiu.com/loft/archive/2008/11/i-am-in-the-ny-times-sorta</link>
			</item>
	<item>
		<title>Serving favicon in an Django App using Apache</title>
		<description>I got a free few minutes to work on my own site here. Since I migrated the site from all static pages to Django served, I still haven't put back the favicon icon back onto the site. The sites runs under a virtual host in apache2 at WebFaction. This is ...</description>
		<link>http://www.pkshiu.com/loft/archive/2008/08/serving-favicon-in-an-django-app-using-apache</link>
			</item>
	<item>
		<title>Resetting Django Admin Password</title>
		<description>This barely qualifies for a blog post, but what to do if you loaded, via django-admin.py loaddata
a full json file from someone during testing, and don't have their user's password?

Just run the django-admin.py shell, and by hand reset all the passwords:

from django.contrib.auth.models import User
for u in Users:
u.set_password('secret')
u.save()

That's why you have ...</description>
		<link>http://www.pkshiu.com/loft/archive/2008/08/resetting-django-admin-password</link>
			</item>
	<item>
		<title>Django and PyTextile Revisited</title>
		<description>I wrote a post earlier about PyTextile not working well in Django. James Bennet was nice enough to add some pointers to the issue. (Comments are working now on my Blog). Now that I am using textile more, I want to investigate and document the issue better.

Most importantly, the problem ...</description>
		<link>http://www.pkshiu.com/loft/archive/2008/07/django-and-pytextile-revisited</link>
			</item>
	<item>
		<title>J2EE to Django, slides for the Presentation at Cambridge Python Meetup</title>
		<description>I gave a short presentation on Django to the Cambridge Python Users group earlier. Nate has a great writeup of the event and the other presentations that evening. I just want to share the slides here. The slides are just visual reminders and do not stand on their own. If ...</description>
		<link>http://www.pkshiu.com/loft/archive/2008/06/j2ee-to-django-slides-for-the-presentation-at-cambridge-python-meetup</link>
			</item>
	<item>
		<title>Django Tip: No leading slash for upload_to for FileField and ImageField</title>
		<description>This is a common mistake. When defining a FileField or an ImageField, you need to specify
where the files are stored. This is done by specifying a relative path in the upload_to
argument. Django will then store your files in a subdirectory as named, under the MEDIA_ROOT
directory. But, don't put a leading ...</description>
		<link>http://www.pkshiu.com/loft/archive/2008/05/django-tip-no-leading-slash-for-upload_to-for-filefield-and-imagefield</link>
			</item>
	<item>
		<title>Django Tip: Outputting list of items separated by commas, but only if it has more than one item</title>
		<description>How many times do you need to do this? You have a list of things to output. The list can be empty, has one element, or more. You want to separate each items with a separator for readability. What do you do?

1. The simple but not reader friendly way:

toppings = ...</description>
		<link>http://www.pkshiu.com/loft/archive/2008/04/django-tip-outputting-list-of-items-separated-by-commas-but-only-if-it-has-more-than-one-item</link>
			</item>
</channel>
</rss>
