<?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>Django Days &#187; Tutorials</title>
	<atom:link href="http://djangodays.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://djangodays.com</link>
	<description>A growing collection of all things Django</description>
	<lastBuildDate>Tue, 20 Apr 2010 05:58:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Django 1.0 mail notification of new comments</title>
		<link>http://djangodays.com/2008/10/02/django-10-mail-notification-of-new-comments/</link>
		<comments>http://djangodays.com/2008/10/02/django-10-mail-notification-of-new-comments/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 05:49:29 +0000</pubDate>
		<dc:creator>Joost</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[sending mail]]></category>
		<category><![CDATA[signals]]></category>

		<guid isPermaLink="false">http://djangodays.com/?p=35</guid>
		<description><![CDATA[There are some old samples available online for doing this, but the 1.0 version of Django is not compatible with those. So I thought I&#8217;d share my solution for sending notification mails whenever there&#8217;s been posted a new comment on my Django site using Django signals.
The old way of connecting to a signal was:
dispatcher.connect(myFunction, signal=models.signals.post_save, [...]]]></description>
			<content:encoded><![CDATA[<p>There are some old samples available online for doing this, but the 1.0 version of Django is not compatible with those. So I thought I&#8217;d share my solution for sending notification mails whenever there&#8217;s been posted a new comment on my Django site using Django signals.</p>
<p>The old way of connecting to a signal was:<br />
<code>dispatcher.connect(myFunction, signal=models.signals.post_save, sender=myModel)</code></p>
<p>The new way is:<br />
<code>models.signals.pre_save.connect(myFunction, sender=myModel)</code></p>
<p>So when you want to send an email whenever there&#8217;s a new comment posted by someone, without changing existing code you will have to do something like this:</p>
<p><code>from django.contrib.comments.models import Comment<br />
from django.core.mail import send_mail<br />
from django.db.models import signals</code></p>
<p><code>def mail_comment(instance, **kwargs):<br />
subject = 'subject of the mail'<br />
msg = 'Comment text:\n\n%s' % instance.comment<br />
send_mail(subject, msg, 'noreply@djangodays', ['email@djangodays.com'])</code></p>
<p><code>signals.post_save.connect(mail_comment, sender=Comment)</code></p>
<p>If you put this code in your __init__.py file it should work fine. Putting this in there is probably not the Django way of doing things, but I&#8217;m not sure where to put it instead&#8230; I anyone found a better way of doing this, please share it in the comments!</p>
]]></content:encoded>
			<wfw:commentRss>http://djangodays.com/2008/10/02/django-10-mail-notification-of-new-comments/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Django Tutorial: Create a Wiki in 20 minutes</title>
		<link>http://djangodays.com/2008/08/05/django-tutorial-create-a-wiki-in-20-minutes/</link>
		<comments>http://djangodays.com/2008/08/05/django-tutorial-create-a-wiki-in-20-minutes/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 10:52:07 +0000</pubDate>
		<dc:creator>Joost</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://djangodays.com/?p=12</guid>
		<description><![CDATA[A great beginners tutorial is the &#8220;Create a Wiki in 20 minutes&#8221; by Siddhi from Silver Stripe Software.
In the tutorial you&#8217;ll learn the basics of Django by walking you through the development of a simple wiki application. Other aspects in the tutorial are: URL design, database interaction, Django templates and editing pages using Markdown syntax.
The [...]]]></description>
			<content:encoded><![CDATA[<p>A great beginners tutorial is the &#8220;Create a Wiki in 20 minutes&#8221; by Siddhi from <a href="http://www.silverstripesoftware.com" target="_blank">Silver Stripe Software</a>.</p>
<p>In the tutorial you&#8217;ll learn the basics of Django by walking you through the development of a simple wiki application. Other aspects in the tutorial are: URL design, database interaction, Django templates and editing pages using Markdown syntax.</p>
<p>The tutorial can be found here:</p>
<p><a href="http://showmedo.com/videos/video?name=1100000&amp;" target="_blank">http://showmedo.com/videos/video?name=1100000&amp;</a></p>
<p>Another nice tutorial from the same author is &#8220;<a href="http://showmedo.com/videos/video?name=2680000&amp;fromSeriesID=268" target="_blank">Using Amazon&#8217;s S3 service with Django</a>&#8220;</p>
]]></content:encoded>
			<wfw:commentRss>http://djangodays.com/2008/08/05/django-tutorial-create-a-wiki-in-20-minutes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial: Writing you first Django app</title>
		<link>http://djangodays.com/2008/07/06/tutorial1/</link>
		<comments>http://djangodays.com/2008/07/06/tutorial1/#comments</comments>
		<pubDate>Sun, 06 Jul 2008 02:03:39 +0000</pubDate>
		<dc:creator>Joost</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://djangodays.com/?p=5</guid>
		<description><![CDATA[The best tutorial to start with when beginning with Django is found on the Django Project website (www.djangoproject.com).
It assumes you already have Django installed, and takes you through the basics of the fabulous framework:
http://docs.djangoproject.com/en/dev/intro/tutorial01/
]]></description>
			<content:encoded><![CDATA[<p>The best tutorial to start with when beginning with Django is found on the Django Project website (<a href="http://www.djangoproject.com" target="_blank">www.djangoproject.com</a>).</p>
<p>It assumes you already have Django installed, and takes you through the basics of the fabulous framework:</p>
<p><a href="http://docs.djangoproject.com/en/dev/intro/tutorial01/">http://docs.djangoproject.com/en/dev/intro/tutorial01/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://djangodays.com/2008/07/06/tutorial1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
