<?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>Slack5</title>
	<atom:link href="http://slack5.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://slack5.com/blog</link>
	<description>/* Slack Off //*/</description>
	<lastBuildDate>Tue, 03 Aug 2010 04:41:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Cali Lewis Cleavage</title>
		<link>http://slack5.com/blog/2010/08/02/cali-lewis-cleavage/</link>
		<comments>http://slack5.com/blog/2010/08/02/cali-lewis-cleavage/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 04:41:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Chicks n stuff]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[Cali Lewis]]></category>
		<category><![CDATA[cleavage]]></category>

		<guid isPermaLink="false">http://slack5.com/blog/?p=169</guid>
		<description><![CDATA[In the last few seconds of GeekBeat.tv # 17, Cali Lewis bends over and shows some cleavage. *Video: cali lewis cleavage]]></description>
			<content:encoded><![CDATA[<p>In the last few seconds of GeekBeat.tv # 17, Cali Lewis bends over and shows some cleavage.</p>
<p><script type='text/javascript' src='http://slack5.com/blog/wp-content/plugins/hana-flv-player/flowplayer3/example/flowplayer-3.1.1.min.js'></script>
<div >
<div id='hana_flv_flow3_1' style='display:block;width:400px;height:330px;' title="*Video:cali lewis cleavage"></div>
</div>

			<script  type='text/javascript'>
		flowplayer('hana_flv_flow3_1', { src: 'http://slack5.com/blog/wp-content/plugins/hana-flv-player/flowplayer3/flowplayer-3.1.1.swf', wmode: 'transparent' }, { 
    		clip:  { 
    			url: 'http://slack5.com/blog/wp-content/uploads/2010/08/Cali_Lewis_Cleavage.flv',
        		scaling: 'scale', autoPlay: false, autoBuffering: true 
				,linkUrl: 'http://slack5.com/blog/wp-content/uploads/2010/08/Cali_Lewis_Cleavage.flv' ,linkWindow: '_blank' , onBeforeFinish : function() { this.play(0);  return false; }  
	        }
		}); 
			</script></p>
<p><a href="http://slack5.com/blog/wp-content/uploads/2010/08/Cali_Lewis_Cleavage.png"><img class="alignnone size-full wp-image-178" title="Cali_Lewis_Cleavage" src="http://slack5.com/blog/wp-content/uploads/2010/08/Cali_Lewis_Cleavage.png" alt="" width="244" height="279" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://slack5.com/blog/2010/08/02/cali-lewis-cleavage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://slack5.com/blog/wp-content/uploads/2010/08/Cali_Lewis_Cleavage.flv" length="120741" type="video/x-flv" />
		</item>
		<item>
		<title>FCEeditor with Zend Framework</title>
		<link>http://slack5.com/blog/2009/02/08/fceeditor-with-zend-framework/</link>
		<comments>http://slack5.com/blog/2009/02/08/fceeditor-with-zend-framework/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 01:43:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[fckeditor]]></category>
		<category><![CDATA[zend]]></category>
		<category><![CDATA[Zend Helper]]></category>

		<guid isPermaLink="false">http://slack5.com/blog/?p=162</guid>
		<description><![CDATA[My current project I&#8217;m building with the Zend Framework and I needed to be able to use the fckeditor. Integration is extremely easy using a helper with the framework.Here is the helper that I am currently using. &#60;?php require_once(str_replace('admin_application', 'admin', APPLICATION_DIRECTORY).'/js/fckeditor/fckeditor.php'); class Zend_View_Helper_Rte { function rte($name, $value = null, $attr = array()) { $baseUrl = [...]]]></description>
			<content:encoded><![CDATA[<p>My current project I&#8217;m building with the Zend Framework and I needed to be able to use the fckeditor.</p>
<p>Integration is extremely easy using a helper with the framework.<span id="more-162"></span>Here is the helper that I am currently using.</p>
<pre>&lt;?php
require_once(str_replace('admin_application', 'admin', APPLICATION_DIRECTORY).'/js/fckeditor/fckeditor.php');

class Zend_View_Helper_Rte
{
  function rte($name, $value = null, $attr = array())
  {
    $baseUrl = str_replace('/index.php', '', Zend_Controller_Front::getInstance()-&gt;getBaseUrl());
    $headLink = new Zend_View_Helper_HeadLink();
    // include js &amp; css for rte
    $headScript = new Zend_View_Helper_HeadScript();
    $headScript-&gt;headScript()-&gt;appendFile($baseUrl.'/js/fckeditor/fckeditor.js');

    $oFCKeditor = new FCKeditor($name) ;
    $oFCKeditor-&gt;BasePath = $baseUrl.'/js/fckeditor/';
    $oFCKeditor-&gt;Config['SkinPath'] = $oFCKeditor-&gt;BasePath."editor/skins/office2003/";
    $oFCKeditor-&gt;Height = '400';  // default height
    if (key_exists('height', $attr)) {
      $oFCKeditor-&gt;Height = $attr['height'];
    }

    $oFCKeditor-&gt;Value = $value;

    return $oFCKeditor-&gt;Create();
  }
}</pre>
<p>As this is being used in the application directory, I needed to replace the value in APPLICATION_DIRECTORY with my public direcotry so that my webpages know that path to the fckeditor files.</p>
<p>The file is saved as Rte.php in my helpers folder.</p>
<p>Now to use the editor, all I have todo is call the helper function providing the input name to use, and default value like:</p>
<pre>&lt;?php $this-&gt;rte('description', 'my default value'); ?&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://slack5.com/blog/2009/02/08/fceeditor-with-zend-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Php Taco &#8211; WTF!!</title>
		<link>http://slack5.com/blog/2009/01/20/php-taco-wtf/</link>
		<comments>http://slack5.com/blog/2009/01/20/php-taco-wtf/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 03:32:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Rants]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://slack5.com/blog/?p=152</guid>
		<description><![CDATA[I was searching around the net for information on Zend Framework and phpDoctrine and came across Php Taco. At first glance, I was pretty excited to see how it was setup (Zend Framework, phpDoctrine, Modular layout, etc) as this is basically how I have my zf projects setup. (From Php Taco&#8217;s site) Libraries PHP Taco [...]]]></description>
			<content:encoded><![CDATA[<p>I was searching around the net for information on Zend Framework and phpDoctrine and came across <a href="http://www.orsa-studio.com/phptaco/" target="_blank">Php Taco</a>.</p>
<p>At first glance, I was pretty excited to see how it was setup (Zend Framework, phpDoctrine, Modular layout, etc) as this is basically how I have my zf projects setup.<span id="more-152"></span></p>
<p>(From Php Taco&#8217;s site)</p>
<pre>
<h2>Libraries</h2>

PHP Taco consists¬†of¬†the following PHP libraries.

a)¬†¬†<a onclick="javascript:pageTracker._trackPageview('/outbound/article/www.phpdoctrine.org');" href="http://www.phpdoctrine.org/">Doctrine ORM</a> for access¬†to the database

b) <a onclick="javascript:pageTracker._trackPageview('/outbound/article/phptal.motion-twin.com');" href="http://phptal.motion-twin.com/">PHPTAL</a> for View Templates

c) <a onclick="javascript:pageTracker._trackPageview('/outbound/article/php-ids.org');" href="http://php-ids.org/">PHPIDS</a> to detect hacking attempts on the PHP website

d) <a onclick="javascript:pageTracker._trackPageview('/outbound/article/recaptcha.net');" href="http://recaptcha.net/">Recaptcha</a> to prevent spam

e) <a onclick="javascript:pageTracker._trackPageview('/outbound/article/code.google.com');" href="http://code.google.com/p/blueprintcss/">Blueprint CSS</a> framework

f) <a onclick="javascript:pageTracker._trackPageview('/outbound/article/jquery.com');" href="http://jquery.com/">JQuery</a> AJAX framework

g) An initial database setup

h) DOT Language</pre>
<p>Now let me cover my thoughts on what&#8217;s included/setup.</p>
<ul>
<li>Doctrine &#8211; Great, I use this in my current setup.</li>
<li>PHPTAL &#8211; Personally I&#8217;ve never used it, I&#8217;m not big on adding a template engine as it is simply something else to be processed and parsed.</li>
<li>PHPIDS &#8211; Never used it, but as it&#8217;s for detecting hacking attempts I&#8217;m all for it (and will check it out)</li>
<li>Recaptcha &#8211; Simply it&#8217;s a service you have to suscribe to, It might be great, but if their service goes down then my site&#8217;s broken. I&#8217;ll stick to something running on my server.</li>
<li>Blueprint Css Framework &#8211; I&#8217;ve not had the time to site and learn Blueprint, but do plan on using a css framework in the future.</li>
<li>jQuery &#8211; Simply awsome.</li>
<li>DOT Language &#8211; what the fucking hell is this SHIT!!!</li>
</ul>
<pre>$this-&gt;view-&gt;x</pre>
<p>becomes</p>
<pre>_x</pre>
<p>or</p>
<pre>@x</pre>
<p>and</p>
<pre>strtolower("This is a string");</pre>
<p>becomes</p>
<pre>@x=string lowercase("This is a string")</pre>
<p>The excuse for the DOT Language is</p>
<blockquote><p>The problem is that often PHP functions are not easy to remember what they do. I mean, do you know what reset() or explode() or krsort() do? I have too much trouble remembering new API’s and functions</p></blockquote>
<p>So, instead of learning new functions, you create your own!!! &#8220;Do you know what reset() or explode() or krsort() do?&#8221; &#8211; Huh&#8230; YES!! If you&#8217;re going to be a programmer, learn the fucking language!! &#8220;string lowercase&#8221; might be easier for <strong>YOU</strong> to remember, but it involves more typing that strtolower, not to mention if I were to work on something that was coded with this BS, I would give it back to you and tell you to fix the shit first.</p>
<p>Take this scenerio for example, take somebody 100% new to php and say they learn this framework and become very good working with it. Now say that person gets a job as a php developer. This same peson will be <strong>FIRED</strong> on the first day for not knowing implode/explode/ksort etc all because of this DOT bullshit!! OR say this person descides they want to become php certified &#8211; now they have to unlearn all these aliases that they learned php with.</p>
<p>There&#8217;s a bit more with Php Taco&#8217;s setup I don&#8217;t like, some more things like the DOT Language, others are simply personal preference (so I really cannot complain about those).</p>
]]></content:encoded>
			<wfw:commentRss>http://slack5.com/blog/2009/01/20/php-taco-wtf/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What do you consider cheating?</title>
		<link>http://slack5.com/blog/2008/12/29/what-do-you-consider-cheating/</link>
		<comments>http://slack5.com/blog/2008/12/29/what-do-you-consider-cheating/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 04:02:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://slack5.com/blog/?p=144</guid>
		<description><![CDATA[As we all believe, men and women have different opinions when compared to the opposite sex, so lets put it to the test Let me start off by saying that I never have cheated on my wife (or anybody I dated before I was married). This is just a curiosity check into the male and [...]]]></description>
			<content:encoded><![CDATA[<p>As we all believe, men and women have different opinions when compared to the opposite sex, so lets put it to the test <img src='http://slack5.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> <span id="more-144"></span></p>
<p>Let me start off by saying that I never have cheated on my wife (or anybody I dated before I was married). This is just a curiosity check into the male and female mind.</p>
<p>Please take the poll that applies to your sex.</p>
Note: There is a poll embedded within this post, please visit the site to participate in this post's poll.
Note: There is a poll embedded within this post, please visit the site to participate in this post's poll.
]]></content:encoded>
			<wfw:commentRss>http://slack5.com/blog/2008/12/29/what-do-you-consider-cheating/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TinyMCE &#8211; Add to Dictionary</title>
		<link>http://slack5.com/blog/2008/12/29/tinymce-add-to-dictionary/</link>
		<comments>http://slack5.com/blog/2008/12/29/tinymce-add-to-dictionary/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 03:23:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://slack5.com/blog/?p=135</guid>
		<description><![CDATA[This post is how to save a personal word list to TinyMCE&#8217;s spellcheck, or Add to Dictionary as I prefer to refer to it as. As you might know, TinyMCE is capable of spellchecking, but what if we want to add a word to the dictionary so that the word never comes up again as [...]]]></description>
			<content:encoded><![CDATA[<p>This post is how to save a personal word list to TinyMCE&#8217;s spellcheck, or Add to Dictionary as I prefer to refer to it as.</p>
<p>As you might know, TinyMCE is capable of spellchecking, but what if we want to add a word to the dictionary so that the word never comes up again as a typo? After spending some time with Google, I never found a solution to my liking, so I had the unpleasurable task of adding the functionality myself. To my surprises, it was much easier that I expected.<span id="more-135"></span></p>
<p>Note: I am assuming that you already have TinyMCE and the spellchecker plugin installed along with PSell/ASpell. If not, <a title="TinyMCE spellcheck plugin" href="http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker#Installation_Instructions" target="_blank">here&#8217;s the wiki page.</a></p>
<p>Here&#8217;s how I did it.</p>
<p>First, the spellchecker plugin has to be configured for PSpell in config.php</p>
<pre>//$config['general.engine'] = 'GoogleSpell';
$config['general.engine'] = 'PSpell';</pre>
<p>Now, in the langs/en.js file I had to add what text would display in the suggested words to add the given word to the dictionary.</p>
<p>I added</p>
<pre>add_dictionary:"Add to Dictionary",</pre>
<p>to the file.</p>
<p>Next I renamed editor_plugin_src.js to editor_plugin.js and added</p>
<pre>m.add({
  title : 'spellchecker.add_dictionary',
  onclick : function() {
    t._sendRPC('addToDictionary', [t.selectedLang, e.target.innerHTML],
      function(r) {
        dom.remove(e.target, 1);
        t._checkDone();
      });
  }
});</pre>
<p>I placed this inside the _showMenu function, after</p>
<pre>m.add({
  title : 'spellchecker.ignore_words',
  onclick : function() {
    t._removeWords(dom.decode(e.target.innerHTML));
    t._checkDone();
  }
});</pre>
<p>This adds our &#8216;Add to Dictionary&#8217; option in our options that display when we click on a misspelled word and calls our addToDictionary function when selected.</p>
<p>Now we need to modify PSpell.php (inside the classes directory).</p>
<p>First we have to update the the _getPLink function.</p>
<p>Change</p>
<pre>$plink = pspell_new(
	$lang,
	$this-&gt;_config['PSpell.spelling'],
	$this-&gt;_config['PSpell.jargon'],
	$this-&gt;_config['PSpell.encoding'],
	$this-&gt;_config['PSpell.mode']
);</pre>
<p>to this</p>
<pre>$pspell_config = pspell_config_create (
	$lang,
	$this-&gt;_config['PSpell.spelling'],
	$this-&gt;_config['PSpell.jargon'],
	$this-&gt;_config['PSpell.encoding']
	);

pspell_config_personal ($pspell_config, realpath('.')."/custom_dictionary.pws");
$plink = pspell_new_config ($pspell_config);</pre>
<p>This tells the spellchecker to create a personal dictionary and to use the custom_dictionary.pws. custom_dictionary.pws is the file that will hold all of the words we add to the dictionary. realpath(&#8216;.&#8217;) will save this file inside our spellchecker plugin folder. You need to make sure that the web server has write permissions to this directory as well.</p>
<p>Now we&#8217;ll create our addToDictionary function, this is what will save our word to custom_dictionary.pws.</p>
<pre>function &amp;addToDictionary($lang, $word) {
  $plink = $this-&gt;_getPLink($lang);
  pspell_add_to_personal ($plink, $word);
  pspell_save_wordlist ($plink);

  return 'true';
}</pre>
<p>I am simply returning &#8216;true&#8217; as the function call expects a value returned.</p>
]]></content:encoded>
			<wfw:commentRss>http://slack5.com/blog/2008/12/29/tinymce-add-to-dictionary/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Django Bookmark Script</title>
		<link>http://slack5.com/blog/2008/12/24/django-bookmark-script/</link>
		<comments>http://slack5.com/blog/2008/12/24/django-bookmark-script/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 06:26:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Django]]></category>

		<guid isPermaLink="false">http://slack5.com/blog/?p=58</guid>
		<description><![CDATA[I recently talked about my first impression of Django after walking through the tutorial. This is my example showing how to create a simple bookmark script.]]></description>
			<content:encoded><![CDATA[<p>Hello, I recently posted on my <a title="Django - First Impression" href="http://slack5.com/blog/2008/12/django-first-impression/" target="_self">first impression on Django</a>.</p>
<p>Generally, my first script for trying out anything new is a bookmark script because it can be as simple or complex as you want.</p>
<p>Before starting, this post assumes you have a working install of Django. I would strongly suggest looking over the tutorial <a title="Django tutorial" href="http://docs.djangoproject.com/en/dev/intro/tutorial01/#intro-tutorial01" target="_blank">here</a> for a more in depth explanation as to what everything is doing. This post is only a mile high overview and is to simply show some of process of creating a project along with the (minimal) amount of code it takes.</p>
<p><span id="more-58"></span></p>
<p>Here&#8217;s the first part.</p>
<p>First lets setup a new project using the terminal. I&#8217;ll call this project &#8220;simplebookmark&#8221;.</p>
<p>My projects are created in /var/www/html so if this is different than yours, adjust your path accordingly</p>
<pre>cd /var/www/html/
django-admin.py startproject simplebookmark</pre>
<p>Now you should have a directory called simplebookmark and inside simplebookmark you should have the following files.</p>
<pre>    __init__.py
    manage.py
    settings.py
    urls.py</pre>
<p>We&#8217;re going to add a bookmark application to our simplebookmarks proejct. Inside the simplebookark directory run</p>
<pre>python manage.py startapp bookmark</pre>
<p>Now our structure has:</p>
<pre>bookmark/
    __init__.py
    models.py
    views.py</pre>
<p>Now we&#8217;re going to need some tables setup. Our models file contains our table structure for the bookmark application. We&#8217;re going to need a table for categories and bookmarks. The bookmarks table will have a foreign key to the categories table.</p>
<p>Open models.py in your editor and add:</p>
<pre>from django.db import models

class Categories(models.Model):
  name = models.CharField(max_length=200)
  pub_date = models.DateTimeField('date published')

  def __unicode__(self):
    return self.name

class Bookmarks(models.Model):
  category = models.ForeignKey(Categories)
  name = models.CharField(max_length=200)
  url = models.CharField(max_length=255)
  notes = models.TextField()
  pub_date = models.DateTimeField('date published')

  def __unicode__(self):
    return self.name</pre>
<p>Now that we have our models setup, we have to configure our project to use the bookmarks app.</p>
<p>Open your project&#8217;s &#8216;settings.py&#8217; file and enter your database settings (you will also need to create your database if you have not already done so).</p>
<pre>DATABASE_ENGINE = 'mysql'
DATABASE_NAME = 'simplebookmark'
DATABASE_USER = 'username'
DATABASE_PASSWORD = 'password'</pre>
<p>Scroll to the INSTALLED_APPS section and add &#8216;simplebookmark.bookmark&#8217; and &#8216;django.contrib.admin&#8217; (django.contrib.admin tells django to autocreate the admin area)</p>
<pre>INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'simplebookmark.bookmark',
    'django.contrib.admin',
)</pre>
<p>Alright, now we&#8217;re ready to generate some tables. In your terminal run</p>
<pre>python manage.py sql bookmark</pre>
<p>You should now see</p>
<pre>BEGIN;
CREATE TABLE `bookmark_categories` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `name` varchar(200) NOT NULL,
    `pub_date` datetime NOT NULL
)
;
CREATE TABLE `bookmark_bookmarks` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `category_id` integer NOT NULL,
    `name` varchar(200) NOT NULL,
    `url` varchar(255) NOT NULL,
    `notes` longtext NOT NULL,
    `pub_date` datetime NOT NULL
)
;
ALTER TABLE `bookmark_bookmarks` ADD CONSTRAINT category_id_refs_id_6dc05859 FOREIGN KEY (`category_id`) REFERENCES `bookmark_categories` (`id`);
COMMIT;</pre>
<p>Now lets create the tables</p>
<pre>python manage.py syncdb</pre>
<p>As this is the first time you&#8217;ve synced, you will be asked to create a superuser, simply fill in the details with any criteria you want (remember the username and password you specify).</p>
<p>If that completed successfully, you can now check out all the tables generated (using PhpMyAdmin), you can see that we now have 13 tables, including one for our categories and bookmarks.</p>
<p><img class="alignnone size-medium wp-image-79" title="phpmyadmin" src="http://slack5.com/blog/wp-content/uploads/2008/12/phpmyadmin-152x300.jpg" alt="phpmyadmin" width="152" height="300" /></p>
<p>Before we can checkout the admin area, we have to update our urls.py file.</p>
<p>Open urls.py and uncomment the following lines.</p>
<pre>from django.contrib import admin
 admin.autodiscover()</pre>
<p>and</p>
<pre> (r'^admin/(.*)', admin.site.root),</pre>
<p>Now lets fire up the dev server and checkout our progress!!<br />
Run</p>
<pre>python manage.py runserver</pre>
<p>The default port the dev server runs on is 8000, so open you web browser and goto http://127.0.0.1:8000/admin/<br />
If everything is working correctly, you should see the login screen</p>
<div id="attachment_76" class="wp-caption alignnone" style="width: 350px"><img class="size-full wp-image-76" title="admin_login" src="http://slack5.com/blog/wp-content/uploads/2008/12/admin_login.jpg" alt="Django Admin Login" width="340" height="211" /><p class="wp-caption-text">Django Admin Login</p></div>
<p>Remember the username and password you entered when we ran the syncdb? Enter that now.</p>
<p>You should now see<img class="alignnone size-full wp-image-77" title="admin area" src="http://slack5.com/blog/wp-content/uploads/2008/12/admin_page1.jpg" alt="admin area" width="761" height="201" /></p>
<p>Wait a minute, where&#8217;s the categories and bookmarks!! Simple, we have to tell django that the categories and bookmarks objects have an admin interface. To do this we have to create the admin.py file inside the bookmark directory and add</p>
<pre>from simplebookmark.bookmark.models import Categories, Bookmarks
from django.contrib import admin

class BookmarksAdmin(admin.ModelAdmin):
  fields = ['category', 'name', 'url', 'notes', 'pub_date']

class CategoriesAdmin(admin.ModelAdmin):
  fields = ['name', 'pub_date']

admin.site.register(Bookmarks, BookmarksAdmin)
admin.site.register(Categories, CategoriesAdmin)</pre>
<p>Save the file and refresh the page.<br />
You should now have</p>
<p><img class="alignnone size-full wp-image-111" title="admin_bookmarks_categories" src="http://slack5.com/blog/wp-content/uploads/2008/12/admin_bookmarks_categories.jpg" alt="admin_bookmarks_categories" width="505" height="222" /></p>
<p>Great, but lets fix the &#8220;Bookmakrss&#8221; and &#8220;Categoriess&#8221;</p>
<p>To do this, we need to import &#8216;ugettext_lazy&#8217;. At the top of models.py add:</p>
<pre>from django.utils.translation import ugettext_lazy as _</pre>
<p>and for each class we need to define our verbose_names</p>
<pre>  class Meta:
    verbose_name = _('Category')
    verbose_name_plural = _('Categories')</pre>
<p>and</p>
<pre>  class Meta:
    verbose_name = _('Bookmark')
    verbose_name_plural = _('Bookmarks')</pre>
<p>Save and refresh the page and you should now have &#8220;Bookmarks&#8221; and &#8220;Categories&#8221;.</p>
<p>Now, lets create our first category. Click the &#8220;Add&#8221; button next to categories.<img class="alignnone size-full wp-image-120" title="add_category11" src="http://slack5.com/blog/wp-content/uploads/2008/12/add_category11.jpg" alt="add_category11" width="737" height="197" /></p>
<p>As you can see, we have a place to enter the category name, along with our date and time (including a nice popup calendar). Lets go ahead and create our first category.<img class="alignnone size-full wp-image-124" title="category_created1" src="http://slack5.com/blog/wp-content/uploads/2008/12/category_created1.jpg" alt="category_created1" width="745" height="180" /></p>
<p>Now lets checkout the bookmarks section.</p>
<p><img class="alignnone size-full wp-image-119" title="add_bookmark1" src="http://slack5.com/blog/wp-content/uploads/2008/12/add_bookmark1.jpg" alt="add_bookmark1" width="819" height="539" /></p>
<p>As you can see, we have a typical form for adding our bookmarks, along with a nice drop box for selecting which category to assign the bookmark to. Also, notice the plus next to the dropbox. This is so that we can create a new category with out haveing to leave the page to add a category.</p>
<p>This is the very basics of Django. I have only been playing around with  this wonderful framework a few days and there is so much more I could talk about (setting the Date Published to the current timestamp, adding multiple records at one time, filters, views, templates, etc, etc). I&#8217;ll have that for a later post.</p>
]]></content:encoded>
			<wfw:commentRss>http://slack5.com/blog/2008/12/24/django-bookmark-script/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How to keep your man.</title>
		<link>http://slack5.com/blog/2008/12/23/how-to-keep-your-man/</link>
		<comments>http://slack5.com/blog/2008/12/23/how-to-keep-your-man/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 06:18:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://slack5.com/blog/?p=93</guid>
		<description><![CDATA[The other day, my wife and I were discussing a friend of ours. She is seeing a guy who is, to put it bluntly, a dead beat. She is now starting to get tired of dealing with him, but is simply afraid of being alone, unable to find a guy. Now this is what sparked [...]]]></description>
			<content:encoded><![CDATA[<p>The other day, my wife and I were discussing a friend of ours.<br />
She is seeing a guy who is, to put it bluntly, a dead beat.<br />
She is now starting to get tired of dealing with him, but is simply afraid of being alone, unable to find a guy.</p>
<p>Now this is what sparked this posting. I (like most guys) simply do not understand women.<br />
I pointed out to my wife, that men are very quite simple. As men go, we are quite primal in nature. All a woman has todo remember three simple things.<span id="more-93"></span></p>
<p>Now, before getting to these three things I, want to give a small bit of background on myself so nobody gets (a completely) wrong impression. I am happily married and have been for 8 years now. We have three children together (2, 4, and 8 years in age). I get along great with my wife (not saying we don&#8217;t have a disagreement from time to time). So, I feel that have a very good relationship with my wife.</p>
<p><strong>To the point:</strong><br />
Ok ladies, to sum up my three things to keep a man happy &#8211; <strong>make it about us!</strong></p>
<ul>
<li>Feed Me</li>
<li>Love Me</li>
<li>Fuck Me</li>
</ul>
<p><strong>Feed Me</strong> &#8211; I enjoy a home cooked meal. I&#8217;m not saying I need a fat juicy steak every night. I am quite happy with anything, hamburger mac &amp; cheese or sloppy joe&#8217;s upto a full blown meal with the works. Simply put, home made is always better than some fast food joint. It shows us guys that you care enough about us to spend abit of time preparing something for us to enjoy together. I eat dinner with my wife because I know she worked hard on the meal she&#8217;s prepared. We spend this time to talk about each other&#8217;s day and BS. I always compliment my wife on her cooking (her mother taught her well). Tell me, when was the last time you were complemented for picking up a Big Mac??</p>
<p><strong>Love Me</strong> &#8211; To put it simple, act like you care about us. Nobody wants to get their balls ripped off when they walk in the door after a long day of work. Everybody makes a mistake from time to time, yelling and screaming at us is not going to do any good!! If all you can do is yell at us, we&#8217;re simply not going to pay any attention because we&#8217;re busy thinking about payback. Instead, talk to us like a person. Simply point out our mistake like &#8220;Honey, you forgot to take out the trash today&#8221; and leave it at that. If that&#8217;s all you say, you&#8217;re more likely to get a good reaction and we&#8217;ll try harder to do better. My point is, if you treat us kindly, we&#8217;ll treat you the way you want to be treated and when we goto work and hear our buddies talking their bitchy wife we&#8217;ll sit back and think about how good we have it. We remember this feelings out of the blue, this is where those surprises and random &#8220;I love you&#8221;s come from.</p>
<p><strong>Fuck Me</strong> &#8211; Ok girls, you know how you simply get that unexplainable urge to have chocolate from time to time? Guess what, you&#8217;re our chocolate bunny!! We can&#8217;t explain it, it just hits and we&#8217;ve got to have you! We have to nibble on your ears, lick your neck and rub our hands all over your body. Lets us kiss you deeply and passionatly then slowly work our way up to your belly button. My wife does not understand how she can be cleaning house, doing laundry, brushing her teeth or simply be doing nothing and I&#8217;m ready to take her. Remember ladies, unless we&#8217;re completely occupied doing whatever it is we do (our hobbies, or work), we&#8217;re thinking about sex!! There&#8217;s no such think as a &#8220;clean&#8221; conversation in our mind, if it can be twisted to perversion, it will be. If you want to keep your man happy you have to give it up.</p>
<p>I&#8217;m not saying put out every hour on the hour (though you wont get any complaints), but I am saying it is one of our basic needs. Hell, we don&#8217;t even have to be in &#8220;the mood&#8221; &#8211; we&#8217;ll take it. So, even if you&#8217;re not in the mood showing us &#8220;the love&#8221; shows you care (even if it&#8217;s to get us to shut up). Think about the number of things we do that we really don&#8217;t want to.</p>
<p>If you want us to be happy all day, there&#8217;s simply nothing better than waking up getting some action (a BJ is even better). Think about it for a sec. We&#8217;ll goto work with the biggest cheeseball grin on our face. When something shitty happens at work that would normally upset us &#8211; it&#8217;s not that bad, all thanks to you!!</p>
<p>Now, we have three kids, I know the whole morning thing is not easy to pull off, but there&#8217;s good news for you ladies. Guys are visual creatures, showing us some skin will give us a grin, shake your titties at us while heading to the shower, bend over that way we like while your getting dressed or rub yourself between your legs or body &#8211; all these things will have us thinking about you ALL DAY LONG!!</p>
<p><strong>To sum things up</strong>:</p>
<p>Ladies &#8211; any man (worth keeping anyway) will meet you half way. If you treat us nice, we&#8217;ll treat you nice. If you&#8217;re nasty, we&#8217;ll be nasty. A man <strong>DOES</strong> think about sex in one form or another 95% of the time. If you don&#8217;t think so, he&#8217;s gay or you simply do not know him well enough. If you&#8217;re with a man you want to keep, follow these three steps. We&#8217;re like a big dumb dog, all we need is food, love and that special attention. In return you&#8217;ll have our lasting love and obedience. If on the other hand you come home, throw a bag of takeout at us and start yelling and screaming&#8230; well, we can get #3 anywhere!</p>
]]></content:encoded>
			<wfw:commentRss>http://slack5.com/blog/2008/12/23/how-to-keep-your-man/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Dirty Dirty PC</title>
		<link>http://slack5.com/blog/2008/12/21/dirty-dirty-pc/</link>
		<comments>http://slack5.com/blog/2008/12/21/dirty-dirty-pc/#comments</comments>
		<pubDate>Mon, 22 Dec 2008 03:05:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[computer work]]></category>
		<category><![CDATA[dirty computer]]></category>

		<guid isPermaLink="false">http://slack5.com/blog/?p=45</guid>
		<description><![CDATA[I was recently working on somebody&#8217;s computer &#8211; WOW!! This posting is simply to show how much the environment a computer is in effects everything. About a year ago, I setup a fileserver for a friend using an old computer they had laying around (old, old duron). About a month ago I get the computer [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently working on somebody&#8217;s computer &#8211; WOW!!</p>
<p>This posting is simply to show how much the environment a computer is in effects everything.</p>
<p>About a year ago, I setup a fileserver for a friend using an old computer they had laying around (old, old duron). About a month ago I get the computer back because it stopped working. The system simply would not boot successfully (perhaps once out of every 10 tries).</p>
<p><span id="more-45"></span></p>
<p>The photos are of a computer that is in a &#8216;garage&#8217; slash office, in the country next to an open field.</p>

<a href='http://slack5.com/blog/2008/12/21/dirty-dirty-pc/dsc00512/' title='dsc00512'><img width="150" height="150" src="http://slack5.com/blog/wp-content/uploads/2008/12/dsc00512-150x150.jpg" class="attachment-thumbnail" alt="dsc00512" title="dsc00512" /></a>
<a href='http://slack5.com/blog/2008/12/21/dirty-dirty-pc/dsc00513/' title='dsc00513'><img width="150" height="150" src="http://slack5.com/blog/wp-content/uploads/2008/12/dsc00513-150x150.jpg" class="attachment-thumbnail" alt="dsc00513" title="dsc00513" /></a>
<a href='http://slack5.com/blog/2008/12/21/dirty-dirty-pc/dsc00514/' title='dsc00514'><img width="150" height="150" src="http://slack5.com/blog/wp-content/uploads/2008/12/dsc00514-150x150.jpg" class="attachment-thumbnail" alt="dsc00514" title="dsc00514" /></a>
<a href='http://slack5.com/blog/2008/12/21/dirty-dirty-pc/dsc00515/' title='dsc00515'><img width="150" height="150" src="http://slack5.com/blog/wp-content/uploads/2008/12/dsc00515-150x150.jpg" class="attachment-thumbnail" alt="dsc00515" title="dsc00515" /></a>
<a href='http://slack5.com/blog/2008/12/21/dirty-dirty-pc/dsc00516/' title='dsc00516'><img width="150" height="150" src="http://slack5.com/blog/wp-content/uploads/2008/12/dsc00516-150x150.jpg" class="attachment-thumbnail" alt="The floor WAS clean!" title="dsc00516" /></a>
<a href='http://slack5.com/blog/2008/12/21/dirty-dirty-pc/dsc00517/' title='dsc00517'><img width="150" height="150" src="http://slack5.com/blog/wp-content/uploads/2008/12/dsc00517-150x150.jpg" class="attachment-thumbnail" alt="dsc00517" title="dsc00517" /></a>
<a href='http://slack5.com/blog/2008/12/21/dirty-dirty-pc/dsc00518/' title='dsc00518'><img width="150" height="150" src="http://slack5.com/blog/wp-content/uploads/2008/12/dsc00518-150x150.jpg" class="attachment-thumbnail" alt="dsc00518" title="dsc00518" /></a>
<a href='http://slack5.com/blog/2008/12/21/dirty-dirty-pc/dsc00519/' title='dsc00519'><img width="150" height="150" src="http://slack5.com/blog/wp-content/uploads/2008/12/dsc00519-150x150.jpg" class="attachment-thumbnail" alt="dsc00519" title="dsc00519" /></a>
<a href='http://slack5.com/blog/2008/12/21/dirty-dirty-pc/dsc00520/' title='dsc00520'><img width="150" height="150" src="http://slack5.com/blog/wp-content/uploads/2008/12/dsc00520-150x150.jpg" class="attachment-thumbnail" alt="dsc00520" title="dsc00520" /></a>

]]></content:encoded>
			<wfw:commentRss>http://slack5.com/blog/2008/12/21/dirty-dirty-pc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django &#8211; First Impression</title>
		<link>http://slack5.com/blog/2008/12/15/django-first-impression/</link>
		<comments>http://slack5.com/blog/2008/12/15/django-first-impression/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 04:51:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[framework]]></category>

		<guid isPermaLink="false">http://slack5.com/blog/?p=38</guid>
		<description><![CDATA[I spent this weekend checking out Django. I have been wanting something for personal projects for rapid development. I am a strong believer in using whatever works best for the task at hand. First, a little background: We use Symfony where I work. While symfony is great, it is very resource intensive (we run a [...]]]></description>
			<content:encoded><![CDATA[<p>I spent this weekend checking out <a title="Django" href="http://www.djangoproject.com/" target="_blank">Django</a>.</p>
<p>I have been wanting something for personal projects for rapid development.</p>
<p>I am a strong believer in using whatever works best for the task at hand.</p>
<p><strong>First, a little background:</strong></p>
<p>We use <a title="Symfony Project" href="http://www.symfony-project.com/" target="_blank">Symfony</a> where I work. While symfony is great, it is very resource intensive (we run a few dozen ecommerce sites with a database holding around 200 tables storing many gig of data) &#8211; so, in reality symfony really does fit the project. The downside is everything is running on multiple, mulitcore servers sitting on 8 to 16 Gig of memory.</p>
<p>While I cannot justify a beefy server setup for my own (or a clients) project, I do enjoy the benefits of using a framework.</p>
<p>I have been developing with the <a title="Zend Framework" href="http://framework.zend.com/" target="_blank">Zend Framework</a> for outside projects and really do like the features available, but the biggest thing Zend is missing is a <a href="http://en.wikipedia.org/wiki/Create,_read,_update_and_delete" target="_blank">crud</a> generator (I have even started building my own).</p>
<p>In my latest search to see what was out there, I came across a post comparing Symfony, RoR, and Django <a title="Framework Performance" href="http://wiki.rubyonrails.com/rails/pages/Framework+Performance" target="_blank">here</a>. Like any opinion, it must be read with a grain of salt. I can however relate to the performance mentioned regarding the symfony framework. From past readings I was not very interested in RoR, so that left Django (which from the poster had the best performance).<span id="more-38"></span></p>
<p><strong>Checking it out:</strong></p>
<p>I did a quick scan over Django&#8217;s website, and feature list. Next I read the <a title="Install Django" href="http://docs.djangoproject.com/en/dev/intro/install/" target="_blank">installation guide</a> and the first page on the <a title="Django tutorial" href="http://docs.djangoproject.com/en/dev/intro/tutorial01/" target="_blank">tutorial</a>. Normally I can get a decent impression from simply ready a tutorial, but Django was not quite that way&#8230; But I got a good vibe from the feature list and the opinions for other bloggers, so I decided to take an existing vmware install and setup Django.</p>
<p>Django is a python framework, python is already included with many linux distro&#8217;s, so nothing to install for that. For Django it&#8217;s 3 simple steps:</p>
<ul>
<li>download Django.</li>
<li>untar the downloadable file.</li>
<li>run the install script.</li>
</ul>
<p>That&#8217;s it!</p>
<p>For the first half of the tutorial, most of the work is done in the terminal &#8211; creating the project, setting up the database tables, modules, etc (alot like symfony).</p>
<p>Django also has an interactive python shell that integrates with Django&#8217;s API (nice for basic queries and such).</p>
<p>The majority of the tutorial is an intro to the *.py files that contain the framework&#8217;s settings (such as enabling the admin area). I&#8217;ll openly have to say that the admin pages generated are ALOT prettier than symfony&#8217;s default (at work we have customized the admin area &#8211; thank god) and offer more features and flexibility out of the box than symfony.</p>
<p>Most of the config settings are for what is included in the project and how it&#8217;s displayed (what fields, if they&#8217;re inside a collapsible div, setting filters and the like).</p>
<p>For example, the tutorial is setting up a Poll with choices. In the section where you add new choices you have a drop down box for which Poll to assign the choice to, Django has a setting so that next to the drop down box, you have an &#8216;add new&#8217; icon for creating a new poll (which opens in a pop up window), you can also specify how many &#8216;new fields&#8217; are available (say on the create new choice page, you want to have 3 fields for new entries) &#8211; all this is powered by settings in one file!</p>
<p><strong>The file structure layout is very simple and modular.</strong></p>
<p>You have a basic settings.py file, this is where you set your database settings, template dir, and included modules. There is also a urls.py file that basically handles url routing.</p>
<p>In the modules directory (in the example Polls directory), you have an admin.py which tells the admin area how to handle the generated pages for managing the module (display, filters, etc). Next is the models.py which works with the database fields, views.py that deals with the views, and you can also place a urls.py that handles all module related urls for the given module (simply include it in the project&#8217;s urls.py file).</p>
<p>My terminology may not be correct, this writeup is after going through the tutorial the first time.</p>
<p>I am not going to give a step-by-step reproduction of the tutorial, but can say I am impressed with what is able to be generated with very little code (a handful of files and non of them have more that 20 lines of code).</p>
<p><strong>Conclusion:</strong></p>
<p>I&#8217;ll  have to say, I am really impressed with what I have seen.</p>
<p><strong>Pros:</strong></p>
<ul>
<li>Simple to install.</li>
<li>Simple to configure.</li>
<li>Common MVC layout.</li>
<li>100% modular.</li>
<li>Lightweight</li>
<li>Powerful</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>Configuration files can be picky due to spacing.</li>
<li>Error messages can leave you hunting in the dark for the real error.</li>
</ul>
<p>This is the first time I have ever worked with python, so it will be somewhat of a learning curve, but I do believe (and others have also said) that the time is well worth the effort.</p>
<p>I have also ready about a few people using Django for the backend (administration area) and php for the frontend. I think this also would be a great middle ground.</p>
]]></content:encoded>
			<wfw:commentRss>http://slack5.com/blog/2008/12/15/django-first-impression/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Linux on the iPhone</title>
		<link>http://slack5.com/blog/2008/11/28/linux-on-the-iphone/</link>
		<comments>http://slack5.com/blog/2008/11/28/linux-on-the-iphone/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 02:55:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://slack5.com/blog/?p=28</guid>
		<description><![CDATA[We all knew it would happen sooner or later. Here&#8217;s the beginings of linux on the iPhone. http://linuxoniphone.blogspot.com/2008/11/linux-on-iphone.html]]></description>
			<content:encoded><![CDATA[<p>We all knew it would happen sooner or later.</p>
<p>Here&#8217;s the beginings of linux on the iPhone.</p>
<p><a href="http://linuxoniphone.blogspot.com/2008/11/linux-on-iphone.html" target="_blank">http://linuxoniphone.blogspot.com/2008/11/linux-on-iphone.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://slack5.com/blog/2008/11/28/linux-on-the-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
