<?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>Aimee LaPlant</title>
	<atom:link href="http://aimeelaplant.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://aimeelaplant.com</link>
	<description></description>
	<lastBuildDate>Thu, 29 Nov 2012 10:41:35 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<item>
		<title>The Maneater</title>
		<link>http://aimeelaplant.com/2012/08/the-maneater/</link>
		<comments>http://aimeelaplant.com/2012/08/the-maneater/#comments</comments>
		<pubDate>Thu, 30 Aug 2012 08:25:04 +0000</pubDate>
		<dc:creator>Aimee LaPlant</dc:creator>
				<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[960gs]]></category>
		<category><![CDATA[Adsense]]></category>
		<category><![CDATA[Analytics]]></category>
		<category><![CDATA[Django/Python]]></category>
		<category><![CDATA[Journalism]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://aimeelaplant.com/?p=208</guid>
		<description><![CDATA[<p>Developed and designed web features for the award-winning student newspaper website.

Maintained several domains using Django and LAMP technologies.

Provided technical support in the newsroom.

Budgeted web hosting funds.

Created Google Analytics and Adsense reports to garner revenue and traffic.</p><p>The post <a href="http://aimeelaplant.com/2012/08/the-maneater/">The Maneater</a> appeared first on <a href="http://aimeelaplant.com">Aimee LaPlant</a>.</p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://aimeelaplant.com/wp-content/uploads/2012/06/themaneater.png"><img src="http://aimeelaplant.com/wp-content/uploads/2012/06/themaneater-300x217.png" alt="The Maneater" title="The Maneater" width="300" height="217" class="aligncenter size-medium wp-image-209" /></a></p>
<ul>
<li>Developed and designed web features for the award-winning student newspaper website.</li>
<li>Maintained several domains using Django and LAMP technologies.</li>
<li>Provided technical support in the newsroom.</li>
<li>Budgeted web hosting funds.</li>
<li>Created Google Analytics and Adsense reports to garner revenue and traffic.</li>
</ul>
<p>The post <a href="http://aimeelaplant.com/2012/08/the-maneater/">The Maneater</a> appeared first on <a href="http://aimeelaplant.com">Aimee LaPlant</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://aimeelaplant.com/2012/08/the-maneater/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Emma Frost Files</title>
		<link>http://aimeelaplant.com/2012/08/emma-frost-files/</link>
		<comments>http://aimeelaplant.com/2012/08/emma-frost-files/#comments</comments>
		<pubDate>Wed, 29 Aug 2012 08:27:29 +0000</pubDate>
		<dc:creator>Aimee LaPlant</dc:creator>
				<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Adsense]]></category>
		<category><![CDATA[Analytics]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Django/Python]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Twitter Bootstrap]]></category>
		<category><![CDATA[WordPress/PHP]]></category>

		<guid isPermaLink="false">http://aimeelaplant.com/?p=218</guid>
		<description><![CDATA[<p>Designed and developed entire website.

Highly customized WordPress backend and a theme using Twitter's Bootstrap.

Created separate webapp for the comic database, written in Python using the Django web framework.

Created URL shortener with PHP's cURL to get the shortened URL.

Used JSON to get content from both PHP and Python apps.

Strong SEO practices with 30,000 unique visitors/month.</p><p>The post <a href="http://aimeelaplant.com/2012/08/emma-frost-files/">Emma Frost Files</a> appeared first on <a href="http://aimeelaplant.com">Aimee LaPlant</a>.</p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://aimeelaplant.com/wp-content/uploads/2012/06/eff.jpg"><img src="http://aimeelaplant.com/wp-content/uploads/2012/06/eff.jpg" alt="emma frost files" title="emma frost files" class="aligncenter size-medium wp-image-290" style="max-width:100%; height:auto;" /></a></p>
<ul>
<li>Designed and developed website and a theme using Twitter&#8217;s Bootstrap.</li>
<li>Highly customized WordPress theme</li>
<li>Created separate webapp for the comic database, written in Python using the Django web framework.</li>
<li>Created URL shortener with PHP&#8217;s cURL to get the shortened URL.</li>
<li>Used JSON to get content from both PHP and Python apps.</li>
<li>Strong SEO practices with 30,000 unique visitors/month.</li>
</ul>
<p>The post <a href="http://aimeelaplant.com/2012/08/emma-frost-files/">Emma Frost Files</a> appeared first on <a href="http://aimeelaplant.com">Aimee LaPlant</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://aimeelaplant.com/2012/08/emma-frost-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple CSV importer</title>
		<link>http://aimeelaplant.com/2012/08/simple-csv-importer/</link>
		<comments>http://aimeelaplant.com/2012/08/simple-csv-importer/#comments</comments>
		<pubDate>Tue, 28 Aug 2012 06:55:11 +0000</pubDate>
		<dc:creator>Aimee LaPlant</dc:creator>
				<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://aimeelaplant.com/?p=308</guid>
		<description><![CDATA[<p>Created a simple CSV importer for CSV files to be uploaded via Django's admin backend.

Ensured no duplicate objects and proper foreign key and many to many fields would be uploaded. 

Sample code shown.</p><p>The post <a href="http://aimeelaplant.com/2012/08/simple-csv-importer/">Simple CSV importer</a> appeared first on <a href="http://aimeelaplant.com">Aimee LaPlant</a>.</p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://aimeelaplant.com/wp-content/uploads/2012/08/csv-importer.png"><img src="http://aimeelaplant.com/wp-content/uploads/2012/08/csv-importer.png" alt="django csv importer" title="django csv importer" class="aligncenter size-full wp-image-309" style="max-width:100%; height:auto;" /></a></p>
<ul>
<li>Created a simple CSV importer for CSV files to be uploaded via Django&#8217;s admin backend.</li>
<li>Ensured no duplicate objects and proper foreign key and many to many fields would be uploaded.</li>
<li>Sample code shown.</li>
</ul>
<p>The post <a href="http://aimeelaplant.com/2012/08/simple-csv-importer/">Simple CSV importer</a> appeared first on <a href="http://aimeelaplant.com">Aimee LaPlant</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://aimeelaplant.com/2012/08/simple-csv-importer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP cURL function</title>
		<link>http://aimeelaplant.com/2012/08/php-curl-function/</link>
		<comments>http://aimeelaplant.com/2012/08/php-curl-function/#comments</comments>
		<pubDate>Tue, 21 Aug 2012 02:51:07 +0000</pubDate>
		<dc:creator>Aimee LaPlant</dc:creator>
				<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://aimeelaplant.com/?p=298</guid>
		<description><![CDATA[<p>Takes a published WordPress post and grabs the permalink to generate a shortened URL from a different domain (on the same server).</p><p>The post <a href="http://aimeelaplant.com/2012/08/php-curl-function/">PHP cURL function</a> appeared first on <a href="http://aimeelaplant.com">Aimee LaPlant</a>.</p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://aimeelaplant.com/wp-content/uploads/2012/08/url_shortener.png"><img src="http://aimeelaplant.com/wp-content/uploads/2012/08/url_shortener.png" alt="PHP cURL function" title="PHP cURL function" class="aligncenter" /></a></p>
<p>Takes a published WordPress post and grabs the permalink to generate a shortened URL from a different domain (on the same server).</p>
<p>The post <a href="http://aimeelaplant.com/2012/08/php-curl-function/">PHP cURL function</a> appeared first on <a href="http://aimeelaplant.com">Aimee LaPlant</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://aimeelaplant.com/2012/08/php-curl-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cape Girardeau Roller Girls</title>
		<link>http://aimeelaplant.com/2012/07/cape-girardeau-roller-girls/</link>
		<comments>http://aimeelaplant.com/2012/07/cape-girardeau-roller-girls/#comments</comments>
		<pubDate>Tue, 31 Jul 2012 02:44:41 +0000</pubDate>
		<dc:creator>Aimee LaPlant</dc:creator>
				<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[960gs]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[xHTML]]></category>

		<guid isPermaLink="false">http://aimeelaplant.com/?p=292</guid>
		<description><![CDATA[<p>Designed and developed WordPress website.

Implemented the 960.gs

Installed Google Analytics</p><p>The post <a href="http://aimeelaplant.com/2012/07/cape-girardeau-roller-girls/">Cape Girardeau Roller Girls</a> appeared first on <a href="http://aimeelaplant.com">Aimee LaPlant</a>.</p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://aimeelaplant.com/wp-content/uploads/2012/08/cgrg.png"><img src="http://aimeelaplant.com/wp-content/uploads/2012/08/cgrg-300x168.png" alt="cape girardeau roller girls" title="cape girardeau roller girls" width="300" height="168" class="aligncenter size-medium wp-image-293" /></a></p>
<ul>
<li>Designed and developed WordPress website.</li>
<li>Implemented the 960.gs</li>
<li>Installed Google Analytics</li>
</ul>
<p>The post <a href="http://aimeelaplant.com/2012/07/cape-girardeau-roller-girls/">Cape Girardeau Roller Girls</a> appeared first on <a href="http://aimeelaplant.com">Aimee LaPlant</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://aimeelaplant.com/2012/07/cape-girardeau-roller-girls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to send and receive Mizzou email through Gmail</title>
		<link>http://aimeelaplant.com/2012/06/send-receive-mizzou-email-gmail/</link>
		<comments>http://aimeelaplant.com/2012/06/send-receive-mizzou-email-gmail/#comments</comments>
		<pubDate>Thu, 21 Jun 2012 21:29:47 +0000</pubDate>
		<dc:creator>Aimee LaPlant</dc:creator>
				<category><![CDATA[Mizzou]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://aimeelaplant.com/?p=225</guid>
		<description><![CDATA[<p>This post shows how to send and receive Mizzou email through a Gmail account.</p><p>The post <a href="http://aimeelaplant.com/2012/06/send-receive-mizzou-email-gmail/">How to send and receive Mizzou email through Gmail</a> appeared first on <a href="http://aimeelaplant.com">Aimee LaPlant</a>.</p>]]></description>
			<content:encoded><![CDATA[<p>The steps below seems like a lot but it&#8217;s really not. Most of the settings I explain are set as default by Gmail, so you only have to add your email address, username, and password. </p>
<p>So here are the POP settings to get your Mizzou email running through Gmail. Since I have gmail.com as a constantly open tab, I find sending and receiving university email through my Gmail much more convenient than using something clunky like Outlook or OS X&#8217;s Mail app.</p>
<p><a href="#pop-settings">I don&#8217;t want to read all this. Just take me to the POP settings so I can get this done.</a></p>
<h2>Receive Mail</h2>
<p><a href="http://aimeelaplant.com/wp-content/uploads/2012/06/mizzou-email-pop-settings.png"><img src="http://aimeelaplant.com/wp-content/uploads/2012/06/mizzou-email-pop-settings.png" alt="POP settings to receive Mizzou email through Gmail" title="POP settings to receive Mizzou email through Gmail" width="545" height="317" class="aligncenter size-full wp-image-249" /></a></p>
<ol>
<li>Navigate to <strong>Settings</strong> > <strong>Accounts and Import</strong> > <strong>Add a POP3 mail account you own</strong> in your Gmail account.</li>
<li>Enter in your Mizzou email address <strong>@mail.missouri.edu</strong>. @mail.<strong>mizzou</strong>.edu will <strong>not</strong> work in the settings, but you will still get email if people send email to an @mail.mizzou.edu address.  <strong>Note:</strong> If you have an email alias setup, like mine such as aimeelaplant@mail.missouri.edu, enter it in the email field here, but do not enter the alias in the username field.</li>
<li>Enter your username as <strong>pawprint@mail.missouri.edu</strong>, replacing &#8216;pawprint&#8217; with your actual Pawprint, of course. <strong>Include</strong> the @mail.missouri.edu. Then, enter your password.</li>
<li>The University of Missouri&#8217;s <strong>POP server</strong> is <strong>pod51000.outlook.com</strong>. Ensure the port number is <strong>995</strong> and check the secure connection (SSL) for added security. (I found our POP settings <a href="https://help.missouri.edu/portal/app/portlets/results/viewsolution.jsp?solutionid=040909210572765&#038;hypermediatext=true">here</a>.)</li>
<li>If you want the emails you read in your Gmail account to be synced with your @mail.missouri.edu account (for example, if you viewed your email on Outlook, the message would be marked as read on Outlook if you read it on your Gmail account), <strong>keep this unchecked: Leave a copy of retrieved message on the server.</strong></li>
<li>Add account!</li>
</ol>
<h2>Send Mail</h2>
<p>Gmail does this pretty easily for you after you add your Mizzou email to receive messages via Gmail. </p>
<ol>
<li>Check <strong>Yes, I want to be able to send mail as pawprint@mail.missouri.edu</strong>.
<li>Leave <strong>Treat as an alias</strong> checked.</li>
<li>Check <strong>Send through Gmail (easier to set up)</strong>.</li>
<li>Send verification. Then, go to your @mail.missouri.edu account and click on the link that Google sends you to verify you own your Mizzou account.</li>
</ol>
<h2>Change your Mizzou email address</h2>
<p>If you are wondering how I got aimeelaplant@mail.missouri.edu, I went to DoIT&#8217;s website <a href="http://doit.missouri.edu/e-mail/student.html">here</a> and clicked on <strong>Personalize Email Address</strong>. If you plan on doing this and also want to send and receive email through Gmail, you will have to enter in your personalized email address in the email field, as mentioned in the &#8220;Receive mail&#8221; steps. The good thing is that the 6 character email address and new personalized email address go hand-in-hand, so you won&#8217;t need to notify people of your new address. That would be horrific&#8230;</p>
<h2 id="pop-settings">POP settings</h2>
<p>Here&#8217;s to those like me who just want the core details.</p>
<ol>
<li><strong>Email address:</strong> pawprint@mail.missouri.edu</li>
<li><strong>Username:</strong> pawprint@mail.missouri.edu</li>
<li><strong>POP Server:</strong> pod51000.outlook.com</li>
<li><strong>Port:</strong> 995</li>
<li><strong>SSL:</strong> Yes</li>
</ol>
<p>All done! Feel free to leave a comment if you have any questions.</p>
<p>The post <a href="http://aimeelaplant.com/2012/06/send-receive-mizzou-email-gmail/">How to send and receive Mizzou email through Gmail</a> appeared first on <a href="http://aimeelaplant.com">Aimee LaPlant</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://aimeelaplant.com/2012/06/send-receive-mizzou-email-gmail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No, your cell phone does not have a Facebook name</title>
		<link>http://aimeelaplant.com/2012/02/no-your-cell-phone-does-not-have-a-facebook-name/</link>
		<comments>http://aimeelaplant.com/2012/02/no-your-cell-phone-does-not-have-a-facebook-name/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 09:24:49 +0000</pubDate>
		<dc:creator>Aimee LaPlant</dc:creator>
				<category><![CDATA[The Web]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Social Media]]></category>

		<guid isPermaLink="false">http://aimeelaplant.com/?p=129</guid>
		<description><![CDATA[<p> Your cell phone does not have a name! The name belongs to an early Facebook user!</p><p>The post <a href="http://aimeelaplant.com/2012/02/no-your-cell-phone-does-not-have-a-facebook-name/">No, your cell phone does not have a Facebook name</a> appeared first on <a href="http://aimeelaplant.com">Aimee LaPlant</a>.</p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://aimeelaplant.com/wp-content/uploads/2012/02/your_cell_phone_facebook_name.jpeg"><img class="alignright size-medium wp-image-130" title="Your cell phone has no Facebook name." src="http://aimeelaplant.com/wp-content/uploads/2012/02/your_cell_phone_facebook_name-300x214.jpg" alt="your cell phone has a facebook name" width="300" height="214" /></a>An obnoxious yellow image saying <strong>Your Cell Phone has a name!</strong> has made its way onto my newsfeed with thousands of comments. I tried it myself on my own status (because I&#8217;m not keen on liking or commenting on public feeds), and I got &#8220;Matt Moon.&#8221; Now, this guy&#8217;s name is popping up for those whose phone numbers end in 409. His profile ID number is actually 409: <a title="https://www.facebook.com/profile.php?id=409" href="https://www.facebook.com/profile.php?id=409">http://www.facebook.com/profile.php?id=</a><strong><a title="https://www.facebook.com/profile.php?id=409" href="https://www.facebook.com/profile.php?id=409">409</a></strong>. I figured this was some code thing with the @[] tags, so I popped in the number for the Facebook profile url. You can use numbers from 100 to 999. Any numbers below 100 or above 999 seem to not work.</p>
<p>You will also notice that several of these people graduated from Harvard &#8211; where Facebook began &#8211; so their profile IDs <em>would</em> have low numbers, compared to mine which is 355571664452867. I joined Facebook around 2006!</p>
<p>Sorry, everyone. This isn&#8217;t Facebook magic, but whoever came up with this is quite the jokester!</p>
<p>The post <a href="http://aimeelaplant.com/2012/02/no-your-cell-phone-does-not-have-a-facebook-name/">No, your cell phone does not have a Facebook name</a> appeared first on <a href="http://aimeelaplant.com">Aimee LaPlant</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://aimeelaplant.com/2012/02/no-your-cell-phone-does-not-have-a-facebook-name/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Where is the very important &#8216;excerpt&#8217;, WordPress 3.3.1?</title>
		<link>http://aimeelaplant.com/2012/01/where-is-the-very-important-excerpt-wordpress-3-3-1/</link>
		<comments>http://aimeelaplant.com/2012/01/where-is-the-very-important-excerpt-wordpress-3-3-1/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 07:14:52 +0000</pubDate>
		<dc:creator>Aimee LaPlant</dc:creator>
				<category><![CDATA[The Web]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://aimeelaplant.com/?p=84</guid>
		<description><![CDATA[<p>Because I installed a completely new WordPress installation for this website, I thought WordPress removed the Excerpt field. </p><p>The post <a href="http://aimeelaplant.com/2012/01/where-is-the-very-important-excerpt-wordpress-3-3-1/">Where is the very important &#8216;excerpt&#8217;, WordPress 3.3.1?</a> appeared first on <a href="http://aimeelaplant.com">Aimee LaPlant</a>.</p>]]></description>
			<content:encoded><![CDATA[<p>I was freaking out, people! Using WordPress version 3.3.1, I thought WP got rid of the Excerpt table. Besides the title, the excerpt is simply one of my favorite SEO tools.</p>
<p>So, I missed this part. Just click on Screen Options at the top right corner when creating a new post and select the fields you want shown on the screen. I&#8217;ve enabled them all.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-91" title="The excerpt field is disabled by default in WordPress 3.1+ if you hadn't previously used it." src="http://aimeelaplant.com/wp-content/uploads/2012/01/Screen-shot-2012-01-30-at-1.09.52-AM.jpg" alt="screen options wordpress" width="501" height="203" /></p>
<p>The excerpt field is disabled by default in WordPress 3.1+ if you hadn&#8217;t previously used it. I&#8217;ve always used it, and having installed a new WordPress on this site, I didn&#8217;t know this happened. But phew!</p>
<p>The post <a href="http://aimeelaplant.com/2012/01/where-is-the-very-important-excerpt-wordpress-3-3-1/">Where is the very important &#8216;excerpt&#8217;, WordPress 3.3.1?</a> appeared first on <a href="http://aimeelaplant.com">Aimee LaPlant</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://aimeelaplant.com/2012/01/where-is-the-very-important-excerpt-wordpress-3-3-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to prepopulate a slug field from a foreign key in Django</title>
		<link>http://aimeelaplant.com/2012/01/how-to-prepopulate-a-slug-field-from-a-foreign-key-in-django/</link>
		<comments>http://aimeelaplant.com/2012/01/how-to-prepopulate-a-slug-field-from-a-foreign-key-in-django/#comments</comments>
		<pubDate>Sun, 29 Jan 2012 16:50:34 +0000</pubDate>
		<dc:creator>Aimee LaPlant</dc:creator>
				<category><![CDATA[The Web]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://aimeelaplant.com/?p=25</guid>
		<description><![CDATA[<p>How to edit your models.py file and use the 'def save()' to prepopulate a slug with a foreign key in your Django application.</p><p>The post <a href="http://aimeelaplant.com/2012/01/how-to-prepopulate-a-slug-field-from-a-foreign-key-in-django/">How to prepopulate a slug field from a foreign key in Django</a> appeared first on <a href="http://aimeelaplant.com">Aimee LaPlant</a>.</p>]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://comics.emmafrostfiles.com/">Emma Frost Comic Book Database</a> was my first <a href="https://www.djangoproject.com/">Django</a> project when I was familiarizing myself with the web framework and the Python programming language.</p>
<p>The models for the comic book database seemed relatively easy, but I came across problems that I didn&#8217;t consider, such as prepopulating a slug field from a foreign key. The comic book Title is a foreign key that goes into the Issue model. Selecting a title from a drop-down list should automatically prepopulate the slug field if defined in the admin.py, right? Nope, it comes up blank and will only prepopulate character fields &#8211; which is most likely a front-end Javascript issue.</p>
<p>Thanks to <a href="http://www.justinmyers.net/">Justin Myers</a>, he came up with a simple, bang-your-head-on-the-desk solution for generating slugs from foreign keys that I&#8217;d like to share since it is a common question.</p>
<p>Here&#8217;s how to do it, given an abbreviated example of my models.py file:</p>
<pre>[code lang="python"]class Title(models.Model):
    title = models.CharField(max_length=64)
    slug = models.SlugField()
    def get_absolute_url(self):
        return "/titles/%s" % self.slug
    def __unicode__(self):
        return self.title

class Issue(models.Model):
    title = models.ForeignKey(Title)
    number = models.CharField(max_length=20)
    slug = models.SlugField(blank=True)
    def __unicode__(self):
        return u'%s #%s' % (self.title, self.number)

    # Here is where the code you need starts.
    def save(self, *args, **kwargs):
    # Creates the slug, including the foreign key's slug.
        self.slug = str(self.title.slug)
        # Calls the parent save()
        super(Issue, self).save(*args, **kwargs)
        # Adds the number
        self.slug = str(self.title.slug) + '-' + str(self.number)
        # Calls the parent save() again
        super(Issue, self).save(*args, **kwargs)[/code]</pre>
<p>So, for example, when you save the Issue model in the Django admin, the slug field generates something like this, <a href="http://comics.emmafrostfiles.com/issues/astonishing-x-men-12/">comics.emmafrostfiles.com/issues/<strong>astonishing-x-men-12</strong></a> &#8211; which, by the way, has one of my favorite variant covers!</p>
<p>I had about 900 issues that needed to be &#8220;slugged.&#8221; Of course, I didn&#8217;t click &#8220;save&#8221; on each issue 900 times &#8211; that would have been too tedious. Login to SSH and save all the objects in the model you need slugged:<br />
<code><br />
&gt;&gt;&gt; from myproject.comics.models import Issue<br />
&gt;&gt;&gt; for issue in Issue.objects.all():<br />
... issue.save()<br />
</code><br />
I actually ran into a problem that did not throw me an error &#8211; but it was a simple fix. Make sure your character length for the slugs are right. You&#8217;ll have to go into your database admin to edit the length.</p>
<p>Good luck!</p>
<p>The post <a href="http://aimeelaplant.com/2012/01/how-to-prepopulate-a-slug-field-from-a-foreign-key-in-django/">How to prepopulate a slug field from a foreign key in Django</a> appeared first on <a href="http://aimeelaplant.com">Aimee LaPlant</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://aimeelaplant.com/2012/01/how-to-prepopulate-a-slug-field-from-a-foreign-key-in-django/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hello Family, Hello Friends, and Hello world!</title>
		<link>http://aimeelaplant.com/2012/01/hello-family-hello-friends-hello-world/</link>
		<comments>http://aimeelaplant.com/2012/01/hello-family-hello-friends-hello-world/#comments</comments>
		<pubDate>Sun, 29 Jan 2012 15:55:35 +0000</pubDate>
		<dc:creator>Aimee LaPlant</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://aimeelaplant.com/?p=1</guid>
		<description><![CDATA[<p>Here's to starting my personal blog. I hope the information can be of help to you!</p><p>The post <a href="http://aimeelaplant.com/2012/01/hello-family-hello-friends-hello-world/">Hello Family, Hello Friends, and Hello world!</a> appeared first on <a href="http://aimeelaplant.com">Aimee LaPlant</a>.</p>]]></description>
			<content:encoded><![CDATA[<p>Saying &#8220;Hello, Hello, Hello&#8221; a bunch of times makes it sound weird. Then again, I tend to run into that weirdness when I say a word too much.</p>
<p>Here&#8217;s to starting my personal blog. I hope the information can be of help to you!</p>
<p>The post <a href="http://aimeelaplant.com/2012/01/hello-family-hello-friends-hello-world/">Hello Family, Hello Friends, and Hello world!</a> appeared first on <a href="http://aimeelaplant.com">Aimee LaPlant</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://aimeelaplant.com/2012/01/hello-family-hello-friends-hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
