<?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>Colton J. Provias &#187; Computing</title>
	<atom:link href="http://coltonprovias.com/category/computing/feed/" rel="self" type="application/rss+xml" />
	<link>http://coltonprovias.com</link>
	<description>Composer and Programmer</description>
	<lastBuildDate>Sun, 25 Jul 2010 06:09:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>Django Tip: South and TinyMCE</title>
		<link>http://coltonprovias.com/2010/04/16/django-tip-south-and-tinymce/</link>
		<comments>http://coltonprovias.com/2010/04/16/django-tip-south-and-tinymce/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 19:17:01 +0000</pubDate>
		<dc:creator>Colton Provias</dc:creator>
				<category><![CDATA[Django/Python]]></category>

		<guid isPermaLink="false">http://coltonprovias.com/?p=1247</guid>
		<description><![CDATA[This comes from a small issue that I ran into while working on one of my projects.  When I would try using django-tinymce&#8216;s HTMLField while using South, it would throw a nice error when attempting a migration.  To anyone else having this issue, you may be pleased to know that the fix is simple.  Add [...]]]></description>
			<content:encoded><![CDATA[<p>This comes from a small issue that I ran into while working on one of my projects.  When I would try using d<a href="http://code.google.com/p/django-tinymce/">jango-tinymce</a>&#8216;s HTMLField while using <a href="http://south.aeracode.org/">South</a>, it would throw a nice error when attempting a migration.  To anyone else having this issue, you may be pleased to know that the fix is simple.  Add the following code to the models.py file that contains the models that are affected (have at least one HTMLField).  I personally recommend placing it after the import statements and before the model classes.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> south.<span style="color: black;">modelsinspector</span> <span style="color: #ff7700;font-weight:bold;">import</span> add_introspection_rules
add_introspection_rules<span style="color: black;">&#40;</span><span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>, <span style="color: black;">&#91;</span><span style="color: #483d8b;">&quot;^tinymce<span style="color: #000099; font-weight: bold;">\.</span>models<span style="color: #000099; font-weight: bold;">\.</span>HTMLField&quot;</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://coltonprovias.com/2010/04/16/django-tip-south-and-tinymce/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Android Apps: Facebook, Foursquare, WordPress</title>
		<link>http://coltonprovias.com/2010/04/13/android-apps-facebook-foursquare-wordpress-2/</link>
		<comments>http://coltonprovias.com/2010/04/13/android-apps-facebook-foursquare-wordpress-2/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 05:34:28 +0000</pubDate>
		<dc:creator>Colton Provias</dc:creator>
				<category><![CDATA[Computing]]></category>

		<guid isPermaLink="false">http://coltonprovias.com/2010/04/13/android-apps-facebook-foursquare-wordpress-2/</guid>
		<description><![CDATA[Ever since I got it, my Motorola Droid has basically replaced my iPod for apps. This means that my iPod has been reduced to being an MP3 player (which it is). Meanwhile, I&#8217;ve had some time with the apps on the Droid so I thought that I give some opinion. Facebook Facebook&#8217;s app is very [...]]]></description>
			<content:encoded><![CDATA[<p>Ever since I got it, my Motorola Droid has basically replaced my iPod for apps. This means that my iPod has been reduced to being an MP3 player (which it is).  Meanwhile, I&#8217;ve had some time with the apps on the Droid so I thought that I give some opinion.</p>
<h2>Facebook</h2>
<p>Facebook&#8217;s app is very well designed. It features built in chat, pages, and messaging. The design is very sleek and&#8230;</p>
<p>Wait, that&#8217;s the Facebook iPhone app.</p>
<p>The Android app for Facebook is poorly designed. Most tasks are handled by launching a browser and displaying the mobile (not touch nor lite) version of Facebook. Android also makes it easily possible to sync your contacts with your Facebook account. Thus Facebook Sync puts people in the awkward situation of contacting a person without having to ask for their number first. When asked where did one get their number from, there is nothing that sounds more stalkerish and creepy than &#8220;my phone got it from Facebook.&#8221;</p>
<h2>Foursquare</h2>
<p>As if tweeting about what you are doing wasn&#8217;t enough, now you can earn points by going to places for no reason!</p>
<p>I&#8217;ll admit that I am addicted to Foursquare. The premise is simple: the user visits a place and checks in. By checking in, they earn points and badges. The person with the most check-ins at a single place is crowned the mayor. All of this is posted to a website for the world to see. You can see my profile <a href="http://foursquare.com/user/coltonprovias">here</a>. At the time of this post, I am proud to say that I am the mayor of Five Guys Burgers and Fries and The West Wing.</p>
<p>Foursquare&#8217;s Android app is really well designed. It makes use of Android&#8217;s location services and gives a reasonably accurate list of venues. I just wish that there was a way to correct locations from the app. Somebody put the Willard Building at the wrong end of Pollock Rd. and it rather irks me.</p>
<h2>WordPress</h2>
<p>It&#8217;s a lot like the iPhone app, and the recent redesign looks great. The design for editing content can be cleaned up some more. Plus, it really should allow for managing more posts along with category and link management. All in all, it&#8217;s a good app and it works well.</p>
]]></content:encoded>
			<wfw:commentRss>http://coltonprovias.com/2010/04/13/android-apps-facebook-foursquare-wordpress-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Django on DreamHost with Passenger</title>
		<link>http://coltonprovias.com/2009/09/21/django-on-dreamhost-with-passenger/</link>
		<comments>http://coltonprovias.com/2009/09/21/django-on-dreamhost-with-passenger/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 14:37:13 +0000</pubDate>
		<dc:creator>Colton Provias</dc:creator>
				<category><![CDATA[Django/Python]]></category>

		<guid isPermaLink="false">http://coltonprovias.com/?p=925</guid>
		<description><![CDATA[Django has always been slow for me on Dreamhost thanks to FastCGI but not anymore.  As of yesterday, I am using Passenger WSGI to launch my django applications and a significant performance increase is easily noted.  For those wanting to use Passenger, here are some simple instrutions: Warning: Passenger WSGI support is still just proof [...]]]></description>
			<content:encoded><![CDATA[<p>Django has always been slow for me on Dreamhost thanks to FastCGI but not anymore.  As of yesterday, I am using Passenger WSGI to launch my django applications and a significant performance increase is easily noted.  For those wanting to use Passenger, here are some simple instrutions:</p>
<p><span style="color: #ff0000;"><strong>Warning: Passenger WSGI support is still just proof of concept.  It can break, so be careful.  I have not had any problems yet.</strong></span></p>
<h2>Setting up the account and domain</h2>
<p>Before we start installing anything, go into your DreamHost control panel and select the domain you want to install django on (or make a new one).  You have to change the directory from <em>domain</em> to <em>domain</em>/public as this will serve as a base for static files.  Then scroll down a little bit and enable Passenger.</p>
<p>Next, go to your manage users screen and select the user for the domain.  Change the user from an FTP user to a Shell user if you haven&#8217;t done so already.</p>
<p>Finally, give DreamHost a few minutes to update their servers and then connect via ssh.  For Mac and Linux users, open a terminal and type:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh</span> domain <span style="color: #660033;">-l</span> username</pre></div></div>

<p>If you are on Windows, Google the Netspace SSH client or just use PuTTY.  Type in your password and get ready for some shell-based work.  First let&#8217;s alter the environment:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'PATH=&quot;$HOME/bin:$PATH&quot;'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> ~<span style="color: #000000; font-weight: bold;">/</span>.bash_profile
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'LD_LIBRARY_PATH=$HOME/lib/'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> ~<span style="color: #000000; font-weight: bold;">/</span>.bash_profile
<span style="color: #7a0874; font-weight: bold;">source</span> ~<span style="color: #000000; font-weight: bold;">/</span>.bash_profile</pre></div></div>

<p>This will alter your .bash_profile file so your home directory becomes part of your path.</p>
<h2>Installing Python</h2>
<p>Now, for an easy part, it&#8217;s time to download and install Python 2.6.2</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>python.org<span style="color: #000000; font-weight: bold;">/</span>ftp<span style="color: #000000; font-weight: bold;">/</span>python<span style="color: #000000; font-weight: bold;">/</span>2.6.2<span style="color: #000000; font-weight: bold;">/</span>Python-2.6.2.tgz
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzvf</span> Python-2.6.2.tgz
<span style="color: #7a0874; font-weight: bold;">cd</span> Python-2.6.2
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #800000;">${HOME}</span>
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> ~
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> Python-2.6.2
<span style="color: #c20cb9; font-weight: bold;">rm</span> Python-2.6.2.tgz</pre></div></div>

<p>Not that bad.  Just a few more installations left.</p>
<h2>Installing SWIG</h2>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>voxel.dl.sourceforge.net<span style="color: #000000; font-weight: bold;">/</span>sourceforge<span style="color: #000000; font-weight: bold;">/</span>swig<span style="color: #000000; font-weight: bold;">/</span>swig-1.3.40.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xvzf</span> swig-1.3.40.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> swig-1.3.40
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #800000;">${HOME}</span>
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> check
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> ~
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> swig-1.3.40
<span style="color: #c20cb9; font-weight: bold;">rm</span> swig-1.3.40.tar.gz</pre></div></div>

<h2>Installing setuptools</h2>
<p>Now for a useful script, setuptools.  It will help us out really soon.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>peak.telecommunity.com<span style="color: #000000; font-weight: bold;">/</span>dist<span style="color: #000000; font-weight: bold;">/</span>ez_setup.py
python ez_setup.py
<span style="color: #c20cb9; font-weight: bold;">rm</span> ez_setup.py</pre></div></div>

<h2>Installing MySQLdb</h2>
<p>I&#8217;m assuming that you will be using MySQL as a database backend.  This will install the library needed for MySQL.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>pypi.python.org<span style="color: #000000; font-weight: bold;">/</span>packages<span style="color: #000000; font-weight: bold;">/</span>source<span style="color: #000000; font-weight: bold;">/</span>M<span style="color: #000000; font-weight: bold;">/</span>MySQL-python<span style="color: #000000; font-weight: bold;">/</span>MySQL-python-1.2.3b1.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xvzf</span> MySQL-python-1.2.3b1.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> MySQL-python-1.2.3b1.tar.gz
python setup.py <span style="color: #c20cb9; font-weight: bold;">install</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> ~
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> MySQL-python-1.2.3b1
<span style="color: #c20cb9; font-weight: bold;">rm</span> MySQL-python-1.2.3b1.tar.gz</pre></div></div>

<h2>PIL (Python Imaging Library)</h2>
<p>If you want to use any ImageField fields in your database or want to work with images, you have to have this or django will fail when syncing the database.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">easy_install <span style="color: #660033;">--find-links</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.pythonware.com<span style="color: #000000; font-weight: bold;">/</span>products<span style="color: #000000; font-weight: bold;">/</span>pil<span style="color: #000000; font-weight: bold;">/</span> Imaging</pre></div></div>

<h2>Setting up django</h2>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>domain
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rfv</span> .<span style="color: #000000; font-weight: bold;">/*</span>
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> public
<span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #c20cb9; font-weight: bold;">co</span> http:<span style="color: #000000; font-weight: bold;">//</span>code.djangoproject.com<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>django<span style="color: #000000; font-weight: bold;">/</span>trunk<span style="color: #000000; font-weight: bold;">/</span> django_src
easy_install django_src
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> django_src
<span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #c20cb9; font-weight: bold;">co</span> http:<span style="color: #000000; font-weight: bold;">//</span>code.djangoproject.com<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>django<span style="color: #000000; font-weight: bold;">/</span>trunk<span style="color: #000000; font-weight: bold;">/</span>django
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> public<span style="color: #000000; font-weight: bold;">/</span>media
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> ~<span style="color: #000000; font-weight: bold;">/</span>domain<span style="color: #000000; font-weight: bold;">/</span>django<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>admin<span style="color: #000000; font-weight: bold;">/</span>media ~<span style="color: #000000; font-weight: bold;">/</span>domain<span style="color: #000000; font-weight: bold;">/</span>public<span style="color: #000000; font-weight: bold;">/</span>media<span style="color: #000000; font-weight: bold;">/</span>admin
django-admin.py startproject project
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'import sys, os'</span> <span style="color: #000000; font-weight: bold;">&gt;</span> passenger_wsgi.py
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'INTERP = &quot;/home/username/bin/python&quot;'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> passenger_wsgi.py
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.argv)'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> passenger_wsgi.py
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'sys.path.append(&quot;/home/username/domain&quot;)'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> passenger_wsgi.py
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'os.environ[&quot;DJANGO_SETTINGS_MODULE&quot;] = &quot;project.settings&quot;'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> passenger_wsgi.py
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'import django.core.handlers.wsgi'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> passenger_wsgi.py
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'application = django.core.handlers.wsgi.WSGIHandler()'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> passenger_wsgi.py
pkill python</pre></div></div>

<p>Now visit domain in your webbrowser and you should see a page generated by django.  Your media root is /home/username/domain/public/media/ and your media url is http://domain/media/.</p>
]]></content:encoded>
			<wfw:commentRss>http://coltonprovias.com/2009/09/21/django-on-dreamhost-with-passenger/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>
