<?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>./cmsimike</title>
	<atom:link href="http://www.cmsimike.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cmsimike.com/blog</link>
	<description>thoughts from a computer scientist</description>
	<lastBuildDate>Sat, 19 May 2012 07:21:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Beer Stash – Increment Beer Count!</title>
		<link>http://www.cmsimike.com/blog/2012/05/19/beer-stash-increment-beer-count/</link>
		<comments>http://www.cmsimike.com/blog/2012/05/19/beer-stash-increment-beer-count/#comments</comments>
		<pubDate>Sat, 19 May 2012 07:21:15 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[beerstash]]></category>
		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://www.cmsimike.com/blog/?p=317</guid>
		<description><![CDATA[Quick update tonight to a featured that some wanted &#8211; counts as a default note that you can increment. Also some layout changes in the add beer popup. As a reminder, this is what it looked like before. &#160; And now we have &#160; Enjoy!]]></description>
			<content:encoded><![CDATA[<p>Quick update tonight to a featured that some wanted &#8211; counts as a default note that you can increment. Also some layout changes in the add beer popup.</p>
<p>As a reminder, this is what it looked like before.</p>
<p><a href="http://www.cmsimike.com/blog/wp-content/uploads/2012/05/Screen-Shot-2012-05-19-at-12.14.59-AM.png"><img class="alignnone size-full wp-image-318" title="old-add-beer" src="http://www.cmsimike.com/blog/wp-content/uploads/2012/05/Screen-Shot-2012-05-19-at-12.14.59-AM.png" alt="" width="572" height="268" /></a></p>
<p>&nbsp;</p>
<p>And now we have</p>
<p><a href="http://www.cmsimike.com/blog/wp-content/uploads/2012/05/Screen-Shot-2012-05-19-at-12.15.27-AM.png"><img class="alignnone size-full wp-image-319" title="new-add-beer" src="http://www.cmsimike.com/blog/wp-content/uploads/2012/05/Screen-Shot-2012-05-19-at-12.15.27-AM.png" alt="" width="568" height="293" /></a></p>
<p>&nbsp;</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cmsimike.com/blog/2012/05/19/beer-stash-increment-beer-count/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beer Stash &#8211; Stash Your Beer With Us!</title>
		<link>http://www.cmsimike.com/blog/2012/05/16/beer-stash-stash-your-beer-with-us/</link>
		<comments>http://www.cmsimike.com/blog/2012/05/16/beer-stash-stash-your-beer-with-us/#comments</comments>
		<pubDate>Thu, 17 May 2012 01:28:58 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[beerstash]]></category>
		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://www.cmsimike.com/blog/?p=302</guid>
		<description><![CDATA[I am very pleased to announce the limited release of my latest application BeerStash. I do have big plans for this site down the line but I decided to do the Lean thing and get something out asap and have people start using it. In its current form, it does a a few things: 1) <a href='http://www.cmsimike.com/blog/2012/05/16/beer-stash-stash-your-beer-with-us/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I am very pleased to announce the limited release of my latest application <a title="Beer Stash" href="http://thebeerstash.com" target="_blank">BeerStash</a>. I do have big plans for this site down the line but I decided to do the Lean thing and get something out asap and have people start using it. In its current form, it does a a few things:</p>
<p>1) It is integrated with <a title="Untappd" href="untappd.com" target="_blank">Untappd</a> to leverage their beer and brewery database (thanks, guys!)</p>
<p>2) You can search Untappd&#8217;s beer database.</p>
<p>3) Create as many stashes as you want to add beer to! (Don&#8217;t know if it will always be unlimited, but for now it is).</p>
<p>4) Link publicly to your stash of choice!</p>
<p>This is about as long as my release announcement is going to be. Below are screen shots of the development process.</p>
<p><span id="more-302"></span></p>
<p>With any new development project, the framework is setup.<br />
<a href="http://www.cmsimike.com/blog/wp-content/uploads/2012/05/0.jpg"><img class="size-full wp-image-303 alignnone" title="beerstash-0" src="http://www.cmsimike.com/blog/wp-content/uploads/2012/05/0.jpg" alt="" width="1363" height="961" /></a></p>
<p>&nbsp;</p>
<p>And we make sure we get something to the browser.</p>
<p><a href="http://www.cmsimike.com/blog/wp-content/uploads/2012/05/1.png"><img class="size-full wp-image-304 alignnone" title="beerstash-1" src="http://www.cmsimike.com/blog/wp-content/uploads/2012/05/1.png" alt="" width="140" height="78" /></a></p>
<p>Since my idea relies heavily on Untappd&#8217;s search, I decided that would be the best starting point. No reason to continue if, for whatever reason, that didn&#8217;t work.</p>
<p><a href="http://www.cmsimike.com/blog/wp-content/uploads/2012/05/2.png"><img class="alignnone size-full wp-image-305" title="2" src="http://www.cmsimike.com/blog/wp-content/uploads/2012/05/2.png" alt="" width="676" height="661" /></a></p>
<p>Next logical step? Let&#8217;s add beers to something!</p>
<p><a href="http://www.cmsimike.com/blog/wp-content/uploads/2012/05/3.png"><img class="alignnone size-full wp-image-306" title="3" src="http://www.cmsimike.com/blog/wp-content/uploads/2012/05/3.png" alt="" width="482" height="288" /></a></p>
<p>&nbsp;</p>
<p>With functionality checking out, I decided to start on some design work. I tend to work better when the site looks like a fancy site and not just plain text. WARNING I AM NOT A DESIGNER NOR DO I TRY TO BE as I&#8217;m sure you will notice using the app.</p>
<p><a href="http://www.cmsimike.com/blog/wp-content/uploads/2012/05/4.png"><img class="alignnone size-full wp-image-307" title="4" src="http://www.cmsimike.com/blog/wp-content/uploads/2012/05/4.png" alt="" width="1247" height="360" /></a></p>
<p>&nbsp;</p>
<p>Working on the layout &#8211; notice the filler information on top. Got a basic search look and feel going.</p>
<p><a href="http://www.cmsimike.com/blog/wp-content/uploads/2012/05/5.png"><img class="alignnone size-full wp-image-308" title="5" src="http://www.cmsimike.com/blog/wp-content/uploads/2012/05/5.png" alt="" width="1248" height="463" /></a></p>
<p>&nbsp;</p>
<p>My original Lean idea was to only have one default list that everything gets added to at first, then allow for more. For various reason, I decided it would be better to allow all users to start creating stashes from now.</p>
<p><a href="http://www.cmsimike.com/blog/wp-content/uploads/2012/05/6.png"><img class="alignnone size-full wp-image-309" title="6" src="http://www.cmsimike.com/blog/wp-content/uploads/2012/05/6.png" alt="" width="1230" height="258" /></a></p>
<p>&nbsp;</p>
<p>Starting to get fancy!</p>
<p><a href="http://www.cmsimike.com/blog/wp-content/uploads/2012/05/7.png"><img class="alignnone size-full wp-image-310" title="7" src="http://www.cmsimike.com/blog/wp-content/uploads/2012/05/7.png" alt="" width="749" height="308" /></a></p>
<p>&nbsp;</p>
<p>And fancier still. More astute readers will notice the name &#8220;The Beer Stash.&#8221; I tried rebranding the site when I bought the domain thebeerstash.com, but really didn&#8217;t like how it looked, so I reverted.</p>
<p><a href="http://www.cmsimike.com/blog/wp-content/uploads/2012/05/8.png"><img class="alignnone size-full wp-image-311" title="8" src="http://www.cmsimike.com/blog/wp-content/uploads/2012/05/8.png" alt="" width="1116" height="623" /></a></p>
<p>&nbsp;</p>
<p>Making sure that the ajax was all hooked up properly for adding beers.</p>
<p><a href="http://www.cmsimike.com/blog/wp-content/uploads/2012/05/9.png"><img class="alignnone size-full wp-image-312" title="9" src="http://www.cmsimike.com/blog/wp-content/uploads/2012/05/9.png" alt="" width="198" height="113" /></a></p>
<p>Rendering all of a user&#8217;s beer stashes.</p>
<p><a href="http://www.cmsimike.com/blog/wp-content/uploads/2012/05/10.png"><img class="alignnone size-full wp-image-313" title="10" src="http://www.cmsimike.com/blog/wp-content/uploads/2012/05/10.png" alt="" width="458" height="332" /></a></p>
<p>&nbsp;</p>
<p>Consider this more of a prototype. I wanted to see what kind of usage it got. I want people to start adding beers to their stashes. I want people to use it. I am excited for this because I see a huge potential in this that will keep me interested in a very long time. I also like the idea of blogging updates (as previous project updates will show) so maybe I&#8217;ll be blogging a lot more.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cmsimike.com/blog/2012/05/16/beer-stash-stash-your-beer-with-us/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Taskie &#8211; with Archiving!</title>
		<link>http://www.cmsimike.com/blog/2012/04/29/taskie-with-archiving/</link>
		<comments>http://www.cmsimike.com/blog/2012/04/29/taskie-with-archiving/#comments</comments>
		<pubDate>Mon, 30 Apr 2012 04:39:50 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[taskie]]></category>
		<category><![CDATA[updates]]></category>

		<guid isPermaLink="false">http://www.cmsimike.com/blog/?p=297</guid>
		<description><![CDATA[Boom, another update! How? Well the other post prepped for a while. I wanted to get this one last change in before possibly moving to another project. I&#8217;ve just released version 18 of Taskie. Two updates: Upgraded Twitter Bootstrap to 2.0.3 Implemented Archiving This is how archiving works: When you&#8217;ve promoted a Taskie up to <a href='http://www.cmsimike.com/blog/2012/04/29/taskie-with-archiving/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Boom, another update! How? Well the other post prepped for a while. I wanted to get this one last change in before possibly moving to another project.</p>
<p>I&#8217;ve just released version 18 of Taskie. Two updates:</p>
<ol>
<li>Upgraded Twitter Bootstrap to 2.0.3</li>
<li>Implemented Archiving</li>
</ol>
<p>This is how archiving works:</p>
<p>When you&#8217;ve promoted a Taskie up to Comleted, the hover-over menu has a new option, Archive.</p>
<p><a href="http://www.cmsimike.com/blog/wp-content/uploads/2012/04/taskie-archive.png"><img class="size-full wp-image-298" title="taskie-archive" src="http://www.cmsimike.com/blog/wp-content/uploads/2012/04/taskie-archive.png" alt="" width="415" height="111" /></a></p>
<p>&nbsp;</p>
<p>There is no confirmation, so be careful. I thought a confirm popup would only get in the way of an otherwise quick experience. Once a Taskie is archived, you can&#8217;t see them anymore, for now. I&#8217;m sure I will have to do something about it but my &#8220;Complete&#8221; status was getting out of hand.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cmsimike.com/blog/2012/04/29/taskie-with-archiving/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Taskie, for Me &#8211; Simple Task Management</title>
		<link>http://www.cmsimike.com/blog/2012/04/29/taskie-for-me-simple-task-management/</link>
		<comments>http://www.cmsimike.com/blog/2012/04/29/taskie-for-me-simple-task-management/#comments</comments>
		<pubDate>Sun, 29 Apr 2012 22:09:11 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[taskie]]></category>

		<guid isPermaLink="false">http://www.cmsimike.com/blog/?p=284</guid>
		<description><![CDATA[I&#8217;ve always had a problem of managing stuff I have to do. In my research, there are about 2x as many task management systems out there as there are people. The issue is that most of them didn&#8217;t do what I wanted it to do. There were systems that were overly complicated, missing features I would <a href='http://www.cmsimike.com/blog/2012/04/29/taskie-for-me-simple-task-management/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always had a problem of managing stuff I have to do. In my research, there are about 2x as many task management systems out there as there are people. The issue is that most of them didn&#8217;t do what <em>I</em> wanted it to do. There were systems that were overly complicated, missing features I would have liked, pay  only or any other of a list of excuses that convinced me not to use it. This lead to things such as not using anything to manage the things I had to do. This makes getting anything done on projects impossible because any things you eventually needed to get done would be forgotten. Writing it down on paper would have worked but this is 2012, plus I use so many devices that I&#8217;d rather not have to keep all my notes on me at once. So what did I do?</p>
<p><span id="more-284"></span>I wrote my own with my own needs in mind. This was perfect as it gave me another reason to work on my Python and Django skills and finally be able to have some way of managing tasks that I&#8217;d like. Other things &#8211; learning Twitter&#8217;s Bootstrap &#8211; also ranked highly.</p>
<p>I am proud to announce today the release of <a title="Taskie, for Me" href="http://taskiefor.me" target="_blank">Taskie, for Me</a>. It is basic for now, but I hope to give it more functionality over time. I have a list of new ideas that I&#8217;d like to implement (being managed by Taskie &#8211; HOW META!) that I hope to get to over the site&#8217;s life. So how&#8217;s it work?</p>
<p>What I was trying to solve is that my projects ultimately get broken up into sub projects. And sometimes those get broken down further. I like granularity. I wanted my task management system to reflect that. That&#8217;s how I came to the idea of Taskie &#8211; each task itself can be a bigger &#8220;project,&#8221; though there is no concept of &#8220;project&#8221; in the system, Just tasks that have tasks associated to it.</p>
<p>&nbsp;</p>
<p>Step 1 Welcome to Taskie</p>
<p><a href="http://www.cmsimike.com/blog/wp-content/uploads/2012/04/taskie-1.png"><img class="aligncenter size-full wp-image-286" title="taskie-1" src="http://www.cmsimike.com/blog/wp-content/uploads/2012/04/taskie-1.png" alt="" width="1176" height="142" /></a></p>
<p>You&#8217;re greeted with your Taskie status bar telling you how many Taskies you have in what status. The upper right has a + button. This takes you to</p>
<p>Step 2: Create a root Taskie</p>
<p><a href="http://www.cmsimike.com/blog/wp-content/uploads/2012/04/taskie-2.png"><img class="aligncenter size-full wp-image-287" title="taskie-2" src="http://www.cmsimike.com/blog/wp-content/uploads/2012/04/taskie-2.png" alt="" width="1118" height="537" /></a></p>
<p>Simple. You are required to give a title and select a priority. The description is optional. More on this later. Let&#8217;s give this a high priority. Hitting save&#8230;.</p>
<p>Step 3: Taskie Overview</p>
<p><a href="http://www.cmsimike.com/blog/wp-content/uploads/2012/04/taskie-3.png"><img class="aligncenter size-full wp-image-288" title="taskie-3" src="http://www.cmsimike.com/blog/wp-content/uploads/2012/04/taskie-3.png" alt="" width="1209" height="358" /></a></p>
<p>&nbsp;</p>
<p>This is your top-most view. This gives you a breakdown of your root Taskies, which each one being color coded. Red is high, yellow is medium and green is low. This is all you need if you just have a bunch of stuff to keep track of, but if you want to start breaking things up into logical groupings</p>
<p>Step 4: Creating sub-Taskies</p>
<p><a href="http://www.cmsimike.com/blog/wp-content/uploads/2012/04/taskie-5.png"><img class="size-full wp-image-290" title="taskie-5" src="http://www.cmsimike.com/blog/wp-content/uploads/2012/04/taskie-5.png" alt="" width="418" height="151" /></a></p>
<p>Hovering over any Taskie in this view shows the Tasktie actions. Promote to move your Taskie from New to Complete statuses and an open option to take you into the Taskie. This is where the magic I think is</p>
<p>Step 5: Create sub-Taskies</p>
<p><a href="http://www.cmsimike.com/blog/wp-content/uploads/2012/04/taskie-4.png"><img class="aligncenter size-full wp-image-289" title="taskie-4" src="http://www.cmsimike.com/blog/wp-content/uploads/2012/04/taskie-4.png" alt="" width="1225" height="366" /></a></p>
<p>This is what you see when you go into a Taskie &#8211; the same kind of view you are already familiar with. You can create a sub Taskie from here.</p>
<p>&nbsp;</p>
<p>So why did I go this route? Well it goes without saying that I created this to manage my projects but it had always bugged me that task trackers were more or less &#8220;flat&#8221; meaning you have one project then a bunch of tasks associated on the first level. I didn&#8217;t want that. I wanted a top most project (or task, whatever) for this project let&#8217;s say:</p>
<p>Taskie</p>
<p>From there, you can add just a bunch of loosely associated Taskies (only having one level of Taskies) or break Taskies into ideas. Let&#8217;s say I want to implement search, file management and some api for it. Those are huge ideas. I&#8217;d like to take that one huge idea and break it down further into sub Taskies that I can consume. Here, imagine that each bunch of sub Taskies make up the whole of the parent Taskie.</p>
<p><a href="http://www.cmsimike.com/blog/wp-content/uploads/2012/04/taskie-6.png"><img class="aligncenter size-full wp-image-293" title="taskie-6" src="http://www.cmsimike.com/blog/wp-content/uploads/2012/04/taskie-6.png" alt="" width="1197" height="394" /></a></p>
<p>Here we see a parent Taskie &#8220;Some new idea&#8221; with three sub Taskies, each with a different status and priority.</p>
<p>Going back to before, I don&#8217;t require a description because once you reach down to the parent of a child with no offspring (essentially what you see in the top last image), it&#8217;s just a bunch of things that need to get done. Mostly of the time, one or two lines is enough to convey what you need to have done. If more explanation is needed, then the description field can be used and further sub Taskies can be created.</p>
<p>This is still very much in development (I don&#8217;t even have a real main image yet), but I do plan on developing it. Since I will be using this to manage not only my projects but anything else I need to have with me, so I&#8217;m sure there will be a lot of new features that I&#8217;m going to want. I just liked the idea of a task management system&#8217;s tasks being managed by itself. HOW META! Also, it wasn&#8217;t until Microsoft started using their own developer tools that they realized their tools was rubbish. I could sit here and develop this thing but until it starts to see real usage, you&#8217;ll never know how it works out. I admit, there are a lot of rough edges.</p>
<p>Signing up on the home page puts you in queue to get an account if you&#8217;re interested in helping me test.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cmsimike.com/blog/2012/04/29/taskie-for-me-simple-task-management/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install MySQL on Ubuntu Without Being Prompted for a Password</title>
		<link>http://www.cmsimike.com/blog/2012/01/08/install-mysql-on-ubuntu-without-being-prompted-for-a-password/</link>
		<comments>http://www.cmsimike.com/blog/2012/01/08/install-mysql-on-ubuntu-without-being-prompted-for-a-password/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 22:20:29 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[automatic]]></category>
		<category><![CDATA[debconf]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[provisioning]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.cmsimike.com/blog/?p=281</guid>
		<description><![CDATA[I&#8217;ve been doing quite a lot of development lately, on various projects, and have been making great use of Vagrant for isolated development. As such, I need to write provisioning scripts so that each machine can be built exactly as the production machine will be. I&#8217;ve tried Puppet once but it was far more than what I <a href='http://www.cmsimike.com/blog/2012/01/08/install-mysql-on-ubuntu-without-being-prompted-for-a-password/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been doing quite a lot of development lately, on various projects, and have been making great use of Vagrant for isolated development. As such, I need to write provisioning scripts so that each machine can be built exactly as the production machine will be. I&#8217;ve tried Puppet once but it was far more than what I needed, so I just settled with using a shell script provisioner. Just a basic bash file with a bunch of apt-gets, pips and what not. Most of my projects require a database so MySQL it is. The issue I had was automatically installing MySQL without being asked for a password (as the provisioner is non-interactive). One amazing way I&#8217;ve found is issuing these commands before the apt-get (or tasksel) commands to install MySQL</p>
<pre>
echo "mysql-server mysql-server/root_password select (YOUR PASSWORD)" | sudo debconf-set-selections
echo "mysql-server mysql-server/root_password_again select (YOUR PASSWORD)" | sudo debconf-set-selections
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.cmsimike.com/blog/2012/01/08/install-mysql-on-ubuntu-without-being-prompted-for-a-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting Up Local Mail Delivery on Ubuntu with Postfix and Mutt</title>
		<link>http://www.cmsimike.com/blog/2011/10/30/setting-up-local-mail-delivery-on-ubuntu-with-postfix-and-mutt/</link>
		<comments>http://www.cmsimike.com/blog/2011/10/30/setting-up-local-mail-delivery-on-ubuntu-with-postfix-and-mutt/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 03:06:26 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[local]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[mutt]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.cmsimike.com/blog/?p=279</guid>
		<description><![CDATA[I am getting pretty close to deploying m webap and am currently looking into ways to monitor exceptions once deployed. Django has the ability to email whenever it encounters a 500 error. I don&#8217;t really want any emails being sent out (yet) so I decided that I should probably just stick with local mail delivery <a href='http://www.cmsimike.com/blog/2011/10/30/setting-up-local-mail-delivery-on-ubuntu-with-postfix-and-mutt/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I am getting pretty close to deploying m webap and am currently looking into ways to monitor exceptions once deployed. Django has the ability to email whenever it encounters a 500 error. I don&#8217;t really want any emails being sent out (yet) so I decided that I should probably just stick with local mail delivery until such time that I want to be notified right away of a problem.<br />
<span id="more-279"></span><br />
I&#8217;ve set up local mail delivery before using <a title="Postfix Home Page" href="http://www.postfix.org/" target="_blank">Postfix</a> but I always end up having to figure out how to do it over and over. This post is really going to be for me to remember how to do it but I figured that others may like to know about my methodologies for exception monitoring. The brilliant part about that is since I will be using a pretty beefy server, all my webapps will be able to use the same local email delivery so all my mails indicating problems will be in one place.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> postfix</pre></div></div>

<p>Under &#8220;General type of mail configuration&#8221; select Local only</p>
<p>System mail name: localhost (I will presume from here on out that you are sending email to &lt;user&gt;@localhost)</p>
<p>Once complete, issue this command to tell postfix where to deliver mail:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> postconf <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;home_mailbox = Maildir/&quot;</span></pre></div></div>

<p>Now we install mutt:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> mutt</pre></div></div>

<p>And then configure mutt to know where our email will be delivered to and what kind of mailbox it will be:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vim</span> ~<span style="color: #000000; font-weight: bold;">/</span>.muttrc</pre></div></div>

<p>Paste this into the file:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">mbox_type</span>=Maildir
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">folder</span>=<span style="color: #ff0000;">&quot;~/Maildir&quot;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">mask</span>=<span style="color: #ff0000;">&quot;!^\\.[^.]&quot;</span>
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">mbox</span>=<span style="color: #ff0000;">&quot;~/Maildir&quot;</span>
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">record</span>=<span style="color: #ff0000;">&quot;+.Sent&quot;</span>
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">postponed</span>=<span style="color: #ff0000;">&quot;+.Drafts&quot;</span>
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">spoolfile</span>=<span style="color: #ff0000;">&quot;~/Maildir&quot;</span></pre></div></div>

<p>Then start mutt so that it can create our mailbox.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mutt</pre></div></div>

<p>You will probably get a message that says:</p>
<pre>/home/USER/Maildir is not a mailbox.</pre>
<p>Don&#8217;t worry about it for now. Postfix will fix that for us on first delivery.</p>
<p>This part is optional &#8211; set where any mail sent to root is forwarded to.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">vim</span> <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>.forward</pre></div></div>

<p>and in it, type:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">USER<span style="color: #000000; font-weight: bold;">@</span>localhost</pre></div></div>

<p>If you want all mail for root to be sent to the user mike, you&#8217;d write<br />
mike@localhost</p>
<p>Now you can test this out using python</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">smtplib</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">string</span>
SUBJECT = <span style="color: #483d8b;">&quot;Test email&quot;</span>
TO = <span style="color: #483d8b;">&quot;root@localhost&quot;</span> <span style="color: #808080; font-style: italic;"># This is to test forwarding from root to another user. if you didn't set up forwarding, use your username</span>
FROM = <span style="color: #483d8b;">&quot;python@localhost&quot;</span>
text = <span style="color: #483d8b;">&quot;blah blah blah&quot;</span>
BODY = <span style="color: #dc143c;">string</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span><span style="color: black;">&#40;</span>
        <span style="color: #483d8b;">&quot;From: %s&quot;</span> <span style="color: #66cc66;">%</span> FROM,
        <span style="color: #483d8b;">&quot;To: %s&quot;</span> <span style="color: #66cc66;">%</span> TO,
        <span style="color: #483d8b;">&quot;Subject: %s&quot;</span> <span style="color: #66cc66;">%</span> SUBJECT,
        <span style="color: #483d8b;">&quot;&quot;</span>,
        text
        <span style="color: black;">&#41;</span>,
<span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span>
server = <span style="color: #dc143c;">smtplib</span>.<span style="color: black;">SMTP</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'localhost'</span><span style="color: black;">&#41;</span>
server.<span style="color: black;">sendmail</span><span style="color: black;">&#40;</span>FROM, TO,BODY<span style="color: black;">&#41;</span>
server.<span style="color: black;">quit</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>Now you can send mail to any users on the system. If I ever want change the delivery from local to something that gets sent out, I can follow one of the many articles on the internet describing how to set up <a href="http://ykyuen.wordpress.com/2011/02/05/postfix-relay-via-gmail/">relaying through Gmail</a> and set my local user&#8217;s .forward to an email (not verified, hypothesized).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cmsimike.com/blog/2011/10/30/setting-up-local-mail-delivery-on-ubuntu-with-postfix-and-mutt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>django-boilerplate-layout</title>
		<link>http://www.cmsimike.com/blog/2011/09/18/django-boilerplate-layout/</link>
		<comments>http://www.cmsimike.com/blog/2011/09/18/django-boilerplate-layout/#comments</comments>
		<pubDate>Sun, 18 Sep 2011 22:55:18 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[boilerplate]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[file layout]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.cmsimike.com/blog/?p=277</guid>
		<description><![CDATA[Very quickly, I&#8217;d like to introduce to you my newest github project &#8211; django-boilerplate-layout. It is my hope that for each new version of django, you can check out this project layout and just start coding. More info on what this project is on the README.markdown]]></description>
			<content:encoded><![CDATA[<p>Very quickly, I&#8217;d like to introduce to you my newest github project &#8211; <a title="django-boilerplate-layout" href="https://github.com/cmsimike/django-boilerplate-layout" target="_blank">django-boilerplate-layout</a>. It is my hope that for each new version of django, you can check out this project layout and just start coding. More info on what this project is on the README.markdown</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cmsimike.com/blog/2011/09/18/django-boilerplate-layout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Session-Backed URL Redirect After Login with Django</title>
		<link>http://www.cmsimike.com/blog/2011/07/30/session-backed-url-redirect-after-login-with-django/</link>
		<comments>http://www.cmsimike.com/blog/2011/07/30/session-backed-url-redirect-after-login-with-django/#comments</comments>
		<pubDate>Sun, 31 Jul 2011 02:00:45 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[redirect]]></category>
		<category><![CDATA[session]]></category>

		<guid isPermaLink="false">http://www.cmsimike.com/blog/?p=275</guid>
		<description><![CDATA[I am working on a Django-powered website, a website with no actual login of it&#8217;s own. I am using 3rd parties (Facebook/Twitter/etc) to provide authentication for my users. The issue I ran into is, what happens if a user goes to a url that is protected with a @login_requred decorator? Well, it should be simple &#8211; Django <a href='http://www.cmsimike.com/blog/2011/07/30/session-backed-url-redirect-after-login-with-django/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I am working on a Django-powered website, a website with no actual login of it&#8217;s own. I am using 3rd parties (Facebook/Twitter/etc) to provide authentication for my users. The issue I ran into is, what happens if a user goes to a url that is protected with a @login_requred decorator? Well, it should be simple &#8211; Django redirects the user to the supposed login page, with a parameter of next=/some/url/to/go/to. Since my app doesn&#8217;t do the login itself, the user then clicks on which third party service they wish to authenticate against. The user is taken through the third party&#8217;s authentication workflow and redirected back to my site. The problem here is that the &#8220;next&#8221; url parameter is lost in the process. I thought I would need to write a @login_required_session decorator, which would be less than ideal if my app then uses built in views with the @login_required decorator.</p>
<p><span id="more-275"></span>There is a simple work around for this: shove the value for the &#8220;next&#8221; url paramter into the session of where ever your login page is. Upon return, check to see if a session value exists for url redirection and if so, use it. Here is the code I came up with:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">    <span style="color: #808080; font-style: italic;"># If we have a redirect URL in our session, redirect to it.</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> request.<span style="color: black;">session</span>.<span style="color: black;">has_key</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'redirect-url'</span><span style="color: black;">&#41;</span>:  
        redirect_url = request.<span style="color: black;">session</span>.<span style="color: black;">get</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'redirect-url'</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">del</span> request.<span style="color: black;">session</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">'redirect-url'</span><span style="color: black;">&#93;</span>
        <span style="color: #ff7700;font-weight:bold;">return</span> HttpResponseRedirect<span style="color: black;">&#40;</span>redirect_url<span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #808080; font-style: italic;"># if the url has a next paramter, save it in the session</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> request.<span style="color: black;">GET</span>.<span style="color: black;">get</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'next'</span>, <span style="color: #008000;">None</span><span style="color: black;">&#41;</span>:
        request.<span style="color: black;">session</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">'redirect-url'</span><span style="color: black;">&#93;</span> = request.<span style="color: black;">GET</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">'next'</span><span style="color: black;">&#93;</span></pre></div></div>

<p>Note here that where the user is redirected to if not logged in and where the user is redirected to post-third party authentication is the same for me. If you have two separate views for this, you&#8217;d break the above code up and put them where they make sense.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cmsimike.com/blog/2011/07/30/session-backed-url-redirect-after-login-with-django/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>django-twitter-oauth on github</title>
		<link>http://www.cmsimike.com/blog/2011/06/16/django-twitter-oauth-on-github/</link>
		<comments>http://www.cmsimike.com/blog/2011/06/16/django-twitter-oauth-on-github/#comments</comments>
		<pubDate>Fri, 17 Jun 2011 03:49:56 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[django-twitter-oauth]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.cmsimike.com/blog/?p=273</guid>
		<description><![CDATA[Just a quick post to link (one of my) works in progress &#8211; django-twitter-oauth that I forked on github. It is a work in progress as I am using it on another project I&#8217;m working on currently so, hopefully, this app can only get better over time. There are a few things I may want <a href='http://www.cmsimike.com/blog/2011/06/16/django-twitter-oauth-on-github/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Just a quick post to link (one of my) works in progress &#8211; <a href="https://github.com/cmsimike/django-twitter-oauth" target="_blank">django-twitter-oauth</a> that I forked on github. It is a work in progress as I am using it on another project I&#8217;m working on currently so, hopefully, this app can only get better over time. There are a few things I may want to change (caching the access token in the session instead of always going to the DB) and, really, this has not been tested on MySQL yet (I am using sqlite3 for dev), but it should work. Works well so far. Only a few problems I have yet to start working on (off the top of my head, random BadStatusLine exception every once in a while, mainly) .</p>
<p>I will try to update my blog whenever I update the app with what I changed, but we&#8217;ll see.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cmsimike.com/blog/2011/06/16/django-twitter-oauth-on-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Separating Out Django Models into Different Files</title>
		<link>http://www.cmsimike.com/blog/2011/06/06/separating-out-django-models-into-different-files/</link>
		<comments>http://www.cmsimike.com/blog/2011/06/06/separating-out-django-models-into-different-files/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 06:55:12 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[init]]></category>
		<category><![CDATA[models]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.cmsimike.com/blog/?p=270</guid>
		<description><![CDATA[This will be a really quick post since, for whatever reason, I could not find this information out easy on the internet. The only reason I was able to find it is due to my great and good friend, Andres Buritica&#8217;s help. Starting a Django project, then an app gives you a models.py which Django expects <a href='http://www.cmsimike.com/blog/2011/06/06/separating-out-django-models-into-different-files/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>This will be a really quick post since, for whatever reason, I could not find this information out easy on the internet. The only reason I was able to find it is due to my great and good friend, Andres Buritica&#8217;s help. Starting a Django project, then an app gives you a models.py which Django expects to house all the models. This does not seem like the best of ideas, so obviously I want to split up the models into their own files in a specific model directory. To accomplish this, you must do two things:</p>
<ol>
<li>Create a meta class for the model with a field &#8220;app_label&#8221; being set to the name of your app</li>
<li>In your __init__.py file, import that model.</li>
</ol>
<p>For example, if you started an app by typing out &#8216;python manage.py startapp foo&#8217;, you can delete your models.py file, replace it with a directory named models (what I do), and inside have an __init__.py and Bar.py files.<br />
in Bar.py:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> django.<span style="color: black;">db</span> <span style="color: #ff7700;font-weight:bold;">import</span> models
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> Bar<span style="color: black;">&#40;</span>models.<span style="color: black;">Model</span><span style="color: black;">&#41;</span>:
    bar    = models.<span style="color: black;">TextField</span><span style="color: black;">&#40;</span>blank=<span style="color: #008000;">False</span><span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">class</span> Meta:
        app_label = <span style="color: #483d8b;">&quot;foo&quot;</span></pre></div></div>

<p>then in __init__.py:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> Bar <span style="color: #ff7700;font-weight:bold;">import</span> Bar</pre></div></div>

<p>This also goes for other things specified outside of the Django &#8220;norm&#8221; I guess?<br />
If I wanted to associate Bar with the admin, I create a subdirectory inside my app named admin, and inside it I have<br />
BarAdmin.py</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> foo.<span style="color: black;">models</span> <span style="color: #ff7700;font-weight:bold;">import</span> Bar
<span style="color: #ff7700;font-weight:bold;">from</span> django.<span style="color: black;">contrib</span> <span style="color: #ff7700;font-weight:bold;">import</span> admin
&nbsp;
admin.<span style="color: #dc143c;">site</span>.<span style="color: black;">register</span><span style="color: black;">&#40;</span>Bar<span style="color: black;">&#41;</span></pre></div></div>

<p>Inside the __init__.py for the admin subdirectory, you&#8217;d have:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> BarAdmin</pre></div></div>

<p>Now I could be doing this all wrong but this is the only way I managed to get everything working. If there is a better way to do this, I am all ears. To you Django/Python professionals out there, this may be common knowledge but I am noobing it up right now trying to better learn Python and Django.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cmsimike.com/blog/2011/06/06/separating-out-django-models-into-different-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

