<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
 
 <title>One Cardinal blog</title>
 
 <link href="http://onecardinal.com/" />
 <updated>2012-03-21T02:28:26+00:00</updated>
 <id>http://onecardinal.com/</id>
 <author>
   <name>Colin Powell</name>
   <email>colin@onecardinal.com</email>
 </author>

 
 <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/one-cardinal" /><feedburner:info uri="one-cardinal" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
   <title>Django Multiblogs</title>
   <link href="http://feedproxy.google.com/~r/one-cardinal/~3/0dQaSlnrvZE/django-multiblogs.html" />
   <updated>2011-10-21T00:00:00+00:00</updated>
   <id>http://onecardinal.com/2011/10/21/django-multiblogs</id>
   <content type="html">&lt;h1&gt;Django Multiblogs&lt;/h1&gt;
&lt;h2&gt;Django&lt;/h2&gt;
&lt;p class="meta"&gt;21 October 2011&lt;/p&gt;
&lt;p&gt;After searching to no avail for a while, I finally broke down and wrote my own version of a django application capable of hosting numerous blogs on one site. You really wouldn&amp;#8217;t think it would be this hard. Hosting multiple blogs is not difficult. But perhaps that&amp;#8217;s why there&amp;#8217;s no project for it. Either way, I also had to mercilessly hack on codekoala&amp;#8217;s wonderful &lt;a href="http://github.com/codekoala/django-articles"&gt;django-articles&lt;/a&gt; project, as I really did not want to have to reinvent all his wonderful post management code.&lt;/p&gt;
&lt;p&gt;What that means, of course, is that multiblogs depends pretty heavily on &lt;a href="http://github.com/powellc/django-articles"&gt;my fork&lt;/a&gt; of the articles application. But it was worth it to not have to repeat myself. It also means that, as with most projects that require multiple blogs, you get the articles app for free, for some sort of canonical blog, or news posting mechanism.&lt;/p&gt;
&lt;p&gt;The long and the short of multiblogs is that, beyond simply giving you the ability to have many blogs, you can also group them. My motivation here was to allow a school to have a &amp;#8220;student&amp;#8221; blog section and other sections for after school programs or teachers. Thus, the blog set &amp;#8220;student voices&amp;#8221; would be sequestered under it&amp;#8217;s own url, very clearly separating it from any other blogs on the site.&lt;/p&gt;
&lt;p&gt;Of course, if all you want are multiple blogs, you can use the MULTIBLOGS_WITHOUT_SETS setting set to false to achive that. Multiblogs will then rip all the set-related urls and models out of the app. Cool.&lt;/p&gt;
&lt;p&gt;So pickup a copy of the project at &lt;a href="http://github.com/powellc/django-multiblogs"&gt;github&lt;/a&gt; and remember to use my forked version of django-articles.&lt;/p&gt;
&lt;p&gt;&amp;#8212;&lt;/p&gt;
&lt;p&gt;Discuss this post on Twitter with #onec-dj-mb&lt;/p&gt;
&lt;p&gt;&lt;a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/"&gt;&lt;img alt="Creative 
Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/3.0/us/80x15.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/one-cardinal/~4/0dQaSlnrvZE" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://onecardinal.com/2011/10/21/django-multiblogs.html</feedburner:origLink></entry>
 
 <entry>
   <title>Taking on Risk</title>
   <link href="http://feedproxy.google.com/~r/one-cardinal/~3/K2AWBvw6-RY/taking-on-risk.html" />
   <updated>2011-05-22T00:00:00+00:00</updated>
   <id>http://onecardinal.com/2011/05/22/taking-on-risk</id>
   <content type="html">&lt;h1&gt;Taking on Risk&lt;/h1&gt;
&lt;h2&gt;Mind&lt;/h2&gt;
&lt;p class="meta"&gt;22 May 2011&lt;/p&gt;
&lt;p&gt;Beginning June 30 I will not have a full-time job. It will be the first time since graduating from college that I will be floating free of a steady paycheck. But unlike those heady days when my partner&amp;#8217;s job secured us a place to live, I now have a baby girl and a mortgage. Two of the biggest anchors people can lay in life, and that should make one entierely risk averse, willing to plod around doing work for work&amp;#8217;s sake to make sure the college fund doesn&amp;#8217;t run dry and you are not foreclosed on.&lt;/p&gt;
&lt;p&gt;But looking around, while a steady job is nice, I feel more and more that I am not living up to my potential, and that is a frustrating and sometimes depressing thought. None of this is to denigrate my previous place of work. I loved the time I spent there and it has helped become a more open and thoughful person. The skills I built and the obstacles I overcame to do consistently high quality work have been invaluable, perhaps even more so than college (a subject for another article).&lt;/p&gt;
&lt;p&gt;But I noticed a cognitive dissonance between what I was doing in my free time to have fun and what I was doing at work. While I majored in English in college, I minored in comp sci and have always been a tinkerer. I love to build things, the more complex the better. Modeling real-world systems into data that can then be teased apart and manipulated keeps me up at night. That wasn&amp;#8217;t true about my previous work, which, while all the things I mentioned earlier, had become, in all honesty, something of a drudge &amp;#8212; at least big parts of the work.&lt;/p&gt;
&lt;p&gt;So where on Earth did this risk taking come from? I have not historically been a risky person. I tend to take a fairly safe path from one part of life to another, taking comfort in knowing that I can do something, rather than challenging myself with something I think I might fail at.&lt;/p&gt;
&lt;p&gt;All of that changed, however, when I went to live in France for a year. As a teaching assistant, the French government sets you up with a fairly generous stipend for the amount of work expected, and you go live in a French town or city for an academic year. Sounded simple enough, and in hindsight, it seemed not that daunting of a task. But looking at it from the front-end, it was a major challenge. From landing in Lyon and taking a night train to Besancon, and meeting a colleauge I&amp;#8217;d only emailed with and sleeping at their house. Setting up shop in a temporary apartment while looking for rentals. Negotiating a rental contract in a second language and making sure rent was paid on time and getting to my classes prepared. Locking the door on our rental for extended vacations to other corners of France or Europe, and most importantly doing that all with someone you are not related to and coming out stronger on the other end.&lt;/p&gt;
&lt;p&gt;Yeah, our France experience probably had something to do with our boldness to set out and buy a farm in Coastal Maine, not necessarily a hospitable environment for new and working families. Or our decision to start a family a year ago with our first daughter.&lt;/p&gt;
&lt;p&gt;And now the decision, after working for 4 years at a great company where people came first, to set out and find work doing what I love, is both scary and exciting. I&amp;#8217;ve been doing basic software work for many years now, and each year I pick up more new tricks until I find that my code stacks up pretty well against other open source projects. Over the last few years I&amp;#8217;ve even contributed back to a number of projects with not insubstantial contributions.&lt;/p&gt;
&lt;p&gt;All that leads me to believe that while cutting lose is not easy, I&amp;#8217;m also not going for broke. There are jobs I can do to get by, and that I could do if I had to. But for now, I want to focus on doing what I do when I have spare time, but this time for money. Because I can and life is too short to just do something to get by, waiting for an opportunity. You have to make opportunities for yourself.&lt;/p&gt;
&lt;p&gt;&amp;#8212;&lt;/p&gt;
&lt;p&gt;Discuss this post on Twitter with #onec-undelete&lt;/p&gt;
&lt;p&gt;&lt;a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/"&gt;&lt;img alt="Creative 
Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/3.0/us/80x15.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/one-cardinal/~4/K2AWBvw6-RY" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://onecardinal.com/2011/05/22/taking-on-risk.html</feedburner:origLink></entry>
 
 <entry>
   <title>Undelete for Django</title>
   <link href="http://feedproxy.google.com/~r/one-cardinal/~3/mvjwLPSAG_I/django-undelete.html" />
   <updated>2011-04-01T00:00:00+00:00</updated>
   <id>http://onecardinal.com/2011/04/01/django-undelete</id>
   <content type="html">&lt;h1&gt;Undelete for Django&lt;/h1&gt;
&lt;h2&gt;Django&lt;/h2&gt;
&lt;p class="meta"&gt;01 April 2011&lt;/p&gt;
&lt;p&gt;First off, this is not an April Fool&amp;#8217;s joke. Stupid day, requiring a disclaimer. You know in France they just slap paper fish on the backs of their friends and laugh at those who don&amp;#8217;t realize it&amp;#8217;s there; sort of a single-form prank day rather than a practical joke day.&lt;/p&gt;
&lt;p&gt;With that non-sequitor, I present &lt;a href="http://github.com/powellc/django-undelete"&gt;django-undelete&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is a first stab at bringing Simon Willison&amp;#8217;s &lt;a href="http://ltslashgt.com/2007/07/18/undelete-in-django/"&gt;post on the same topic&lt;/a&gt; into the Django 1.3 world. It is also very simple, and probably lacks a lot of the finesse needed for big projects. For example, I already know it only works when you&amp;#8217;re using the delete() method, rather than catching pre_delete signals (version 2 perhaps?).&lt;/p&gt;
&lt;p&gt;Still, it stands a fairly good chance of being useful to some people, and I&amp;#8217;ve already found it nice to know that when a user deletes something via the admin, it&amp;#8217;s not really gone.&lt;/p&gt;
&lt;p&gt;This projects only feature right now is that you get a &amp;#8220;TrashableMixin&amp;#8221; that, if your model inherits from, gives you an invisible &amp;#8220;trashed_at&amp;#8221; datetime field and some managers to make sure you have access to trashed items and that you only see non-trashed items when you do querys.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Caveats&lt;/b&gt;: Because my django-extension-style-du-jour is currently model mixins, there are some issues if you have a whole bunch of mixins that are all competing for managers, be warned. Also, if you need to set your own manager on the &amp;#8220;objects&amp;#8221; hook, make sure you also re-inherit the NonTrashedManager, or else you&amp;#8217;ll be seeind all your model objects, and not just the undeleted ones.&lt;/p&gt;
&lt;p&gt;&amp;#8212;&lt;/p&gt;
&lt;p&gt;Discuss this post on Twitter with #onec-undelete&lt;/p&gt;
&lt;p&gt;&lt;a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/"&gt;&lt;img alt="Creative 
Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/3.0/us/80x15.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/one-cardinal/~4/mvjwLPSAG_I" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://onecardinal.com/2011/04/01/django-undelete.html</feedburner:origLink></entry>
 
 <entry>
   <title>Notes for Django</title>
   <link href="http://feedproxy.google.com/~r/one-cardinal/~3/B3v7CpLMMbg/django-notes.html" />
   <updated>2011-04-01T00:00:00+00:00</updated>
   <id>http://onecardinal.com/2011/04/01/django-notes</id>
   <content type="html">&lt;h1&gt;Notes for Django&lt;/h1&gt;
&lt;h2&gt;Django&lt;/h2&gt;
&lt;p class="meta"&gt;01 April 2011&lt;/p&gt;
&lt;p&gt;My second new Django pluggable in app in half as many days, &lt;a href="http://github.com/powellc/django-notes"&gt;django-notes&lt;/a&gt; is a simple way to adde genericly-related notes to whatever app you&amp;#8217;re working with. Beyond the obviousness of adding a little bit of content (renderable in the markup of your choice), the app also provides for a rudiemntary &amp;#8220;topic&amp;#8221; model so that notes can be organized by topics. Plans also exist to create some template tags to make finding notes on a topic for a particular model easy in the middle of whatever template you&amp;#8217;re usign.&lt;/p&gt;
&lt;p&gt;If you have &lt;a href="http://github.com/alex/django-taggit"&gt;django-taggit&lt;/a&gt; installed, your notes can also be tagged. Because I&amp;#8217;ve heard quite a bit lately about the actual uselessness of tags, you can also enable auto tagging, so that once you have a base set of tags in the system, notes will be combed through upon saving for potential tags.&lt;/p&gt;
&lt;p&gt;Again, this is a painfully simple application, but hopefully it&amp;#8217;s just simple enough to be reusable.&lt;/p&gt;
&lt;p&gt;&amp;#8212;&lt;/p&gt;
&lt;p&gt;Discuss this post on Twitter with #onec-dj-notes&lt;/p&gt;
&lt;p&gt;&lt;a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/"&gt;&lt;img alt="Creative 
Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/3.0/us/80x15.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/one-cardinal/~4/B3v7CpLMMbg" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://onecardinal.com/2011/04/01/django-notes.html</feedburner:origLink></entry>
 
 <entry>
   <title>Deployment</title>
   <link href="http://feedproxy.google.com/~r/one-cardinal/~3/BnvSdmE8w2M/deployment.html" />
   <updated>2010-08-26T00:00:00+00:00</updated>
   <id>http://onecardinal.com/2010/08/26/deployment</id>
   <content type="html">&lt;h1&gt;Deployment&lt;/h1&gt;
&lt;h2&gt;On Tech&lt;/h2&gt;
&lt;p class="meta"&gt;26 August 2010 &amp;#8211; Castine, Maine&lt;/p&gt;
&lt;p&gt;One thing I have discovered over the past month is that successful deployment is the result of having to do it many, many times. I remember a story about how Michael Jordan used to visualize taking jump shots to improve his form because the mere act of thinking about the perfect shot helps your body perform the perfect shot.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve been shuffling servers around for the past week. Part of it is migrating away from Slicehost which, despite still providing a great service, has not managed to keep up with it&amp;#8217;s chief competitors. There are plenty of &lt;a href="http://forum.slicehost.com/comments.php?DiscussionID=4348"&gt;places&lt;/a&gt; to hear about how SH has dropped the ball recently. While they still provide good services in many respects, their price/features ratio just dropped below what I&amp;#8217;m comfortable with.&lt;/p&gt;
&lt;p&gt;Drama of &lt;span class="caps"&gt;VPS&lt;/span&gt; hosts aside, the switch to Linode and away from some of the &lt;a href="http://lowendbox.com"&gt;low-end boxes&lt;/a&gt; I&amp;#8217;ve been using has meant getting really familiar with my various setups. From &lt;a href="http://djangoproject.com"&gt;Django&lt;/a&gt; for most of my client projects, to &lt;a href="http://rubyonrails.org"&gt;Rails&lt;/a&gt; for &lt;a href="http://teambox.com"&gt;Teambox&lt;/a&gt; and good old &lt;span class="caps"&gt;PHP&lt;/span&gt; for &lt;a href="http://roundcube.net"&gt;RoundCube&lt;/a&gt; and &lt;a href="http://pwiki.org"&gt;Pwiki&lt;/a&gt;, there are a lot of moving parts. Thankfully the deployment process seems to be getting less painful.&lt;/p&gt;
&lt;p&gt;My django deployment process has been evolving for a while, and this was the first test of how flexible it is as I had to move four sites to the new &lt;span class="caps"&gt;VPS&lt;/span&gt;. The method worked admirably and I may do a post on it eventually (though in fairness it&amp;#8217;s just cobbled together from a number of other methods people have already put forward).&lt;/p&gt;
&lt;p&gt;The moves have also, and this is the point of this whole post, demonstrated how much smoother things get with frequency. And I am a person who loves smoothness. I know plenty of people who leave a mess behind them whenever they do something, but I like everything neat and tidy. I&amp;#8217;ve finally found ways to setup a &lt;span class="caps"&gt;VPS&lt;/span&gt;, install the needed packages, and deploy whatever service I am hoping to run, be it web app, email, or git hosting.&lt;/p&gt;
&lt;p&gt;Perhaps I&amp;#8217;ll do some posts about the various server setups at some point&amp;#8230;&lt;/p&gt;
&lt;p&gt;&amp;#8212;&lt;/p&gt;
&lt;p&gt;Discuss this post on Twitter with #kapowell-deploy&lt;/p&gt;
&lt;p&gt;&lt;a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/"&gt;&lt;img alt="Creative 
Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/3.0/us/80x15.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/one-cardinal/~4/BnvSdmE8w2M" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://onecardinal.com/2010/08/26/deployment.html</feedburner:origLink></entry>
 
 
</feed>
