<?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; urls.py</title>
	<atom:link href="http://www.runninginflipflops.com/tag/urlspy/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; urls.py</title>
		<url>http://www.runninginflipflops.com/wp-content/plugins/powerpress/rss_default.jpg</url>
		<link>http://www.runninginflipflops.com</link>
	</image>
		<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>
	</channel>
</rss>

