<?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:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>2WeeksofDjango - A Django tutorial</title>
	<atom:link href="http://2weeksofdjango.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://2weeksofdjango.com</link>
	<description>The Web frameworkfor perfectionists with deadlines - A deadline of two weeks!</description>
	<pubDate>Thu, 03 Jul 2008 14:42:22 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Django Interviews</title>
		<link>http://2weeksofdjango.com/2008/07/03/django-interviews/</link>
		<comments>http://2weeksofdjango.com/2008/07/03/django-interviews/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 14:42:22 +0000</pubDate>
		<dc:creator>shabda</dc:creator>
		
		<category><![CDATA[django]]></category>

		<category><![CDATA[python]]></category>

		<category><![CDATA[webdev]]></category>

		<category><![CDATA[interviews]]></category>

		<guid isPermaLink="false">http://shabda.wordpress.com/?p=25</guid>
		<description><![CDATA[I completed the interviews of a lot of interesting people from the django community. Here are all the interviews, in reverse chronological order.
Adrian Holovaty
Jacon Kaplan Moss
Michael Trier
Russel Keith Magee 
James Bennett
Malcolm Tredinnick
       ]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I completed the interviews of a lot of interesting people from the django community. Here are all the interviews, in reverse chronological order.</p>
<p><a href="http://42topics.com/blog/2008/06/an-interview-with-adrian-holovaty/">Adrian Holovaty</a></p>
<p><a href="http://42topics.com/blog/2008/05/an-interview-with-jacob-kaplan-moss-creator-of-django/">Jacon Kaplan Moss</a></p>
<p><a href="http://42topics.com/blog/2008/05/an-interview-with-michael-trier/">Michael Trier</a></p>
<p><a href="http://42topics.com/blog/2008/05/an-interview-with-russell-keith-magee/">Russel Keith Magee </a></p>
<p><a href="http://42topics.com/blog/2008/04/interview-with-james-bennett-django-release-manager/">James Bennett</a></p>
<p><a href="http://42topics.com/blog/2008/04/an-interview-with-malcolm-tredinnick/">Malcolm Tredinnick</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shabda.wordpress.com/25/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shabda.wordpress.com/25/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shabda.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shabda.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shabda.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shabda.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shabda.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shabda.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shabda.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shabda.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shabda.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shabda.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=2weeksofdjango.com&blog=34423&post=25&subd=shabda&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://2weeksofdjango.com/2008/07/03/django-interviews/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Interviews of Django people</title>
		<link>http://2weeksofdjango.com/2008/04/27/interviews-of-django-people/</link>
		<comments>http://2weeksofdjango.com/2008/04/27/interviews-of-django-people/#comments</comments>
		<pubDate>Sun, 27 Apr 2008 14:11:12 +0000</pubDate>
		<dc:creator>shabda</dc:creator>
		
		<category><![CDATA[django]]></category>

		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://shabda.wordpress.com/?p=24</guid>
		<description><![CDATA[I have started a series to interview the interesting people from Django community. You can read about them at
1. James Bennett
2. Malolm Trednnick
       ]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I have started a series to interview the interesting people from Django community. You can read about them at</p>
<p>1. <a href="http://42topics.com/blog/2008/04/interview-with-james-bennett-django-release-manager/">James Bennett</a></p>
<p>2. <a href="http://42topics.com/blog/2008/04/an-interview-with-malcolm-tredinnick/">Malolm Trednnick</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shabda.wordpress.com/24/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shabda.wordpress.com/24/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shabda.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shabda.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shabda.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shabda.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shabda.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shabda.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shabda.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shabda.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shabda.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shabda.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=2weeksofdjango.com&blog=34423&post=24&subd=shabda&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://2weeksofdjango.com/2008/04/27/interviews-of-django-people/feed/</wfw:commentRss>
		</item>
		<item>
		<title></title>
		<link>http://2weeksofdjango.com/2008/04/11/23/</link>
		<comments>http://2weeksofdjango.com/2008/04/11/23/#comments</comments>
		<pubDate>Fri, 11 Apr 2008 11:36:09 +0000</pubDate>
		<dc:creator>shabda</dc:creator>
		
		<category><![CDATA[appengine]]></category>

		<category><![CDATA[django]]></category>

		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://shabda.wordpress.com/?p=23</guid>
		<description><![CDATA[I have posted a few tutorials about using django with appengine
http://www.42topics.com/dumps/django/docs.html
http://www.42topics.com/dumps/appengine/doc.html
And here you can find other of my Django posts.
       ]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I have posted a few tutorials about using django with appengine</p>
<p><a href="http://www.42topics.com/dumps/django/docs.html">http://www.42topics.com/dumps/django/docs.html</a></p>
<p><a href="http://www.42topics.com/dumps/appengine/doc.html">http://www.42topics.com/dumps/appengine/doc.html</a></p>
<p>And <a href="http://42topics.com/blog/category/django/">here</a> you can find other of my Django posts.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shabda.wordpress.com/23/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shabda.wordpress.com/23/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shabda.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shabda.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shabda.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shabda.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shabda.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shabda.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shabda.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shabda.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shabda.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shabda.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=2weeksofdjango.com&blog=34423&post=23&subd=shabda&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://2weeksofdjango.com/2008/04/11/23/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Day 3 - Writing the model</title>
		<link>http://2weeksofdjango.com/2007/12/10/day-3-writing-the-model/</link>
		<comments>http://2weeksofdjango.com/2007/12/10/day-3-writing-the-model/#comments</comments>
		<pubDate>Mon, 10 Dec 2007 16:25:47 +0000</pubDate>
		<dc:creator>shabda</dc:creator>
		
		<category><![CDATA[django]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[python]]></category>

		<category><![CDATA[views]]></category>

		<guid isPermaLink="false">http://2weeksofdjango.com/2007/12/10/day-3-writing-the-model/</guid>
		<description><![CDATA[[Still working on this]

By now we have the model in place and we can use the admin interface to create or edit any of the tables. Use the admin interface to create a Blog and a Comment on that. The admin model is useful if you just want to do CRUD operations on the tables, [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>[Still working on this]<br />
<br />
By now we have the model in place and we can use the admin interface to create or edit any of the tables. Use the admin interface to create a Blog and a Comment on that. The admin model is useful if you just want to do CRUD operations on the tables, but it does not show the data in the format we want. We would like to have each Blog entry displayed with its comments on the main page. We can not give the access to the admin interface, as we want visisters to just be able to read, and not write any thing. So we need views. We wrote a view on the first day when we wrote the welcome function.<br />
<br />
The basic things a view function needs to do are</p>
<ol>
<li>Be mapped to a set of URLs by its being specified in urls.py
</li>
<li>Take a HtttpRequest object request as the first argument.
</li>
<li>Return a HttpResponse object.
</li>
</ol>
<p>Now we could write the html inside of the view function, but once you start building complex interfaces, generating Html becomes a chore. It is much easier to take a template and pass values which change to it. Django makes this extremely easy.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shabda.wordpress.com/22/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shabda.wordpress.com/22/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shabda.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shabda.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shabda.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shabda.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shabda.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shabda.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shabda.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shabda.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shabda.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shabda.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=2weeksofdjango.com&blog=34423&post=22&subd=shabda&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://2weeksofdjango.com/2007/12/10/day-3-writing-the-model/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Day 2 - The basic model</title>
		<link>http://2weeksofdjango.com/2007/12/08/day-2-the-basic-model/</link>
		<comments>http://2weeksofdjango.com/2007/12/08/day-2-the-basic-model/#comments</comments>
		<pubDate>Sat, 08 Dec 2007 18:34:20 +0000</pubDate>
		<dc:creator>shabda</dc:creator>
		
		<category><![CDATA[django]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[module]]></category>

		<category><![CDATA[orm]]></category>

		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://2weeksofdjango.com/2007/12/08/day-2-the-basic-model/</guid>
		<description><![CDATA[Django provides a very nice ORM, which means you generally would not need to write database queries. IMO, Django&#8217;s well designed and very simple ORM is one of its strongest points. So lets dive in and start some code.
Before we start interacting with the database we need to tell Django the database connection details. This, [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Django provides a very nice ORM, which means you generally would not need to write database queries. IMO, Django&#8217;s well designed and very simple ORM is one of its strongest points. So lets dive in and start some code.</p>
<p>Before we start interacting with the database we need to tell Django the database connection details. This, and most other settings are defined in the file settings.py. For us that file is f:\project\settings.py. I am going to use the mySql database server, for no other reason than I already know this. You may want to use sqllite or PostgreSql.<br />
Open the setting.py file and change the following lines to store the database details.<br />
<code><br />
DATABASE_ENGINE = &#8216;mysql&#8217;           # &#8216;postgresql_psycopg2&#8242;, &#8216;postgresql&#8217;, &#8216;mysql&#8217;, &#8217;sqlite3&#8242; or &#8216;oracle&#8217;.<br />
DATABASE_NAME = &#8216;dBlog&#8217;             # Or path to database file if using sqlite3.<br />
DATABASE_USER = &#8216;user&#8217;             # Not used with sqlite3.<br />
DATABASE_PASSWORD = &#8217;secret&#8217;         # Not used with sqlite3.<br />
DATABASE_HOST = &#8221;             # Set to empty string for localhost. Not used with sqlite3.<br />
DATABASE_PORT = &#8221;             # Set to empty string for default. Not used with sqlite3.</code></p>
<p>You would have need to created the user and the database, using the tool provided by your database engine. Django can not do this for you.</p>
<p>The admin system provided with Django lets you do most of the basic CRUD without writing a line of code. So lets use that to see our data. We need to tell Django that we plan to use the admin functionality. Modify the settings.py to do this.<br />
<code><br />
INSTALLED_APPS = (<br />
&#8216;django.contrib.auth&#8217;,<br />
&#8216;django.contrib.contenttypes&#8217;,<br />
&#8216;django.contrib.sessions&#8217;,<br />
&#8216;django.contrib.sites&#8217;,<br />
&#8216;django.contrib.admin&#8217;,<br />
&#8216;project.dBlog&#8217;<br />
)<br />
</code><br />
Basically we added  &#8216;django.contrib.admin&#8217; and  &#8216;project.dBlog&#8217; to INSTALLED_APPS.</p>
<p>Right now we just want to have blog posts and comment on them. Edit your models.py to create a table for blog entries and another for comments. Put the following code in models.py<br />
<code><br />
from django.db import models<br />
from django.contrib.auth.models import User</p>
<p>class Blog(models.Model):<br />
    entry = models.TextField(maxlength = 1000)<br />
    created_on = models.DateTimeField(auto_now_add = 1)<br />
    created_by = models.ForeignKey(User, unique = True)<br />
    class Admin:<br />
       pass</p>
<p>class Comment(models.Model):<br />
    comment_text = models.TextField(maxlength = 1000)<br />
    created_on = models.DateTimeField(auto_now_add = 1)<br />
    created_by = models.ForeignKey(User, unique = True)<br />
    comment_for = models.ForeignKey(Blog)<br />
    class Admin:<br />
       pass<br />
</code><br />
Lets see what the code does.<br />
The first line imports the module which contains django ORM. The next import imports User class which we would be using as we do not want to re write the authentication system. We have two classes <em>Blog</em> and <em>Comment</em> each corresponding to a database table. Such classes need to extend models.Model which we have done. We want the Blog table to contain some text, so we have <em>entry</em>, we want to keep track of when it was created, so we have <em>created_on</em>. <em>created_by</em> is a Foreign key to the User table, defined in django.contrib.auth.models . For each of them we have added a few attributes such as maxlength.<br />
<br />
The code<br />
<code><br />
    class Admin:<br />
       pass<br />
</code><br />
tell django that we want to modify these tables from the auto generated admin interface. Similarly we write the needed columns for <em>Comment</em> and give it a foreign key to Blog. (<em>created_by = models.ForeignKey(User, unique = True)</em>)<br />
<br />
Running the command <span class="incode">manage.py syncdb</span> would create the tables our application needs.<br />
<code><br />
F:\project&gt;manage.py syncdb<br />
Creating table auth_message<br />
Creating table auth_group<br />
Creating table auth_user<br />
Creating table auth_permission<br />
Creating table django_content_type<br />
Creating table django_session<br />
Creating table django_site<br />
Creating table django_admin_log<br />
Creating table dBlog_blog<br />
Creating table dBlog_comment<br />
You just installed Django&#8217;s auth system, which means you don&#8217;t have any superuse<br />
rs defined.<br />
Would you like to create one now? (yes/no): yes<br />
Username: shabda<br />
E-mail address: shabda.raaj@gmail.com<br />
Password:<br />
Password (again):<br />
Superuser created successfully.<br />
Installing index for auth.Message model<br />
Installing index for auth.Permission model<br />
Installing index for admin.LogEntry model<br />
Installing index for dBlog.Blog model<br />
Installing index for dBlog.Comment model<br />
Loading &#8216;initial_data&#8217; fixtures&#8230;<br />
No fixtures found.<br />
</code></p>
<p>We would be using Django&#8217;s authentication system, as declared in INSTALLED_APPS in setting.py, with the lines <em>&#8216;django.contrib.auth&#8217;</em>. So syncdb created a few tables for the authentication system and asked you to create a superuser.<br />
<br />
To make the admin interface available we need to add<br />
<code><br />
(r&#8217;^admin/&#8217;, include(&#8217;django.contrib.admin.urls&#8217;)),<br />
</code> to urls.py.<br />
<br />
Now point your browser to localhost:8000/admin and you would be asked to log in. Log in using the user you created. You should see a screen like this <img src="http://shabda.files.wordpress.com/2007/12/admin.png" /> .<br />
Rejoice, our first app is almost ready.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shabda.wordpress.com/20/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shabda.wordpress.com/20/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shabda.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shabda.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shabda.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shabda.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shabda.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shabda.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shabda.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shabda.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shabda.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shabda.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=2weeksofdjango.com&blog=34423&post=20&subd=shabda&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://2weeksofdjango.com/2007/12/08/day-2-the-basic-model/feed/</wfw:commentRss>
	
		<media:content url="http://shabda.files.wordpress.com/2007/12/admin.png" medium="image" />
	</item>
		<item>
		<title>Day 1 - Your first code</title>
		<link>http://2weeksofdjango.com/2007/12/07/day-1-your-first-code/</link>
		<comments>http://2weeksofdjango.com/2007/12/07/day-1-your-first-code/#comments</comments>
		<pubDate>Fri, 07 Dec 2007 14:22:07 +0000</pubDate>
		<dc:creator>shabda</dc:creator>
		
		<category><![CDATA[django]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://2weeksofdjango.com/2007/12/07/day-1-your-first-code/</guid>
		<description><![CDATA[Before we get into the deep and the dirty of coding the Blog applications, lets check if the server parses the Python code. Modify the f:\project\urls.py to tell what function we want to be called when we access a page. Lets have a simple welcome page when we access /dBlog/

from django.conf.urls.defaults import *
urlpatterns = patterns(&#8217;dBlog.views&#8217;,
(r&#8217;^dBlog/$&#8217;, [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Before we get into the deep and the dirty of coding the Blog applications, lets check if the server parses the Python code. Modify the f:\project\urls.py to tell what function we want to be called when we access a page. Lets have a simple welcome page when we access /dBlog/</p>
<p><code><br />
from django.conf.urls.defaults import *</code></p>
<p>urlpatterns = patterns(&#8217;dBlog.views&#8217;,<br />
(r&#8217;^dBlog/$&#8217;, &#8216;welcome&#8217;),<br />
)<br />
The line <span class="incode">from django.conf.urls.defaults import *</span> imports the pattern function which we use here. The <span class="incode">    (r&#8217;^dBlog/$&#8217;, &#8216;welcome&#8217;),</span> is the interesting line. This tell django that we want to call welcome function from module dBlog.views whenever localhost:8000/dBlog is accessed.</p>
<p>Modify the f:\project\dBlog\views and code the folowing lines<br />
<code><br />
from django.http import HttpResponse</code></p>
<p>def welcome(request):<br />
return HttpResponse(&#8217;Welcome to dBlog. We are building the worlds best blog engine here!&#8217;)</p>
<p>The function which gets called takes the first parameter containing the HTTP request data, (By convention called request). It must return a HttpResponse containing the text to write. (There are much more advanced ways to return HttpResponse, we will find them shortly). Now access the http://localhost:8000/dBlog/ . You would see the text which you returned from HttpResponse.</p>
<p>That is all for today. Tomorrow we will decide upon the data model, and write some more code.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shabda.wordpress.com/19/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shabda.wordpress.com/19/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shabda.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shabda.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shabda.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shabda.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shabda.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shabda.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shabda.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shabda.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shabda.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shabda.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=2weeksofdjango.com&blog=34423&post=19&subd=shabda&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://2weeksofdjango.com/2007/12/07/day-1-your-first-code/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Day 1 - The first steps.</title>
		<link>http://2weeksofdjango.com/2007/12/07/day-1-the-first-steps/</link>
		<comments>http://2weeksofdjango.com/2007/12/07/day-1-the-first-steps/#comments</comments>
		<pubDate>Fri, 07 Dec 2007 13:31:30 +0000</pubDate>
		<dc:creator>shabda</dc:creator>
		
		<category><![CDATA[django]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://2weeksofdjango.com/2007/12/07/day-1-the-first-steps/</guid>
		<description><![CDATA[I use windows as my development platform. By the way, you have installed Django, haven&#8217;t you. If not head over to installation guide and install. We want to start a Django project and then a Django application inside the project.

F:\&#62;django-admin.py startproject project
F:\&#62;cd project
F:\project&#62;django-admin.py startapp dBlog
Lets see if everything got created correctly.
F:\project&#62;cd dblog
F:\project\dBlog&#62;dir
Volume in drive F [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I use windows as my development platform. By the way, you have installed Django, haven&#8217;t you. If not head over to <a href="http://www.djangoproject.com/documentation/install/" title="Install guide">installation guide</a> and install. We want to start a Django project and then a Django application inside the project.<br />
<code><br />
F:\&gt;django-admin.py startproject project<br />
F:\&gt;cd project</code></p>
<p>F:\project&gt;django-admin.py startapp dBlog<br />
Lets see if everything got created correctly.<br />
<code>F:\project&gt;cd dblog</code></p>
<p>F:\project\dBlog&gt;dir<br />
Volume in drive F is New Volume<br />
Volume Serial Number is 5C42-C4C6</p>
<p>Directory of F:\project\dBlog</p>
<p>12/07/2007  06:35 PM              .<br />
12/07/2007  06:35 PM              ..<br />
12/07/2007  06:35 PM                60 models.py<br />
12/07/2007  06:35 PM                27 views.py<br />
12/07/2007  06:35 PM                 0 __init__.py<br />
3 File(s)             87 bytes<br />
2 Dir(s)  32,769,191,936 bytes free</p>
<p>F:\project\dBlog&gt;cd ..</p>
<p>F:\project&gt;dir<br />
Volume in drive F is New Volume<br />
Volume Serial Number is 5C42-C4C6</p>
<p>Directory of F:\project</p>
<p>12/07/2007  06:35 PM              .<br />
12/07/2007  06:35 PM              ..<br />
12/07/2007  06:35 PM              dBlog<br />
12/07/2007  06:35 PM               557 manage.py<br />
12/07/2007  06:35 PM             2,899 settings.py<br />
12/07/2007  06:35 PM               236 urls.py<br />
12/07/2007  06:35 PM                 0 __init__.py<br />
4 File(s)          3,692 bytes<br />
3 Dir(s)  32,769,191,936 bytes free<br />
Looks like django created some files and directories for its use. Never mind what all of that means. All those files will make sense shortly. (It is extremely simple, by the way).</p>
<p>Now lets try running the server and accessing the application we created.</p>
<p><code><br />
F:\project&gt;manage.py runserver<br />
Validating models&#8230;<br />
0 errors found</code></p>
<p>Django version 0.97-pre-SVN-6442, using settings &#8216;project.settings&#8217;<br />
Development server is running at http://127.0.0.1:8000/<br />
Quit the server with CTRL-BREAK.<br />
Looks like the server is started on port 8000. Give it a spin.<br />
<img src="http://shabda.files.wordpress.com/2007/12/it_worked.png" alt="It worked!" /></p>
<p>Aww. It says &#8220;Of course, you haven&#8217;t actually done any work yet.&#8221; I shall not let a computer mock me. So back to work.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shabda.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shabda.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shabda.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shabda.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shabda.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shabda.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shabda.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shabda.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shabda.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shabda.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shabda.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shabda.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=2weeksofdjango.com&blog=34423&post=17&subd=shabda&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://2weeksofdjango.com/2007/12/07/day-1-the-first-steps/feed/</wfw:commentRss>
	
		<media:content url="http://shabda.files.wordpress.com/2007/12/it_worked.png" medium="image">
			<media:title type="html">It worked!</media:title>
		</media:content>
	</item>
		<item>
		<title>Deciding on the features</title>
		<link>http://2weeksofdjango.com/2007/12/07/deciding-on-the-features/</link>
		<comments>http://2weeksofdjango.com/2007/12/07/deciding-on-the-features/#comments</comments>
		<pubDate>Fri, 07 Dec 2007 13:04:50 +0000</pubDate>
		<dc:creator>shabda</dc:creator>
		
		<category><![CDATA[django]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://2weeksofdjango.com/2007/12/07/deciding-on-the-features/</guid>
		<description><![CDATA[So what do you want to be in your blog? Just the basics please. We will add features as we move along.
We want

A list of all the pages
A detail view of each post
Ability for the blog owner to post
Comments!

Lets get it done.
       ]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>So what do you want to be in your blog? Just the basics please. We will add features as we move along.<br />
We want</p>
<ol>
<li>A list of all the pages</li>
<li>A detail view of each post</li>
<li>Ability for the blog owner to post</li>
<li>Comments!</li>
</ol>
<p>Lets get it done.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shabda.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shabda.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shabda.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shabda.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shabda.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shabda.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shabda.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shabda.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shabda.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shabda.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shabda.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shabda.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=2weeksofdjango.com&blog=34423&post=16&subd=shabda&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://2weeksofdjango.com/2007/12/07/deciding-on-the-features/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Building a Django blog.</title>
		<link>http://2weeksofdjango.com/2007/12/07/building-a-django-blog/</link>
		<comments>http://2weeksofdjango.com/2007/12/07/building-a-django-blog/#comments</comments>
		<pubDate>Fri, 07 Dec 2007 12:44:52 +0000</pubDate>
		<dc:creator>shabda</dc:creator>
		
		<category><![CDATA[django]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://2weeksofdjango.com/2007/12/07/building-a-django-blog/</guid>
		<description><![CDATA[Some days ago James Bennett asked &#8220;Where is Django’s blog application&#8220;. And he replies
there is no “definitive” Django blogging application; there are a bunch of them available if you go looking, but you’re not likely to get anyone to recommend one of them as “the” Django blogging app
Well, this is what we are going to [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Some days ago James Bennett asked &#8220;<a href="http://www.b-list.org/weblog/2007/nov/29/django-blog/" title="Django blog application.">Where is Django’s blog application</a>&#8220;. And he replies</p>
<blockquote><p>there is no “definitive” Django blogging application; there are a bunch of them available if you go looking, but you’re not likely to get anyone to recommend one of them as “the” Django blogging app</p></blockquote>
<p>Well, this is what we are going to build. The definitive django blogging application. In 14 days. In Django. Because we are perfectionists, because we have a deadline.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shabda.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shabda.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shabda.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shabda.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shabda.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shabda.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shabda.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shabda.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shabda.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shabda.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shabda.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shabda.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=2weeksofdjango.com&blog=34423&post=15&subd=shabda&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://2weeksofdjango.com/2007/12/07/building-a-django-blog/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>