<?xml version="1.0" encoding="utf-8"?><!-- generator="wordpress/1.5.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Stupidly simple microformat syncing with Django&#8217;s generic views.</title>
	<link>http://thebitterpill.com/08-2007/stupidly-simple-microformat-syncing-with-djangos-generic-views/</link>
	<description>50,000 watts of power &hellip; Got my radio on</description>
	<pubDate>Fri, 04 Jul 2008 18:26:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=1.5.2</generator>

	<item>
 		<title>Comment on Stupidly simple microformat syncing with Django&#8217;s generic views. by: site admin</title>
		<link>http://thebitterpill.com/08-2007/stupidly-simple-microformat-syncing-with-djangos-generic-views/#comment-4327</link>
		<pubDate>Mon, 20 Aug 2007 13:41:30 +0000</pubDate>
		<guid>http://thebitterpill.com/08-2007/stupidly-simple-microformat-syncing-with-djangos-generic-views/#comment-4327</guid>
					<description>Paul, I think vObject is a great way of doing this, and may be less fragile than my method. I like mine because I could do ical as easy as vcard, but troubles installing vObject was the real dealbreaker.</description>
		<content:encoded><![CDATA[	<p>Paul, I think vObject is a great way of doing this, and may be less fragile than my method. I like mine because I could do ical as easy as vcard, but troubles installing vObject was the real dealbreaker.
</p>
]]></content:encoded>
				</item>
	<item>
 		<title>Comment on Stupidly simple microformat syncing with Django&#8217;s generic views. by: Paul</title>
		<link>http://thebitterpill.com/08-2007/stupidly-simple-microformat-syncing-with-djangos-generic-views/#comment-4325</link>
		<pubDate>Sat, 18 Aug 2007 19:37:10 +0000</pubDate>
		<guid>http://thebitterpill.com/08-2007/stupidly-simple-microformat-syncing-with-djangos-generic-views/#comment-4325</guid>
					<description>For what it's worth, I've got a snippet that is a decent example of using vObject/vCard with Django, though your installation problems may make it moot... http://www.djangosnippets.org/snippets/58/</description>
		<content:encoded><![CDATA[	<p>For what it&#8217;s worth, I&#8217;ve got a snippet that is a decent example of using vObject/vCard with Django, though your installation problems may make it moot&#8230; <a href='http://www.djangosnippets.org/snippets/58/' rel='nofollow'>http://www.djangosnippets.org/snippets/58/</a>
</p>
]]></content:encoded>
				</item>
	<item>
 		<title>Comment on Stupidly simple microformat syncing with Django&#8217;s generic views. by: site admin</title>
		<link>http://thebitterpill.com/08-2007/stupidly-simple-microformat-syncing-with-djangos-generic-views/#comment-4324</link>
		<pubDate>Thu, 16 Aug 2007 13:41:53 +0000</pubDate>
		<guid>http://thebitterpill.com/08-2007/stupidly-simple-microformat-syncing-with-djangos-generic-views/#comment-4324</guid>
					<description>You don't have to touch the generic view. Was it the line in urls.py that was confusing? For those who aren't really that familiar with Django, let me break it down:

&lt;code&gt;(r'^card/(?P[-\w]+)/$', &lt;/code&gt; - this is the url for the user. Slug is a urlized version of the thing you're showing a card of. So, if the infor for the card is for &quot;The Bitter Pill&quot;, the slug version would be bitter-pill.

&lt;code&gt;'django.views.generic.list_detail.object_detail',&lt;/code&gt;
- tells django to use it's built in detail view 
&lt;code&gt;dict(queryset=Foo.objects.all(), &lt;/code&gt;
- now we're passing some info to the detail view in a dict. First we tell it to use the Foo object, which &quot;The Bitter Pill&quot; should be part of. In the real world, Foo would probably be &quot;Contacts&quot; or &quot;Users&quot; or something like that.
&lt;code&gt;slug_field='slug', &lt;/code&gt; - tells the generic detail view what the Foo bbjects slug field is named. Most times, it's &quot;slug'
&lt;code&gt;template_name=&quot;microformats/vcard.html&quot;,&lt;/code&gt; - the location of the template I want to use
&lt;code&gt;mimetype=&quot;text/x-vcard&quot;) ),&lt;/code&gt; - and give it a the appropriate mimetype so it renders as a vcard.</description>
		<content:encoded><![CDATA[	<p>You don&#8217;t have to touch the generic view. Was it the line in urls.py that was confusing? For those who aren&#8217;t really that familiar with Django, let me break it down:</p>
	<p><code>(r'^card/(?P[-\w]+)/$', </code> - this is the url for the user. Slug is a urlized version of the thing you&#8217;re showing a card of. So, if the infor for the card is for &#8220;The Bitter Pill&#8221;, the slug version would be bitter-pill.</p>
	<p><code>'django.views.generic.list_detail.object_detail',</code><br />
- tells django to use it&#8217;s built in detail view<br />
<code>dict(queryset=Foo.objects.all(), </code><br />
- now we&#8217;re passing some info to the detail view in a dict. First we tell it to use the Foo object, which &#8220;The Bitter Pill&#8221; should be part of. In the real world, Foo would probably be &#8220;Contacts&#8221; or &#8220;Users&#8221; or something like that.<br />
<code>slug_field='slug', </code> - tells the generic detail view what the Foo bbjects slug field is named. Most times, it&#8217;s &#8220;slug&#8217;<br />
<code>template_name="microformats/vcard.html",</code> - the location of the template I want to use<br />
<code>mimetype="text/x-vcard") ),</code> - and give it a the appropriate mimetype so it renders as a vcard.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
