<?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/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
xmlns:rawvoice="http://www.rawvoice.com/rawvoiceRssModule/"
>

<channel>
	<title>Running In Flip Flops &#187; python</title>
	<atom:link href="http://www.runninginflipflops.com/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.runninginflipflops.com</link>
	<description>A Weblog by Russ Turley</description>
	<lastBuildDate>Thu, 05 Jan 2012 21:10:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<!-- podcast_generator="Blubrry PowerPress/2.0.4" -->
	<itunes:summary>A Weblog by Russ Turley</itunes:summary>
	<itunes:author>Running In Flip Flops</itunes:author>
	<itunes:explicit>no</itunes:explicit>
	<itunes:image href="http://www.runninginflipflops.com/wp-content/plugins/powerpress/itunes_default.jpg" />
	<itunes:subtitle>A Weblog by Russ Turley</itunes:subtitle>
	<image>
		<title>Running In Flip Flops &#187; python</title>
		<url>http://www.runninginflipflops.com/wp-content/plugins/powerpress/rss_default.jpg</url>
		<link>http://www.runninginflipflops.com</link>
	</image>
		<item>
		<title>Pownce is Down: Does anybody care?</title>
		<link>http://www.runninginflipflops.com/2008/02/pownce-is-down-does-anybody-care/</link>
		<comments>http://www.runninginflipflops.com/2008/02/pownce-is-down-does-anybody-care/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 00:48:19 +0000</pubDate>
		<dc:creator>Russ Turley</dc:creator>
				<category><![CDATA[Django from Scratch]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[pownce]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.runninginflipflops.com/django-from-scratch/pownce-is-down-does-anybody-care/</guid>
		<description><![CDATA[I just updated my Firefox installation to the Beta 3 version. I&#8217;ve been using Flock, but when I heard Leo Laporte and one other person talk about how great Firefox 3 is, I had to try it out. Funny enough the last time that I opened Firefox my homepage was set to Pownce. When I [...]]]></description>
			<content:encoded><![CDATA[<p>I just updated my Firefox installation to the Beta 3 version.  I&#8217;ve been using Flock, but when I heard Leo Laporte and one other person talk about how great Firefox 3 is, I had to try it out.  Funny enough the last time that I opened Firefox my homepage was set to Pownce.  When I brought up the new version, I was greeted with this:</p>
<p><img src='http://www.runninginflipflops.com/wp-content/uploads/2008/02/pownce_oops.jpg' alt='Pownce is Down' /></p>
<p>When Twitter is down I hear about it on Facebook and other micro-blogging platforms.  Pownce was down and there&#8217;s <a href="http://www.digg.com/tech_news/Pownce_is_down">one post at Digg</a> that it&#8217;s down and 2 people &#8220;dugg&#8221; it.  </p>
<p>I like the service, and as a high profile Django powered site, I&#8217;m hoping the service succeeds.  As I learn the framework, I&#8217;m also looking at Pownce for what&#8217;s possible with Django.</p>
<p>Anyway, it&#8217;s back up now, so disaster averted.  Look me up on <a href="http://pownce.com/russturley">Pownce</a> when you get a chance.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.runninginflipflops.com/2008/02/pownce-is-down-does-anybody-care/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Project: Django URLs</title>
		<link>http://www.runninginflipflops.com/2008/02/the-project-django-urls/</link>
		<comments>http://www.runninginflipflops.com/2008/02/the-project-django-urls/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 07:30:55 +0000</pubDate>
		<dc:creator>Russ Turley</dc:creator>
				<category><![CDATA[Django from Scratch]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[urls.py]]></category>

		<guid isPermaLink="false">http://www.runninginflipflops.com/django-from-scratch/the-project-django-urls/</guid>
		<description><![CDATA[Okay, I&#8217;ve added the generic views for the podcast list and the podcast detail. These were fairly simple once you looked at the right examples and documentation online. I&#8217;d like to say that the create_object and update_object generic views were working as well. I&#8217;ve got the create_object working, but the update_object won&#8217;t work. If anyone [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, I&#8217;ve added the generic views for the podcast list and the podcast detail.  These were fairly simple once you looked at the right examples and documentation online.  I&#8217;d like to say that the create_object and update_object generic views were working as well.  I&#8217;ve got the create_object working, but the update_object won&#8217;t work.  If anyone has a clue on how to implement the update_object generic view, leave a comment and I&#8217;d be eternally grateful.  If I don&#8217;t get any suggestions, I&#8217;ll post the code in a few days even if it&#8217;s not working and hope for a response.</p>
<p>Here&#8217;s the urls.py file that creates the list and details: </p>
<pre>
<code>from django.conf.urls.defaults import *
from podcastersfriend.podcast.models import Podcast
from django.views.generic.simple import direct_to_template
from django.views.generic import list_detail
from django.views.generic.create_update import create_object, update_object
from django.views import static
import podcastersfriend.podcasts.views

podcast_list_info = {
    "queryset" : Podcast.objects.all(),
}

podcast_detail_info = {
    "queryset" : Podcast.objects.all(),
    "template_object_name" : "podcast",
}

podcast_add_info = {
     "model" : Podcast,
     "post_save_redirect" : "/podcasts"
}

podcast_update_info = {"model" : Podcast }

urlpatterns = patterns('',

     (r'^$', podcastersfriend.podcasts.views.indexPage),
     (r'^admin/', include('django.contrib.admin.urls')),
     (r'^podcasts/?$', list_detail.object_list, podcast_list_info),
     (r'^podcasts/(?P&lt;object_id&gt;d+)/?$', list_detail.object_detail,podcast_detail_info),
     (r'^podcasts/add/?$', create_object, podcast_add_info),
     (r'^podcasts/edit/(?P&lt;object_id&gt;d+)/?$', update_object, podcast_update_info),
     (r'^static/(?P&lt;path&gt;.*)$', 'django.views.static.serve', {'document_root': 'c:/projects/podcastersfriend/podcast/static'}),
)</code>
</pre>
<p>Here&#8217;s a link to the file: <a href="http://www.runninginflipflops.com/wp-content/uploads/2008/02/urls.py" title="Django URLs">Django URLs</a></p>
<p>If you see something wrong with this, please leave a comment explaining why and how I might make it better.  The templates are working as well, except for they don&#8217;t validate the data being entered yet.  That will be the next step, and I&#8217;ll post the templates in a couple of days.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.runninginflipflops.com/2008/02/the-project-django-urls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Project: Django Models</title>
		<link>http://www.runninginflipflops.com/2008/02/the-project-django-models/</link>
		<comments>http://www.runninginflipflops.com/2008/02/the-project-django-models/#comments</comments>
		<pubDate>Sun, 10 Feb 2008 08:03:39 +0000</pubDate>
		<dc:creator>Russ Turley</dc:creator>
				<category><![CDATA[Django from Scratch]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[models.py]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.runninginflipflops.com/django-from-scratch/the-project-django-models/</guid>
		<description><![CDATA[Alright, this seems a little embarassing. I&#8217;ve never put up code before for public scrutiny. I put up podcasts all the time that may be a little iffy, I make blog posts, but this seems different. I&#8217;m learning this and so I feel very naked posting this. But here it is any way. I&#8217;m not [...]]]></description>
			<content:encoded><![CDATA[<p>Alright, this seems a little embarassing. I&#8217;ve never put up code before for public scrutiny. I put up podcasts all the time that may be a little iffy, I make blog posts, but this seems different. I&#8217;m learning this and so I feel very naked posting this. But here it is any way. I&#8217;m not putting in any user authentication as of yet. I&#8217;m going to get the meat of the application done and then I&#8217;m going to put the polish on afterward. Again, I&#8217;m learning.</p>
<p>I haven&#8217;t found a good way to include code in WordPress.  If you have a solution, please let me know.</p>
<p>Here&#8217;s the model file: </p>
<pre>
<code>from django.db import models

PODCAST_GENRE_CHOICES = (
    ('TE', 'Technology'),
    ('HF', 'Health'),
    ('MU', 'Music'),
    ('PB', 'Podiobook'),
    ('OU', 'Outdoor'),
    ('EN', 'Entertainment'),
    ('WA', 'World Affairs'),
    ('LS', 'Lifestyle'),
)

class Podcast(models.Model):
   url=models.URLField()
   feed_url=models.URLField()
   album_art=models.URLField(null=True, blank=True)
   itunes_feed_id=models.IntegerField(null=True, blank=True, maxlength=10)
   title=models.CharField(maxlength=255)
   description=models.TextField()
   sample_podcast=models.URLField(null=True, blank=True)
   genre=models.CharField(maxlength=2, choices=PODCAST_GENRE_CHOICES)
   created_date=models.DateField(auto_now_add=True)
   modified_date=models.DateField(auto_now=True)

   def __str__(self):
       return self.title

   class Admin:
       pass

       list_display = ('title', 'url')

   def get_absolute_url(self):
    return "/podcasts/%i/" %self.id</code>
</pre>
<p>Here&#8217;s a link to the file: <a href="http://www.runninginflipflops.com/wp-content/uploads/2008/02/models.py" title="Django Model">Django Model</a></p>
<p>Well, that&#8217;s the model for the podcasts. I&#8217;m not planning on reading in the Feeds and displaying the episodes as of yet. One step at a time, right?</p>
<p>So you Pythonistas, Djangonauts&#8230;</p>
<p>What&#8217;s wrong with this?<br />
What&#8217;s right with it?<br />
What am I missing?</p>
<p>Next post will be a little about the generic views that I&#8217;ll be using to create the podcast listing and the detail pages. I&#8217;ve already got the podcast list done and the detail. I&#8217;ll post that soon. After that, I&#8217;ll tackle the CRUD of making changes to the podcast details. Finally, I&#8217;ll implement user login and then I&#8217;ll go from there.</p>
<p>I&#8217;ve selected a template from freecsstemplates.org to use in the site, just so it&#8217;s not so darn plain. I&#8217;ll also get that server up so others can add their data to the database and try out the application.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.runninginflipflops.com/2008/02/the-project-django-models/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

