<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Haineault.com / Blog</title><link>http://haineault.com/blog/</link><description>Haineault.com's latest blog entries.</description><language>en</language><lastBuildDate>Fri, 10 Feb 2012 10:53:27 -0000</lastBuildDate><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Haineaultcom/Blog" /><feedburner:info uri="haineaultcom/blog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><title>08-Dec-2011 00:31 - The HTML data attribute rocks.</title><link>http://feedproxy.google.com/~r/Haineaultcom/Blog/~3/AzbJewbBB0w/</link><description>&lt;p&gt;I've started to use a new pattern to pass template variables to JavaScript .. It's wonderful.
&lt;/p&gt;
&lt;p&gt;Bad:
&lt;/p&gt;
&lt;p&gt;&lt;div class="code_highlight"&gt;&lt;pre&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;some-div&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;  
    &lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;#some-div&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;{% url my-ajax-view %}&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/p&gt;
&lt;p&gt;Good:
&lt;/p&gt;
&lt;p&gt;&lt;div class="code_highlight"&gt;&lt;pre&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;some-div&amp;quot;&lt;/span&gt; &lt;span class="na"&gt;data-ajax-url=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{% url my-ajax-view %}&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;  
    &lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;#some-div&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;ajax-url&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nx"&gt;l&lt;/span&gt;
    &lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;#some-div&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/p&gt;
&lt;p&gt;Now you can put that js where it belong; in a separate file.
&lt;/p&gt;
&lt;p&gt;
    0 comment(s)
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/uF8uusScmNSoqessCdhBRd2eoGw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uF8uusScmNSoqessCdhBRd2eoGw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/uF8uusScmNSoqessCdhBRd2eoGw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uF8uusScmNSoqessCdhBRd2eoGw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Haineaultcom/Blog/~4/AzbJewbBB0w" height="1" width="1"/&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">h3</dc:creator><guid isPermaLink="false">http://www.haineault.com/blog/172/</guid><feedburner:origLink>http://www.haineault.com/blog/172/</feedburner:origLink></item><item><title>07-Nov-2011 10:00 - Django: Handling media across development stages</title><link>http://feedproxy.google.com/~r/Haineaultcom/Blog/~3/4RSlQMl_ask/</link><description>&lt;p&gt;The introduction of the staticfiles app in django helped a lot with the management of media files by separating the media in two big categories: resource files and user uploaded files.
&lt;/p&gt;
&lt;p&gt;This separation was a logical step which made it a lot easier to move project from different development stage to production.
&lt;/p&gt;
&lt;p&gt;But while it help a lot, it's still not a perfect solution. The scenario I will paint is a scenario I have to endure with every django projects I work on. I asked questions in the django community, but never got any clear answer on how to deal with this.
&lt;/p&gt;
&lt;p&gt;So here's what my typical django day looks like:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
     I start a new project using SQLite until my models are mature enough. 
 &lt;/li&gt;
&lt;li&gt;
     When I'm ready to show my project to my client, I switch the database to MySQL or PostgreSQL
 &lt;/li&gt;
&lt;li&gt;
     Then I can give access to my client so he can start fiddling with the admin and add some content
 &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt; So far everything is fine. I can carry on working on the backend while my client fill the site with content and learn how to use the admin.
&lt;/p&gt;
&lt;p&gt; But this is where things starts to get ugly.
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
     My client has an app which has either a FileField or an ImageField and start uploading images
 &lt;/li&gt;
&lt;li&gt;
     Since we share the same database, I can see the new content, but not the newly uploaded Images or Files.
 &lt;/li&gt;
&lt;li&gt;
     Then I also add some image or files and lo and behold, I now have two different media folders to merge
 &lt;/li&gt;
&lt;li&gt;
     Things gets even more ugly if we each edit the same object
 &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;And if there is more than one developer working on the project, it's gets even worst and more error prone. Soon merging folders becomes a real nightmare.
&lt;/p&gt;
&lt;p&gt;My first, albeit naive, attempt to solve this problem was simple. I created a script that would push or fetch the media across different stages using rsync. But this got old faster than you can say &lt;em&gt;merge conflicts&lt;/em&gt;. It wasn't a solution at all, it was just a way to run into problems more quickly.
&lt;/p&gt;
&lt;p&gt;Then I started thinking about the awesome django file storage API, which can abstract pretty much any kind of file storage from fylesystem to ftp or cloud. Name a protocol to store files and you can implement it with a reasonable amount of effort or more likely, it already exists somewhere under FOSS license.
&lt;/p&gt;
&lt;p&gt;Anyway. I started looking at the storage API to use a custom file storage, something that would have sit somewhere between my development environment and my demo server. 
&lt;/p&gt;
&lt;p&gt;But then I realized that because a remote filestorage can be either slow or unavailable, you cannot just plug the custom file storage and hope it will magically work. Since requests are IO blocking, if the file store is slow or worst, unavailable, this can ruin the user experience by raising exponentially the response time of the server.. If response there is.
&lt;/p&gt;
&lt;p&gt;For this to work well, you need to put something between your file store and your django app, something that will process the file upload in a different process while you app keep minding it's own business: you need a task scheduler. Then you learn that you'll have to setup a message queuing server like rabbitMQ or AMQP and use something like Celery to interface it.
&lt;/p&gt;
&lt;p&gt;I just want to build a god damn website without having to care about stupid thing like uploaded files while in development/demo phase .. not launch a space rocket for god's sake. 
&lt;/p&gt;
&lt;p&gt;This is simply too much complexity and failure points to introduce in all my projects, it outweigh any potential benefits.
&lt;/p&gt;
&lt;p&gt;So back to square one.
&lt;/p&gt;
&lt;p&gt;However this time I decided to consider &lt;em&gt;every&lt;/em&gt; realistic ways to do it, including the worst ways, because as Sherlock Holmes says:
&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth.
&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;It's the last time I quote a fictive character I swear. That said, I think I've found myself a pretty decent solution: I just can use the database to store files.
&lt;/p&gt;
&lt;p&gt;Now before you close this window laughing (or crying) uncontrollably, I think you should give my idea a chance.
&lt;/p&gt;
&lt;p&gt;By no mean I suggest to do this for project deployed in production, the performance hit will kill any database no matter how clever your caching scheme is.
&lt;/p&gt;
&lt;p&gt;But while in development/demo stage, this can make sense. There's not a whole lot of requests and not a whole lot of data involved.
&lt;/p&gt;
&lt;p&gt;So I started by finding a database file storage API. &lt;a href="https://github.com/bfirsh/django-database-files"&gt;That was the easy part&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;It does just what is says it does. Instead of saving file on the filesystem, it saves them to the database.
&lt;/p&gt;
&lt;p&gt;Great. But I don't want this to be permanent because at some point the files wont be in the database anymore.
&lt;/p&gt;
&lt;p&gt;So I forked the project to better adapt it to my needs. The first step was to preserve the file name/file path in the model, because later I want to create a management command
   that will dump the files back to the filesystem so I can push the project in production.
&lt;/p&gt;
&lt;p&gt;But since I preserved the filename, including the full relative path it introduced another problem: serving the files. The files URLs cannot change or else it will break many things. It was a big issue, because I used the media folder not only to store user uploaded files, but also to store cached thumbnails generated by easy_thumbnails.
&lt;/p&gt;
&lt;p&gt;So in short, I needed a way to use paths like this one: &lt;code&gt;/media/cache/uploads/blog/photo-1.jpg&lt;/code&gt; which uses files directly stored on the filesystem and &lt;code&gt;/media/uploads/blog/photo-1.jpg&lt;/code&gt; which
   fetch a file from the database.
&lt;/p&gt;
&lt;p&gt;It turns out that resolving this issue was easier than I expected. I just changed the way I serve static files. 
&lt;/p&gt;
&lt;p&gt;Now my urls.py it looks like this:
&lt;/p&gt;
&lt;p&gt;&lt;div class="code_highlight"&gt;&lt;pre&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="s"&gt;&amp;#39;database_files&amp;#39;&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;settings&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;INSTALLED_APPS&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;urlpatterns&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;patterns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
            &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;r&amp;#39;^&lt;/span&gt;&lt;span class="si"&gt;%s&lt;/span&gt;&lt;span class="s"&gt;(.*)$&amp;#39;&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;settings&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;MEDIA_URL&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:],&lt;/span&gt; &lt;span class="s"&gt;&amp;#39;database_files.views.serve&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
                &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;document_root&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;#39;media&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;database_file&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;),)&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;urlpatterns&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;patterns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;r&amp;#39;^&lt;/span&gt;&lt;span class="si"&gt;%s&lt;/span&gt;&lt;span class="s"&gt;(.*)$&amp;#39;&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;settings&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;MEDIA_URL&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:],&lt;/span&gt; 
                           &lt;span class="s"&gt;&amp;#39;django.views.static.serve&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;document_root&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;#39;media&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;}),)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/p&gt;
&lt;p&gt;In short, if database_files is installed, it will serve static files with a custom serve method that will check if the file exists on the filesystem before serving them.
&lt;/p&gt;
&lt;p&gt;If the file doesn't exists, it will look for it in the database and writes it on the filesystem if it exists before calling the original django static serve. 
&lt;/p&gt;
&lt;p&gt;If the files doesn't exists neither on the filesystem nor the database, the original static serve method raise a 404 as it would normally do.
&lt;/p&gt;
&lt;p&gt;Now the only thing I have left to do is implement last modified date to perform cache invalidation. Win.
&lt;/p&gt;
&lt;p&gt;It's &lt;em&gt;almost&lt;/em&gt; a good enough solution to use even in production (for small projects of course), since the database would not be used to serve files at any point, it would just be used to create or update the cached files.
&lt;/p&gt;
&lt;p&gt;&lt;div class="center"&gt;&lt;img src="http://i.imgur.com/Foy8s.jpg" alt="Fuck Yea." /&gt;&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;My solution is currently half implemented, at this point it works but I still need to implement cache invalidation and test it thoroughly. I decided to blog about it early because I wanted to have some feedbacks, maybe there's some points or solution I did not consider.
&lt;/p&gt;
&lt;p&gt;Cheers
&lt;/p&gt;
&lt;p&gt;
    1 comment(s)
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/B6hkS13y9qZNxODLe7w7_Ylpb6w/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/B6hkS13y9qZNxODLe7w7_Ylpb6w/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/B6hkS13y9qZNxODLe7w7_Ylpb6w/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/B6hkS13y9qZNxODLe7w7_Ylpb6w/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Haineaultcom/Blog/~4/4RSlQMl_ask" height="1" width="1"/&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">h3</dc:creator><guid isPermaLink="false">http://www.haineault.com/blog/171/</guid><feedburner:origLink>http://www.haineault.com/blog/171/</feedburner:origLink></item><item><title>31-Oct-2011 09:40 - PostgreSQL gotcha</title><link>http://feedproxy.google.com/~r/Haineaultcom/Blog/~3/-FZ9kaB1iRw/</link><description>&lt;p&gt;I've just spent 20min trying to allow remote connections to a PostgresSQL database running on Ubuntu.
&lt;/p&gt;
&lt;p&gt;I did it before so I thought it was a 5min thing .. well no. 
&lt;/p&gt;
&lt;p&gt;I updated the pg_hba.conf as usual and added entry for the client's host.
   No problem so far. Then I restarted the service and tried to connect .. but I got this message:
&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;FATAL:  no pg_hba.conf entry for host "XXX.XXX.XXX.XXX", user "username", database "dbname", SSL off
&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;Well .. I double checked my config and found nothing wrong.
&lt;/p&gt;
&lt;p&gt;Then I restarted the server again, but this time I noticed something odd. The command yielded no output.
&lt;/p&gt;
&lt;p&gt;Not knowing where to start, I begin by doing a &lt;em&gt;cat&lt;/em&gt; on &lt;em&gt;/etc/init.d/postgresql&lt;/em&gt; and see this:
&lt;/p&gt;
&lt;p&gt;&lt;div class="code_highlight"&gt;&lt;pre&gt;&lt;span class="c"&gt;# versions can be specified explicitly&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; -n &lt;span class="s2"&gt;&amp;quot;$2&amp;quot;&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;; &lt;span class="k"&gt;then&lt;/span&gt;
&lt;span class="k"&gt;    &lt;/span&gt;&lt;span class="nv"&gt;versions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;$2 $3 $4 $5 $6 $7 $8 $9&amp;quot;&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt;
&lt;span class="k"&gt;    &lt;/span&gt;get_versions
&lt;span class="k"&gt;fi&lt;/span&gt;

&lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;$1&amp;quot;&lt;/span&gt; in
    start|stop|restart|reload|status&lt;span class="o"&gt;)&lt;/span&gt;
	&lt;span class="k"&gt;for &lt;/span&gt;v in &lt;span class="nv"&gt;$versions&lt;/span&gt;; &lt;span class="k"&gt;do&lt;/span&gt;
	    &lt;span class="nv"&gt;$1&lt;/span&gt; &lt;span class="nv"&gt;$v&lt;/span&gt;
	&lt;span class="k"&gt;done&lt;/span&gt;
        ;;
    force-reload&lt;span class="o"&gt;)&lt;/span&gt;
	&lt;span class="k"&gt;for &lt;/span&gt;v in &lt;span class="nv"&gt;$versions&lt;/span&gt;; &lt;span class="k"&gt;do&lt;/span&gt;
&lt;span class="k"&gt;	    &lt;/span&gt;reload &lt;span class="nv"&gt;$v&lt;/span&gt;
	&lt;span class="k"&gt;done&lt;/span&gt;
        ;;
    *&lt;span class="o"&gt;)&lt;/span&gt;
        &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;Usage: $0 {start|stop|restart|reload|force-reload|status} [version ..]&amp;quot;&lt;/span&gt;
        &lt;span class="nb"&gt;exit &lt;/span&gt;1
        ;;
&lt;span class="k"&gt;esac&lt;/span&gt;

&lt;span class="nb"&gt;exit &lt;/span&gt;0
&lt;/pre&gt;&lt;/div&gt;

&lt;/p&gt;
&lt;p&gt;Interestingly .. the command can take a database version number as argument. OK let's try this:
&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;$: sudo /etc/init.d/postgresql restart 8.4
&lt;/p&gt;
&lt;p&gt; * Restarting PostgreSQL 8.4 database server
&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;Win.
&lt;/p&gt;
&lt;p&gt;Apparently for some reason the &lt;em&gt;get_versions&lt;/em&gt; isn't working.
&lt;/p&gt;
&lt;p&gt;Another day, another bug.
&lt;/p&gt;
&lt;p&gt;
    0 comment(s)
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/TeXxvyqldU2MEmvg_pn5TprJip4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TeXxvyqldU2MEmvg_pn5TprJip4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/TeXxvyqldU2MEmvg_pn5TprJip4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TeXxvyqldU2MEmvg_pn5TprJip4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Haineaultcom/Blog/~4/-FZ9kaB1iRw" height="1" width="1"/&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">h3</dc:creator><guid isPermaLink="false">http://www.haineault.com/blog/170/</guid><feedburner:origLink>http://www.haineault.com/blog/170/</feedburner:origLink></item><item><title>14-Oct-2011 22:30 - How to win against big telecom companies trying to screw you</title><link>http://feedproxy.google.com/~r/Haineaultcom/Blog/~3/VBxT1tfBB_8/</link><description>&lt;p&gt;As a Canadian I have to deal with the handful of cellphone cartels which have monopoly over our Canadian telecommunication market.
&lt;/p&gt;
&lt;p&gt;Yes I'm talking about you Bell, Rogers, Telus &amp;amp; friends.
&lt;/p&gt;
&lt;p&gt;So far they've all tried to screw me or my girlfriend on way or the other. So I've come to have a couple of tricks to win against them. I hope this post might be useful to other sorry customers.
&lt;/p&gt;
&lt;p&gt;In fact, it's not really about "tricks", it's about knowing your rights, Canadian laws and the code of conduct that they have an obligation to follow.
&lt;/p&gt;
&lt;p&gt;Let's start with some hard facts every Canadians should know:
&lt;/p&gt;
&lt;h2&gt;Contracts&lt;/h2&gt;
&lt;p&gt;This is probably the most important point. For a contract to have any legal weight, it must be signed by both parties and both parties must be given a copy of it. If this requirement is not met, legally there is no contract. Nada.
&lt;/p&gt;
&lt;p&gt;So if someone tells you that you have a contract with them and you owe them something, ask them for a copy of the  said contract you signed with them (even if you do have a copy of it). If they cannot provide it, they have no legal recourse whatsoever. Even if the rep tell you otherwise. I even had a rep who told me that my invoice was my contract! This was the best joke I ever heard.
&lt;/p&gt;
&lt;h2&gt;Code of conduct&lt;/h2&gt;
&lt;p&gt;Every major telco companies are member of The Canadian Wireless Telecommunications Association (CWTA). To be a member they have to respect a code of conduct and among other things, this code of conduct states the following:
&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Protect our customers' rights when we must change contract terms&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;We do not change the material terms of our contracts with customers, without giving them at least 30 days' notice. In the case of such material changes that are  unfavourable to customers, we either give them the right to terminate the contract without any additional fees for early termination, or allow them to remain on the unchanged contract. This does not apply to changes that are required by law or regulation or changes to those services and features that do not have a fixed term commitment.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://cwta.ca/for-consumers/code-of-conduct/"&gt;http://cwta.ca/for-consumers/code-of-conduct/&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;Note: I've managed to terminate a 3 years contract within the first year over a 0.15 cents increase on the 911 service. Every reps I've talked with (about 6) told me it was impossible, that I didn't know how things worked or that it was a government fee.  These were all lies, and in the end, I won.
&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;Whatever the reps will tell you, if your contract is modified in any ways that are unfavorable to you, even if it's a couple of cents, you have the right to terminate it right away. But you must do it within 30 days of the notification. And sometime the "notification" is a small print on your monthly invoice. So read them carefully.
&lt;/p&gt;
&lt;p&gt;OK now you've been screwed and you want to fight them, where to start ?
&lt;/p&gt;
&lt;p&gt;First I must warn you that it's time consuming. So choose your battle carefully, because they wont let you win without fighting back.
&lt;/p&gt;
&lt;p&gt;But don't worry, it's their role do discourage you and keep you from wining. So if you expect it and it's already less irritating.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The first step is to &lt;em&gt;make sure that you are right&lt;/em&gt;. If you are wrong, you wont win, however hard you try. Back your claim with facts and laws. If you can't, just give up already.
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When you are 100% sure that you are within your rights, just call them. State your demand and why. Then prepare to argue because they will. It's annoying but you must do it before escalating your complaint or else it wont be considered seriously.
&lt;/p&gt;
&lt;p&gt;Whatever you do or say, &lt;strong&gt;STAY POLITE&lt;/strong&gt;. I cannot stress this enough. The person you will be talking to is simply an employee, a person just like you counting the minutes until his shift ends and they probably already hate the company they are working for. So always stay polite and calm.
&lt;/p&gt;
&lt;p&gt;You have far better chances to win your case if the employees sympathize with you than if they hates you because you ruined their day.
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Talk to at least 2~3 reps, then ask them to talk to their superiors. When you've talking to more than 5 employees and you know they're all bullshiting you, then you are ready to escalate your demand.
&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;   You will need to write a quite lengthy letter detailing your situation. How many time you called, what you said, why you think you are within your rights and don't hesitate to back it with facts, links or citations. The more details, the better.
&lt;/p&gt;
&lt;p&gt;   Most of the telecom's website will have a complaint section (most likely under contact). Find where you can send your complaint. You want to send it to a higher level than the customer care. If they have complaint escalation procedures, follow them patiently.
&lt;/p&gt;
&lt;p&gt;At this point, if you have made a solid and detailed case there's a good change you've already won.
&lt;/p&gt;
&lt;p&gt;In my case, the account director called me the next day to apologize and told me I was right all along and that he was sorry I had to argue for this long with the reps. He terminated my contract on the spot without any charges.
&lt;/p&gt;
&lt;p&gt;In the case of my girlfriend, they wanted her to pay an extra month &lt;em&gt;after&lt;/em&gt; her 3 years contract expired. Their only point was that she didn't notify them that she was terminating her contract 30 days prior it's expiration.. as stipulated in the contract.
&lt;/p&gt;
&lt;p&gt;And her points was that 1) &lt;em&gt;she did&lt;/em&gt; notify them 5 month in advance that she wasn't renewing her contract with them and 2) that she wasn't &lt;em&gt;terminating&lt;/em&gt; her contract, she was only &lt;em&gt;not renewing it&lt;/em&gt;. The contract she signed was over. She signed for 3 years and the 3 years were expired.
&lt;/p&gt;
&lt;p&gt;They told her it didn't matter. She should have called &lt;strong&gt;30 days&lt;/strong&gt; prior the expiration date. So I guess 31 days or 29 days and you're screwed. It's 30 days and they told her that they couldn't do anything about it. It was basically "shut up and pay".
&lt;/p&gt;
&lt;p&gt;So I told her to ask to talk to the superior and then ask for a copy of the contract she signed, which I knew they can't provide most of the time. Even more three years later. Ten minutes of arguing later, they told her that they were crediting it. Case closed. 
&lt;/p&gt;
&lt;p&gt;A total of 45 minutes of arguing to not get screwed for 65$ is a deal, unless you make a freaking lot of money.
&lt;/p&gt;
&lt;p&gt;To summarize, 1) be sure you are right 2) make an initial complaint by phone 3) escalate your complaint to the superiors and then 4) by writing and finally 5) always stay polite.
&lt;/p&gt;
&lt;p&gt;Good luck with your tyrant :)
&lt;/p&gt;
&lt;p&gt;
    3 comment(s)
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/eI4uLeDJ8zWdpyC_Azpd1TOmGjU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eI4uLeDJ8zWdpyC_Azpd1TOmGjU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/eI4uLeDJ8zWdpyC_Azpd1TOmGjU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eI4uLeDJ8zWdpyC_Azpd1TOmGjU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Haineaultcom/Blog/~4/VBxT1tfBB_8" height="1" width="1"/&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">h3</dc:creator><guid isPermaLink="false">http://www.haineault.com/blog/169/</guid><feedburner:origLink>http://www.haineault.com/blog/169/</feedburner:origLink></item><item><title>09-Oct-2011 23:19 - Here&amp;#39;s why you need to start using SASS</title><link>http://feedproxy.google.com/~r/Haineaultcom/Blog/~3/6yVtNDm7Big/</link><description>&lt;p&gt;I've finally took the time to take a look at &lt;a href="http://sass-lang.com/"&gt;SASS&lt;/a&gt; and god damn it's nice for many reasons.. but my favorite is this:
&lt;/p&gt;
&lt;p&gt;You can write this..
&lt;/p&gt;
&lt;p&gt;&lt;div class="code_highlight"&gt;&lt;pre&gt;&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;Note&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;I&lt;/span&gt; &lt;span class="nt"&gt;chose&lt;/span&gt; &lt;span class="nt"&gt;to&lt;/span&gt; &lt;span class="nt"&gt;name&lt;/span&gt; &lt;span class="nt"&gt;it&lt;/span&gt; &lt;span class="nt"&gt;background-gradient&lt;/span&gt;
&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;for&lt;/span&gt; &lt;span class="nt"&gt;consistency&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;but&lt;/span&gt; &lt;span class="nt"&gt;you&lt;/span&gt; &lt;span class="nt"&gt;can&lt;/span&gt; &lt;span class="nt"&gt;name&lt;/span&gt; &lt;span class="nt"&gt;the&lt;/span&gt; 
&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;mixin&lt;/span&gt; &lt;span class="nt"&gt;whatever&lt;/span&gt; &lt;span class="nt"&gt;you&lt;/span&gt; &lt;span class="nt"&gt;like&lt;/span&gt;

&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="nt"&gt;mixin&lt;/span&gt; &lt;span class="nt"&gt;background-gradient&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="nt"&gt;start&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;#ffffff&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="nt"&gt;end&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;#000000&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="c"&gt;/* Old browsers */&lt;/span&gt;
    &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
    &lt;span class="c"&gt;/* FF3.6+ */&lt;/span&gt;
    &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;moz&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;linear&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;top&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;  &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;  &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;end&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; 
    &lt;span class="c"&gt;/* Chrome,Safari4+ */&lt;/span&gt;
    &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;webkit&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;linear&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="k"&gt;left&lt;/span&gt; &lt;span class="k"&gt;top&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="k"&gt;left&lt;/span&gt; &lt;span class="k"&gt;bottom&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="k"&gt;color&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;stop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="k"&gt;color&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;stop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;end&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
     &lt;span class="c"&gt;/* Chrome10+,Safari5.1+ */&lt;/span&gt;
    &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;webkit&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;linear&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;top&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;end&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="c"&gt;/* Opera11.10+ */&lt;/span&gt;
    &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="err"&gt;o&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;linear&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;top&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;end&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; 
    &lt;span class="c"&gt;/* IE10+ */&lt;/span&gt;
    &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;ms&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;linear&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;top&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;end&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="c"&gt;/* IE6-9 */&lt;/span&gt;
    &lt;span class="n"&gt;filter&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;progid&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;DXImageTransform&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Microsoft&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;startColorstr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;#{$start}&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;endColorstr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;#{$end}&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;GradientType&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="c"&gt;/* W3C */&lt;/span&gt;
    &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;linear&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;top&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;end&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/p&gt;
&lt;p&gt;Then you can write..
&lt;/p&gt;
&lt;p&gt;&lt;div class="code_highlight"&gt;&lt;pre&gt;&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="nc"&gt;.button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="n"&gt;include&lt;/span&gt; &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;#111111&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#444444&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="o"&gt;&amp;amp;:&lt;/span&gt;&lt;span class="n"&gt;hover&lt;/span&gt; &lt;span class="err"&gt;{&lt;/span&gt;
        &lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="n"&gt;include&lt;/span&gt; &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;#333333&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#666666&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="err"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/p&gt;
&lt;p&gt;Instead of..
&lt;/p&gt;
&lt;p&gt;&lt;div class="code_highlight"&gt;&lt;pre&gt;&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="nc"&gt;.button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#111111&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;moz&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;linear&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;top&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;  &lt;span class="m"&gt;#111111&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;  &lt;span class="m"&gt;#444444&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;webkit&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;linear&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="k"&gt;left&lt;/span&gt; &lt;span class="k"&gt;top&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="k"&gt;left&lt;/span&gt; &lt;span class="k"&gt;bottom&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="k"&gt;color&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;stop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;#111111&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="k"&gt;color&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;stop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;#444444&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
    &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;webkit&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;linear&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;top&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#111111&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#444444&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="err"&gt;o&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;linear&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;top&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#111111&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#444444&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;ms&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;linear&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;top&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#111111&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#444444&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;filter&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;progid&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;DXImageTransform&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Microsoft&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;startColorstr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;#111111&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;endColorstr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;#444444&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;GradientType&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;linear&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;top&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#111111&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#444444&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="nc"&gt;.button&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#111111&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;moz&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;linear&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;top&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;  &lt;span class="m"&gt;#333333&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;  &lt;span class="m"&gt;#666666&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;webkit&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;linear&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="k"&gt;left&lt;/span&gt; &lt;span class="k"&gt;top&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="k"&gt;left&lt;/span&gt; &lt;span class="k"&gt;bottom&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="k"&gt;color&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;stop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;#333333&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="k"&gt;color&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;stop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;#666666&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
    &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;webkit&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;linear&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;top&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#333333&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#666666&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="err"&gt;o&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;linear&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;top&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#333333&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#666666&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;ms&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;linear&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;top&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#333333&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#666666&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;filter&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;progid&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;DXImageTransform&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Microsoft&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;startColorstr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;#333333&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;endColorstr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;#666666&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;GradientType&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;linear&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;top&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#333333&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#666666&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/p&gt;
&lt;p&gt;It makes CSS fun again :)
&lt;/p&gt;
&lt;p&gt;
    2 comment(s)
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/VE6Pj5--CI6zuPQeRHybqe1eosw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VE6Pj5--CI6zuPQeRHybqe1eosw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/VE6Pj5--CI6zuPQeRHybqe1eosw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VE6Pj5--CI6zuPQeRHybqe1eosw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Haineaultcom/Blog/~4/6yVtNDm7Big" height="1" width="1"/&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">h3</dc:creator><guid isPermaLink="false">http://www.haineault.com/blog/168/</guid><feedburner:origLink>http://www.haineault.com/blog/168/</feedburner:origLink></item><item><title>09-Oct-2011 13:52 - Android and the false promises of openness</title><link>http://feedproxy.google.com/~r/Haineaultcom/Blog/~3/W5Syfnlksww/</link><description>&lt;p&gt;I've been an Android fan boy from day one. It was very exciting for me to see a new Open Source mobile OS running on a Linux kernel.
&lt;/p&gt;
&lt;p&gt;But today I understand Richard Stallman's stance on Free Open Source a lot more than I used to.
&lt;/p&gt;
&lt;p&gt;Even if the product you are using is Open Source, you aren't free at all unless it's FOSS. In fact, you are not any better than with a closed source system like iOS or Windows Mobile.
&lt;/p&gt;
&lt;p&gt;A couple of days ago I started getting a space notification warning. My phone was getting bloated. Fine so I decided to clear some space and removed the apps I don't use. So far so good.
&lt;/p&gt;
&lt;p&gt;But even after removing most of my apps, I was still low on space. This was mostly due to my emails, which I can't remove because I need them for work.
&lt;/p&gt;
&lt;p&gt;Then I saw the facebook app .. hm I never use it and 1.88MB for something I don't use is considerable space. So I try to uninstall it, only to discover that &lt;em&gt;I cannot uninstall facebook app&lt;/em&gt;. My blood was starting to boil.
&lt;/p&gt;
&lt;p&gt;A quick &lt;a href="http://www.google.com/search?client=ubuntu&amp;channel;=fs&amp;q;=android+uninstall+facebook&amp;ie;=utf-8&amp;oe;=utf-8"&gt;Google search&lt;/a&gt; confirmed my worst fear: I need to root my phone and thus void my warranty to get rid of it. Even worst, now twitter is also part of the uninstallable "native apps".
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.google.com/support/forum/p/android/thread?tid=2b7d7e03fd468bcf&amp;hl;=en"&gt;From this thead&lt;/a&gt;:
&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;smervincle:
   WTF... seriously? i can't remove Facebook from my Nexus One? that really pisses me off! ... :-( ...
&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;...
&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;BryanNexus1:
   Just don't use it.....whats the big deal?
&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;...
&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;smervincle:
   @Bryan the big deal is that the choice is no longer mine whether or not a third party app on an "open" phone can be removed. It's like a contradiction. Besides being incredibly annoying to see every time I go to share something, it's just not right. Now I don't have a choice but to tolerate it until I eventually root my phone, lol 
&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;...
&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;BryanNexus1:
   Smerv...I guess the choice is removed from selecting Android as a mobile OS because you have to use Android platform native apps like Clock (man I hate that thing its so annoying) and Google Voice....What is that? 
&lt;/p&gt;
&lt;p&gt;Its not a contradiction as much as its a contract with social media partners that are successful.  I apologize if you and Ferg are in the minority and don't want to use the apps.  But therein lies the solution...CHOICE....open platforms have choice right...so choose not to use whatever app you don't want, and relax a little.  Want to root your phone, go for it....
&lt;/p&gt;
&lt;p&gt;Ferg...Cluttering up the menu.....who actually uses the launcher menu rather than customizing their screens...hardly an issue....
&lt;/p&gt;
&lt;p&gt;Oh no...not a scroll gesture, you might hurt your finger.
&lt;/p&gt;
&lt;p&gt;I suggest you both customize your home screens and find it hilarious that you like things like Twitter and Google Buzz but all of a sudden Facebook is a horrible social media monolith.  Interesting indeed.
&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;Personnaly my problem with this isn't limited to the wasted space or the cluttered menus, it's about &lt;strong&gt;privacy&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;Prior the Android 2.1 update I did uninstall the facebook application without any problems. Now it's back from nowhere and even thought I never agreed anything, this app has the permission to collect data about:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
     My location (fine GPS location)
 &lt;/li&gt;
&lt;li&gt;
     My personnal information (read/write contact data)
 &lt;/li&gt;
&lt;li&gt;
     My Internet communication (full Internet access)
 &lt;/li&gt;
&lt;li&gt;
     My accounts (and even act as an account authenticator and manage my accounts list)
 &lt;/li&gt;
&lt;li&gt;
     My phone calls
 &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And of course it has the permission to modify/delete SD card contents, prevent phone from sleeping, write sync settings, control the vibrator, etc...
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;And all this shit even if 1) you never agreed to any of these and 2) you are not a facebook user&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;For me, the "just don't use it" argument is a farce. This is clearly a privacy invasion imposed on anybody using an Android phone.
&lt;/p&gt;
&lt;p&gt;And as a Canadian I find this terribly scary. If the U.S. authorities wants to spy on Canadian citizen they don't even have to go through the usual legal channels anymore, they just have to subpoena Facebook, which has no choice to collaborate since it's based in the U.S.
&lt;/p&gt;
&lt;p&gt;Welcome to 1984.
&lt;/p&gt;
&lt;p&gt;
    24 comment(s)
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/32wqgjA964JQB53E0BHY637E93g/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/32wqgjA964JQB53E0BHY637E93g/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/32wqgjA964JQB53E0BHY637E93g/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/32wqgjA964JQB53E0BHY637E93g/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Haineaultcom/Blog/~4/W5Syfnlksww" height="1" width="1"/&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">h3</dc:creator><guid isPermaLink="false">http://www.haineault.com/blog/167/</guid><feedburner:origLink>http://www.haineault.com/blog/167/</feedburner:origLink></item><item><title>27-Sep-2011 00:23 - geoDjango: Installing PostgreSQL with PostGIS for on Ubuntu 11.04</title><link>http://feedproxy.google.com/~r/Haineaultcom/Blog/~3/7nXS7eSHAEc/</link><description>&lt;p&gt;I've played a little with postgresql, but still I can't say that it's in my comfort zone..
&lt;/p&gt;
&lt;p&gt;After digging around for a geoDjango project, it was clear that I had to with postgres because of the shortcomings of MySQL in term of GIS support.
&lt;/p&gt;
&lt;p&gt;But when tried to configure a geospatial database following Django's documentation .. nothing worked. I had these kind of errors:
&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;h3@bomb:/www/project.com/trunk/project$ ./create_template_postgis-debian.sh 
   ...
   psql:/usr/share/postgresql/8.4/contrib/postgis-1.5/spatial_ref_sys.sql:15137: ERROR:  current transaction is aborted, commands ignored until end of transaction block
   ROLLBACK
   psql:/usr/share/postgresql/8.4/contrib/postgis-1.5/spatial_ref_sys.sql:15139: ERROR:  relation "spatial_ref_sys" does not exist
   ERROR:  relation "geometry_columns" does not exist
   ERROR:  relation "geography_columns" does not exist
&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;Weird.. and then I couldn't rerun the command because the template was already created:
&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;h3@bomb:/www/project.com/trunk/project$ ./create_template_postgis-debian.sh 
   createdb: database creation failed: ERROR:  database "template_postgis" already exists
   ERROR:  relation "geography_columns" does not exist
&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;That's how I learned how fun it was to delete a template:
&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;update pg_database set datistemplate = false where datname = 'template_postgis';
&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;Then only you can do a dropdb template_postgis ..
&lt;/p&gt;
&lt;p&gt;Great .. now what ? &lt;a href="http://stackoverflow.com/questions/4700344/postgis-cant-create-spatially-enabled-database/4700480#4700480"&gt;Again stackoverflow saves the day..&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;Sure enough, I was running PostgreSQL 9+ for which there is no postgis package ready yet .. this explained why I was having a hard time making postgis work with it. &lt;em&gt;facepalm&lt;/em&gt;.
&lt;/p&gt;
&lt;p&gt;I just did the obvious: removed postgres 9.0
&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;sudo apt-ger remove postgresql-9.0 postgresql-9.1 postgresql-client-9.0 postgresql-client-9.1 postgis
&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;Then I installed 8.4:
&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;sudo apt-get install postgresql-8.4 postgresql-client-8.4 postgis postgresql-8.4-postgis
&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;Retried Django's documentation steps, worked like a charm.
&lt;/p&gt;
&lt;p&gt;Let's this serve me as a lesson to not use unstable distros on a workstation..
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;:
&lt;/p&gt;
&lt;p&gt;When trying to sync my db I got this error:
&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;psycopg2.OperationalError: could not connect to server: No such file or directory
     Is the server running locally and accepting
     connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;&lt;a href="http://www.saltycrane.com/blog/2010/06/psycopg2-could-not-connect-server-error-ubuntu/"&gt;I solved it bey changing the listen port to 5432&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;At this point .. whatever.
&lt;/p&gt;
&lt;p&gt;
    2 comment(s)
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/vmySF8sFq7-IX725qC6MCtNaGM0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vmySF8sFq7-IX725qC6MCtNaGM0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/vmySF8sFq7-IX725qC6MCtNaGM0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vmySF8sFq7-IX725qC6MCtNaGM0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Haineaultcom/Blog/~4/7nXS7eSHAEc" height="1" width="1"/&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">h3</dc:creator><guid isPermaLink="false">http://www.haineault.com/blog/166/</guid><feedburner:origLink>http://www.haineault.com/blog/166/</feedburner:origLink></item><item><title>01-Sep-2011 15:40 - 20 Django apps that you probably never heard of</title><link>http://feedproxy.google.com/~r/Haineaultcom/Blog/~3/mWul1QpRfF0/</link><description>&lt;p&gt;When I need a Django app I just search it and most of the time I quickly find a FOSS project that either
   does exactly what I want or that can be forked and tweaked to do exactly what I want.
&lt;/p&gt;
&lt;p&gt;Today I realized I never really poked around the somewhat large pool of Django apps, so I did just that and
   found some little gems.
&lt;/p&gt;
&lt;p&gt;Be aware that I haven't tested most of them, but skipped those who seemed to have no recent activity or didn't look serious.
&lt;/p&gt;
&lt;p&gt;I will most likely test some of them in a near future, meanwhile here's my findings:
&lt;/p&gt;
&lt;h2&gt;1. Rietveld&lt;/h2&gt;
&lt;blockquote&gt;&lt;p&gt;This project shows how to create a somewhat substantial web application using Django on Google App Engine.
&lt;/p&gt;
&lt;p&gt;In addition, I hope it will serve as a practical tool for the Python developer community, and hopefully for other open source communities. As I've learned over the last two years at Google, where I developed a similar tool named Mondrian, proper code review habits can really improve the quality of a code base, and good tools for code review will improve developers' life.
&lt;/p&gt;
&lt;p&gt;Some code in this project was derived from Mondrian, but this is not the full Mondrian tool.
&lt;/p&gt;
&lt;p&gt;Source code has been published! See the Source tab above.
&lt;/p&gt;
&lt;p&gt;--Guido van Rossum, Python creator and Google employee 
&lt;/p&gt;
&lt;/blockquote&gt;&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://code.google.com/p/rietveld/"&gt;Project page&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;2. ConMan&lt;/h2&gt;
&lt;blockquote&gt;&lt;p&gt;The ConMan project was started by herlo &lt;clint savage="Savage"&gt; to help run the Utah
   Open Source Conference. 
&lt;/clint&gt;&lt;/p&gt;
&lt;p&gt;The project is now maintained on GitHub but has been housed in Google Code as
   well. The GitHub is the current version of the ConMan project.
&lt;/p&gt;
&lt;/blockquote&gt;&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/herlo/ConMan"&gt;Project page&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;3. Django-messages&lt;/h2&gt;
&lt;blockquote&gt;&lt;p&gt;Django-messages enables your users to send private messages to each other. It provides a basic 
   set of functionality your would expect from such a system. Every user has an Inbox, an Outbox 
   and a Trash. Messages can be composed and there is an easy url-based approach to preloading the 
   compose-form with the recipient-user, which makes it extremly easy to put "send xyz a message" 
   links on a profile-page. 
&lt;/p&gt;
&lt;/blockquote&gt;&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://code.google.com/p/django-messages/"&gt;Project page&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;3. django-helpdesk&lt;/h2&gt;
&lt;blockquote&gt;&lt;p&gt;django-helpdesk was formerly known as Jutda Helpdesk, named after the company who originally 
   created it. As of January 2011 the name has been changed to reflect what it really is: a 
   Django-powered ticket tracker with contributors reaching far beyond Jutda. 
&lt;/p&gt;
&lt;/blockquote&gt;&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/rossp/django-helpdesk/"&gt;Project page&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;4. django-blocks&lt;/h2&gt;
&lt;blockquote&gt;&lt;p&gt;blocks is to be able do do a site without a real need to write many lines of code (or any) 
   because almost common stuff like a content and how it should be shown will be configured by 
   the user. It should be easy to do a Blog (like WordPress) or some other kind of CMS based 
   site (like in Drupal) easily. 
&lt;/p&gt;
&lt;/blockquote&gt;&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://code.google.com/p/django-blocks/"&gt;Project page&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;5. python-money (non-django specific)&lt;/h2&gt;
&lt;blockquote&gt;&lt;p&gt;python-money provides carefully designed basic Python primitives for working with money and currencies.
&lt;/p&gt;
&lt;p&gt;The primary objectives of this module is to aid in the development of financial applications by increasing testability and reusability, reducing code duplication and reducing the risk of defects occurring in the code. 
&lt;/p&gt;
&lt;/blockquote&gt;&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://code.google.com/p/python-money/"&gt;Project page&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;6. uml-to-django&lt;/h2&gt;
&lt;blockquote&gt;&lt;p&gt;No manual python/django coding was involved in this conversion, the default application is completely generated for you.
&lt;/p&gt;
&lt;p&gt;However you can customise it after conversion. Customisations won't be lost if you re-run uml-to-django to include new changes from your UML diagram to the django code.
&lt;/p&gt;
&lt;p&gt;It currently works from a class diagram saved as a XMI file. Most UML authoring tools (Visio, ArgoUML, , Altova UModel, Visual Paradigm...) can export their diagrams in that format. 
&lt;/p&gt;
&lt;/blockquote&gt;&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://code.google.com/p/uml-to-django/"&gt;Project page&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;7. django-axes&lt;/h2&gt;
&lt;blockquote&gt;&lt;p&gt;django-axes is a very simple way for you to keep track of failed login attempts, both for the Django admin and for the rest of your site.
&lt;/p&gt;
&lt;/blockquote&gt;&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://code.google.com/p/django-axes/"&gt;Project page&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;8. rfdjango&lt;/h2&gt;
&lt;blockquote&gt;&lt;p&gt;Project is meant to be central point for handling and presenting RF spectrum measured data for authorities and as well as for licensed telecom operators, radio and TV broadcasters etc. with different level of privileges, of course. Most measurement is supposed to occur automatically with no at all or a little operator intervention.
&lt;/p&gt;
&lt;/blockquote&gt;&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://code.google.com/p/rfdjango/"&gt;Project page&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;9. virttool&lt;/h2&gt;
&lt;blockquote&gt;&lt;p&gt;Virttool is a tool for managing datacenters using virtualization technologies. It is comprised of two distinct but interacting modules, a lightweight high-avaliability monitoring daemon and a web interface for easy management. 
&lt;/p&gt;
&lt;/blockquote&gt;&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://code.google.com/p/virttool/"&gt;Project page&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;9. pygowave&lt;/h2&gt;
&lt;blockquote&gt;&lt;p&gt;PyGoWave is the next generation communication platform for the web coded in Python.
   It is similar to its big brother Google Wave and aims to be a comparable and compatible alternative. 
&lt;/p&gt;
&lt;/blockquote&gt;&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/p2k/pygowave"&gt;Project page&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://pygowave.net/"&gt;Project website&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;10. djang0byte&lt;/h2&gt;
&lt;blockquote&gt;&lt;p&gt;Lightweight social networks engine written in python+django, that aims to bear great workloads. 
&lt;/p&gt;
&lt;/blockquote&gt;&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://code.google.com/p/djang0byte/"&gt;Project page&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;11. openstates&lt;/h2&gt;
&lt;blockquote&gt;&lt;p&gt;The Open State Project collects and makes available data about state legislative activities, 
   including bill summaries, votes, sponsorships and state legislator information. This data is 
   gathered directly from the states and made available in a common format for interested 
   developers, through a JSON API and data dumps. 
&lt;/p&gt;
&lt;/blockquote&gt;&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/sunlightlabs/openstates"&gt;Project page&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;12. django-kong&lt;/h2&gt;
&lt;blockquote&gt;&lt;p&gt;This project is an interesting combination that work together to solve two problems. The main problem 
   is deployment testing and custom monitoring. It allows you to define a twill test that allows you to 
   test all of the sites you deploy against. These tests could also be used for a monitoring purpose, and run every so often by a system like Nagios.
&lt;/p&gt;
&lt;/blockquote&gt;&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/ericholscher/django-kong"&gt;Project page&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;13. django-polymorphic&lt;/h2&gt;
&lt;blockquote&gt;&lt;p&gt;On one hand it makes sure that model inheritance just works as you expect, by simply ensuring that you always get back exactly 
   the same objects from the database you stored there - regardless how you access them, making model inheritance much more "pythonic". 
   This can save you a lot of unpleasant workarounds that tend to make your code messy, error-prone, and slow.
&lt;/p&gt;
&lt;p&gt;On the other hand, together with some small API additions to the Django ORM, django_polymorphic enables a much more expressive and &amp;lt;
   intuitive programming style and also very advanced object oriented designs that are not possible with vanilla Django.
&lt;/p&gt;
&lt;/blockquote&gt;&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/bconstantin/django_polymorphic"&gt;Project page&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;14. django-locking&lt;/h2&gt;
&lt;blockquote&gt;&lt;p&gt;Django has seen great adoption in the content management sphere, especially among the newspaper crowd. One of the trickier things to get right, is to make sure that nobody steps on each others toes while editing and modifying existing content. Newspaper editors might not always be aware of what other editors are up to, and this goes double for distributed teams. When different people work on the same content, the one who saves last will win the day, while the other edits are overwritten.
&lt;/p&gt;
&lt;p&gt;django-locking provides a system that makes concurrent editing impossible, and informs users of what other users are working on and for how long that content will remain locked. Users can still read locked content, but cannot modify or save it.
&lt;/p&gt;
&lt;/blockquote&gt;&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/stdbrouw/django-locking"&gt;Project page&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;15. django-speedtracer&lt;/h2&gt;
&lt;blockquote&gt;&lt;p&gt;Simple performance monitoring for Django using Google Chrome's Speed Tracer
&lt;/p&gt;
&lt;/blockquote&gt;&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/acdha/django-speedtracer"&gt;Project page&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;16. django-spider&lt;/h2&gt;
&lt;blockquote&gt;&lt;p&gt;A multi-threaded spider with a web interface
&lt;/p&gt;
&lt;/blockquote&gt;&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/coleifer/django-spider"&gt;Project page&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;17. django-lint&lt;/h2&gt;
&lt;blockquote&gt;&lt;p&gt;Tool to lint Django applications and projects
&lt;/p&gt;
&lt;/blockquote&gt;&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/lamby/django-lint"&gt;Project page&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;18. django-vim&lt;/h2&gt;
&lt;blockquote&gt;&lt;p&gt;A set of vim plugins and settings for using vim to develop django.
&lt;/p&gt;
&lt;/blockquote&gt;&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/na/django-vim"&gt;Project page&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;19. django-autofixture&lt;/h2&gt;
&lt;blockquote&gt;&lt;p&gt;Can create auto-generated test data.
&lt;/p&gt;
&lt;/blockquote&gt;&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/gregmuellegger/django-autofixture"&gt;Project page&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;20. django-dtpanel-htmltidy&lt;/h2&gt;
&lt;blockquote&gt;&lt;p&gt;The Django Debug Toolbar is a configurable set of panels that display various debug information about the current request/response and when clicked, display more details about the panel's content.
   HTML Tidy or HTML Validatory is custom panel for Django Debug Panel which validate your HTML and display warning and errors as panel.
&lt;/p&gt;
&lt;/blockquote&gt;&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/joymax/django-dtpanel-htmltidy"&gt;Project page&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/robhudson/django-debug-toolbar"&gt;Django debug toolbar&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Bonus: Django clones for node.js&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/drtyhbo/drty"&gt;drty&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/ryanmcgrath/luno"&gt;luno&lt;/a&gt;

&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
    0 comment(s)
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9jchhBPINQWXWD1nnCG1QiDjS3k/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9jchhBPINQWXWD1nnCG1QiDjS3k/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/9jchhBPINQWXWD1nnCG1QiDjS3k/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9jchhBPINQWXWD1nnCG1QiDjS3k/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Haineaultcom/Blog/~4/mWul1QpRfF0" height="1" width="1"/&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">h3</dc:creator><guid isPermaLink="false">http://www.haineault.com/blog/165/</guid><feedburner:origLink>http://www.haineault.com/blog/165/</feedburner:origLink></item><item><title>10-Aug-2011 23:51 - Just noticed that Google Code now have online code editing</title><link>http://feedproxy.google.com/~r/Haineaultcom/Blog/~3/_X8l2sklTjQ/</link><description>&lt;p&gt;And since January &lt;a href="http://code.google.com/p/support/wiki/WhatsNew"&gt;apparently..&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://i.imgur.com/zGB1w.jpg"&gt;&lt;img src="http://i.imgur.com/zGB1w.jpg" width="720" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
&lt;a href="http://i.imgur.com/lhaHB.jpg"&gt;&lt;img src="http://i.imgur.com/lhaHB.jpg" width="720" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;Some other nice things I didn't notice until recently:
&lt;/p&gt;
&lt;h2&gt;Source code&lt;/h2&gt;
&lt;p&gt;Single column diff
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://i.imgur.com/EnyuH.jpg"&gt;&lt;img src="http://i.imgur.com/EnyuH.jpg" width="720" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;h2&gt;Administer / Source tab&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
     VCS switching
 &lt;/li&gt;
&lt;li&gt;
     Source browsing options
 &lt;/li&gt;
&lt;li&gt;
     Reset repository
 &lt;/li&gt;
&lt;li&gt;
     Code reviews options
 &lt;/li&gt;
&lt;li&gt;
     Commit log message processing
 &lt;/li&gt;
&lt;li&gt;
     Post-Commit hooks
 &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://i.imgur.com/QSiac.jpg"&gt;&lt;img src="http://i.imgur.com/QSiac.jpg" width="720" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;Just tried it with &lt;a href="http://read-the-docs.readthedocs.org/en/latest/webhooks.html"&gt;RTD&lt;/a&gt;, seems to work fine :)
&lt;/p&gt;
&lt;p&gt;Good job Google Code dev team ! &lt;a href="http://i.imgur.com/YsKOX.jpg"&gt;Here's a cute kitten&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
    0 comment(s)
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/HBVtKSlOWu0uVR9yzF1K7O41xYs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HBVtKSlOWu0uVR9yzF1K7O41xYs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/HBVtKSlOWu0uVR9yzF1K7O41xYs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HBVtKSlOWu0uVR9yzF1K7O41xYs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Haineaultcom/Blog/~4/_X8l2sklTjQ" height="1" width="1"/&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">h3</dc:creator><guid isPermaLink="false">http://www.haineault.com/blog/164/</guid><feedburner:origLink>http://www.haineault.com/blog/164/</feedburner:origLink></item><item><title>06-Aug-2011 22:30 - Django: Even ponies needs a dad.</title><link>http://feedproxy.google.com/~r/Haineaultcom/Blog/~3/dCUKN65u_nw/</link><description>&lt;p&gt;One of my first encounter with a computer was in my last year of high school. A new course had been introduced to teach students how to type on a keyboard. Yes, the whole course was just about that.
&lt;/p&gt;
&lt;p&gt;That said, I had the chance to have a programmer as teacher and while she didn't taught me much about programming itself, she gave me one of the best advice I ever had about writing code: &lt;em&gt;Good programmers are lazy&lt;/em&gt;.
&lt;/p&gt;
&lt;p&gt;So after getting tired of managing dependencies, deploying Django on different servers I remembered this advice and decided I had enough. I spent too much time typing the same commands over and over and not enough time producing
   actual code.
&lt;/p&gt;
&lt;p&gt;To fix that, I've just released a new &lt;a href="http://code.google.com/p/python-dad/"&gt;Open Source project called python-dad&lt;/a&gt;, which stands for &lt;em&gt;Django Automated Deployment&lt;/em&gt;.
&lt;/p&gt;
&lt;p&gt;From the project home page:
&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Python-dad which stands for Django Automated Deployment is a lightweight Python package which harness the power of &lt;a href="http://pypi.python.org/pypi/virtualenv"&gt;virtualenv&lt;/a&gt;, &lt;a href="http://pypi.python.org/pypi/pip"&gt;pip&lt;/a&gt; and &lt;a href="http://pypi.python.org/pypi/Fabric/1.0.0"&gt;fabric&lt;/a&gt; to fully automate the development setup and deployment of django projects.
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Goals&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
     Be easy to use (little to no knowledge of pip/fabric/virtualenv needed)
 &lt;/li&gt;
&lt;li&gt;
     Streamline django installation on different stages (dev, demo, prod)
 &lt;/li&gt;
&lt;li&gt;
     Spread some pony love
 &lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
     Works on existing projects
 &lt;/li&gt;
&lt;li&gt;
     Works with any VCS (svn, hg, git, etc..)
 &lt;/li&gt;
&lt;li&gt;
     Total encapsulation of project dependencies (thanks to pip/virtualenv)
 &lt;/li&gt;
&lt;li&gt;
     Deploy project to demo or production stage from a single command
 &lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Usage example&lt;/h2&gt;
&lt;p&gt;This show the process of configuring and using python-dad on a Django project:
&lt;/p&gt;
&lt;p&gt;&lt;div class="code_highlight"&gt;&lt;pre&gt;&lt;span class="nv"&gt;$:&lt;/span&gt; &lt;span class="nb"&gt;cd &lt;/span&gt;myproject.com
&lt;span class="nv"&gt;$:&lt;/span&gt; ls
myproject

&lt;span class="c"&gt;# Create necessary hooks&lt;/span&gt;
&lt;span class="nv"&gt;$:&lt;/span&gt; dad-admin.py -s
&lt;span class="nv"&gt;$:&lt;/span&gt; ls
myproject dad apache

&lt;span class="c"&gt;# Configure project&lt;/span&gt;
&lt;span class="nv"&gt;$:&lt;/span&gt; vim dad/project.yml

&lt;span class="c"&gt;# Start developing !&lt;/span&gt;
&lt;span class="nv"&gt;$:&lt;/span&gt; dad-admin.py -d

&lt;span class="c"&gt;# Deploy to demo server&lt;/span&gt;
&lt;span class="nv"&gt;$:&lt;/span&gt; dad-admin.py -p demo

&lt;span class="c"&gt;# Deploy to production server&lt;/span&gt;
&lt;span class="nv"&gt;$:&lt;/span&gt; dad-admin.py -p prod
&lt;/pre&gt;&lt;/div&gt;

&lt;/p&gt;
&lt;p&gt;I believe that if this project gains enough maturity, it has the potential to be useful to a whole lot of Django developers.
&lt;/p&gt;
&lt;p&gt;The only problem is that I develop on Ubuntu and deploy on Ubuntu (also sometimes on Redhat+Plesk), so beside those platforms I don't think I will have enough spare time to test and maintain this project for other distributions. This is why I'm seeking help from other developers who would be interested to contribute to it.
&lt;/p&gt;
&lt;p&gt;Be warned that it's been only two days since I've started working on it, so it's not yet production stable, but I hope it will be soon.
&lt;/p&gt;
&lt;p&gt;Feedbacks, ideas and patches are welcome !
&lt;/p&gt;
&lt;p&gt;
    1 comment(s)
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/b8t7e3tkWyEIhLJFemRY9hEG5os/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/b8t7e3tkWyEIhLJFemRY9hEG5os/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/b8t7e3tkWyEIhLJFemRY9hEG5os/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/b8t7e3tkWyEIhLJFemRY9hEG5os/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Haineaultcom/Blog/~4/dCUKN65u_nw" height="1" width="1"/&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">h3</dc:creator><guid isPermaLink="false">http://www.haineault.com/blog/163/</guid><feedburner:origLink>http://www.haineault.com/blog/163/</feedburner:origLink></item></channel></rss>

