<?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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Agile Web Development</title>
	<atom:link href="http://agileweb.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://agileweb.wordpress.com</link>
	<description>web is agile... so is the development</description>
	<lastBuildDate>Wed, 29 Apr 2009 10:07:40 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='agileweb.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/b884e3e0577db2fded32cade6636e8d5?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Agile Web Development</title>
		<link>http://agileweb.wordpress.com</link>
	</image>
			<item>
		<title>Step by Step Guide to use Sign in with Twitter with Django</title>
		<link>http://agileweb.wordpress.com/2009/04/28/step-by-step-guide-to-use-sign-in-with-twitter-with-django/</link>
		<comments>http://agileweb.wordpress.com/2009/04/28/step-by-step-guide-to-use-sign-in-with-twitter-with-django/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 21:22:44 +0000</pubDate>
		<dc:creator>Hameedullah Khan</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[OAuth]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[authentication backend]]></category>
		<category><![CDATA[django authentication]]></category>
		<category><![CDATA[sign-in]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[twitter auth]]></category>

		<guid isPermaLink="false">http://agileweb.wordpress.com/?p=123</guid>
		<description><![CDATA[If you will have a look at OAuth examples on twitter apiwiki there are already examples available to use Sign in with Twitter with Django, so why this new howto and example code. Because being a perfectionist I like things to be the standard way, so for authentication django allows you to specify your own [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agileweb.wordpress.com&blog=3431341&post=123&subd=agileweb&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If you will have a look at OAuth examples on <a href="http://apiwiki.twitter.com" target="_blank">twitter apiwiki</a> there are already examples available to use Sign in with Twitter with Django, so why this new howto and example code. Because being a perfectionist I like things to be the standard way, so for authentication django allows you to specify your own customized authentication backends. I thought why should not that be utilized to authenticate the Django User object with twitter.</p>
<p>There are few pre-requisites listed below in the order they are needed:</p>
<ul>
<li><a href="http://pypi.python.org/pypi/simplejson/">simplejson</a></li>
<li><a href="http://oauth.googlecode.com/svn/code/python/oauth/">oauth</a></li>
<li><a href="http://code.google.com/p/python-twitter/">python-twitter</a></li>
<li><a href="http://code.google.com/p/oauth-python-twitter/">oauth-python-twitter</a></li>
<li><a href="http://www.djangosnippets.org/snippets/1473/">TwitterBackend</a> from djangosnippets.org</li>
</ul>
<p>This guide assumes that simplejson, oauth, python-twitter and oauth-python-twitter are already on your python path.</p>
<p>1. Now create a new Django project: twitterapp</p>
<p><code>django-admin startproject</code></p>
<p>2. Change to the project directory.</p>
<p>3. Now start a new app inside the project</p>
<p><code>python manage.py startapp twitterauth</code></p>
<p>4. Create a new directory: backends</p>
<p><code>mkdir backends</code></p>
<p>5. Change to the backends directory and create 2 new empty files.</p>
<p><code>cd backends<br />
touch __init__.py<br />
touch twitteroauth.py</code></p>
<p>6. Copy the code from <a href="http://www.djangosnippets.org/snippets/1473/" target="_blank">TwitterBackend</a> into the empty file: twitteroauth.py</p>
<p>7. Now configure your settings.py and add/edit following configuration variables</p>
<pre class="brush: python;">
CONSUMER_KEY = &quot;Your consumer key from twitter&quot;

CONSUMER_SECRET = &quot;You consumer secret from twitter&quot;

AUTHENTICATION_BACKENDS = (
    'backends.twitteroauth.TwitterBackend',
    'django.contrib.auth.backends.ModelBackend',
)

AUTH_PROFILE_MODULE = &quot;twitterauth.UserProfile&quot;
</pre>
<p>8. Now goto the twitterauth app directory and create a UserProfile module and post save signal processor as follows:</p>
<pre class="brush: python;">
from django.db import models
from django.db.models.signals import post_save
from django.contrib.auth.models import User
class UserProfile(models.Model):
	user = models.ForeignKey(User)
	access_token = models.CharField(max_length=255, blank=True, null=True, editable=False)
	profile_image_url = models.URLField(blank=True, null=True)
	location = models.CharField(max_length=100, blank=True, null=True)
	url = models.URLField(blank=True, null=True)
	description = models.CharField(max_length=160, blank=True, null=True)

	def __str__(self):
		return &quot;%s's profile&quot; % self.user

def create_user_profile(sender, instance, created, **kwargs):
	if created:
		profile, created = UserProfile.objects.get_or_create(user=instance)

post_save.connect(create_user_profile, sender=User)
</pre>
<p>9. Now modify your views.py in twitterauth app directory as following:</p>
<pre class="brush: python;">
from django.conf import settings
from django.http import HttpResponseRedirect, HttpResponse
from django.contrib.auth import login, authenticate

from oauthtwitter import OAuthApi
import oauth

CONSUMER_KEY = getattr(settings, 'CONSUMER_KEY', 'YOUR_KEY')
CONSUMER_SECRET = getattr(settings, 'CONSUMER_SECRET', 'YOUR_SECRET')

def twitter_signin(request):
	twitter = OAuthApi(CONSUMER_KEY, CONSUMER_SECRET)
	request_token = twitter.getRequestToken()
	request.session['request_token'] = request_token.to_string()
	signin_url = twitter.getSigninURL(request_token)
	return HttpResponseRedirect(signin_url)

def twitter_return(request):
	request_token = request.session.get('request_token', None)

	# If there is no request_token for session,
	#    means we didn't redirect user to twitter
	if not request_token:
		# Redirect the user to the login page,
		# So the user can click on the sign-in with twitter button
		return HttpResponse(&quot;We didn't redirect you to twitter...&quot;)

	token = oauth.OAuthToken.from_string(request_token)

	# If the token from session and token from twitter does not match
	#   means something bad happened to tokens
	if token.key != request.GET.get('oauth_token', 'no-token'):
		del request.session['request_token']
		# Redirect the user to the login page
		return HttpResponse(&quot;Something wrong! Tokens do not match...&quot;)

	twitter = OAuthApi(CONSUMER_KEY, CONSUMER_SECRET, token)
	access_token = twitter.getAccessToken()

	request.session['access_token'] = access_token.to_string()
	auth_user = authenticate(access_token=access_token)

	# if user is authenticated then login user
	if auth_user:
		login(request, auth_user)
	else:
		# We were not able to authenticate user
		# Redirect to login page
		del request.session['access_token']
		del request.session['request_token']
		return HttpResponse(&quot;Unable to authenticate you!&quot;)

	# authentication was successful, use is now logged in
	return HttpResponse(&quot;You are logged in&quot;)
</pre>
<p>10. Add the following 2 lines to urls.py at correct location.</p>
<pre class="brush: python;">
    url('^login/$', twitter_signin, name='login'),
    url('^return/$', twitter_return, name='return'),
</pre>
<p>11. Now start the django devevelopment server</p>
<p><code>python manage.py runserver<br />
</code></p>
<p>12. Goto http://localhost:8000/login and you will be redirected to user for authentication, and if everything wents well you will see the message that your are logged in.</p>
<p>
If you like this post:<br />
<a href="http://del.icio.us/post?url=http://agileweb.wordpress.com/2009/04/28/step-by-step-guide-to-use-sign-in-with-twitter-with-django/;title=Step by Step Guide to use Sign in with Twitter with Django"><img src="http://agileweb.files.wordpress.com/2008/07/delicious.gif" border="0" alt="add to del.icio.us" title="del.icio.us:Step by Step Guide to use Sign in with Twitter with Django" /></a> :: <a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Description=&amp;Url=http://agileweb.wordpress.com/2009/04/28/step-by-step-guide-to-use-sign-in-with-twitter-with-django/;Title=Step by Step Guide to use Sign in with Twitter with Django"><img src="http://agileweb.files.wordpress.com/2008/07/blinklist.gif" border="0" alt="Add to Blinkslist" title="blinklist:Step by Step Guide to use Sign in with Twitter with Django" /></a> :: <a href="http://www.furl.net/storeIt.jsp?u=http://agileweb.wordpress.com/2009/04/28/step-by-step-guide-to-use-sign-in-with-twitter-with-django/;t=Step by Step Guide to use Sign in with Twitter with Django"><img src="http://agileweb.files.wordpress.com/2008/07/furl.gif" border="0" alt="add to furl" title="furl:Step by Step Guide to use Sign in with Twitter with Django" /></a> :: <a href="http://digg.com/submit?phase=2&amp;url=http://agileweb.wordpress.com/2009/04/28/step-by-step-guide-to-use-sign-in-with-twitter-with-django/"><img src="http://agileweb.files.wordpress.com/2008/07/digg.gif" border="0" alt="Digg it" title="Digg it:Step by Step Guide to use Sign in with Twitter with Django" /></a> :: <a href="http://ma.gnolia.com/bookmarklet/add?url=http://agileweb.wordpress.com/2009/04/28/step-by-step-guide-to-use-sign-in-with-twitter-with-django/;title=Step by Step Guide to use Sign in with Twitter with Django"><img src="http://agileweb.files.wordpress.com/2008/07/magnolia.gif" border="0" alt="add to ma.gnolia" title="ma.gnolia:Step by Step Guide to use Sign in with Twitter with Django" /></a> :: <a href="http://www.stumbleupon.com/submit?url=http://agileweb.wordpress.com/2009/04/28/step-by-step-guide-to-use-sign-in-with-twitter-with-django/&amp;title=Step by Step Guide to use Sign in with Twitter with Django"><img src="http://agileweb.files.wordpress.com/2008/07/stumbleit.gif" border="0" alt="Stumble It!" title="Stumble it:Step by Step Guide to use Sign in with Twitter with Django" /></a> :: <a href="http://www.simpy.com/simpy/LinkAdd.do?url=http://agileweb.wordpress.com/2009/04/28/step-by-step-guide-to-use-sign-in-with-twitter-with-django/;title=Step by Step Guide to use Sign in with Twitter with Django"><img src="http://agileweb.files.wordpress.com/2008/07/simpy.png" border="0" alt="add to simpy" title="simpy:Step by Step Guide to use Sign in with Twitter with Django" /></a> :: <a href="http://www.newsvine.com/_tools/seed&amp;save?url=http://agileweb.wordpress.com/2009/04/28/step-by-step-guide-to-use-sign-in-with-twitter-with-django/;title=Step by Step Guide to use Sign in with Twitter with Django"><img src="http://agileweb.files.wordpress.com/2008/07/newsvine.gif" border="0" alt="seed the vine" title="newsvine:Step by Step Guide to use Sign in with Twitter with Django" /></a> :: <a href="http://reddit.com/submit?url=http://agileweb.wordpress.com/2009/04/28/step-by-step-guide-to-use-sign-in-with-twitter-with-django/;title=Step by Step Guide to use Sign in with Twitter with Django"><img src="http://agileweb.files.wordpress.com/2008/07/reddit.gif" title="reddit:Step by Step Guide to use Sign in with Twitter with Django" border="0" alt="reddit" /></a> :: <a href="http://cgi.fark.com/cgi/fark/edit.pl?new_url=http://agileweb.wordpress.com/2009/04/28/step-by-step-guide-to-use-sign-in-with-twitter-with-django/;new_comment=Step by Step Guide to use Sign in with Twitter with Django"><img src="http://agileweb.files.wordpress.com/2008/07/fark.png" border="0" alt="fark" title="fark:Step by Step Guide to use Sign in with Twitter with Django" /></a> :: <a href="http://tailrank.com/share/?text=&amp;link_href=http://agileweb.wordpress.com/2009/04/28/step-by-step-guide-to-use-sign-in-with-twitter-with-django/&amp;title=Step by Step Guide to use Sign in with Twitter with Django" title="TailRank"><img src="http://agileweb.files.wordpress.com/2008/07/tailrank.gif" border="0" alt="TailRank"></a> :: <a href="http://www.facebook.com/sharer.php?u=http://agileweb.wordpress.com/2009/04/28/step-by-step-guide-to-use-sign-in-with-twitter-with-django/&amp;t=Step by Step Guide to use Sign in with Twitter with Django"><img src="http://sunburntkamel.files.wordpress.com/2008/02/facebookcom.gif" border="0" alt="post to facebook" title="facebook:Step by Step Guide to use Sign in with Twitter with Django" /></a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/agileweb.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/agileweb.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/agileweb.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/agileweb.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/agileweb.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/agileweb.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/agileweb.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/agileweb.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/agileweb.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/agileweb.wordpress.com/123/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agileweb.wordpress.com&blog=3431341&post=123&subd=agileweb&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://agileweb.wordpress.com/2009/04/28/step-by-step-guide-to-use-sign-in-with-twitter-with-django/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc3f3564098a9360787d2679cca2afa1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hameedkhan</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/delicious.gif" medium="image">
			<media:title type="html">del.icio.us:Step by Step Guide to use Sign in with Twitter with Django</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/blinklist.gif" medium="image">
			<media:title type="html">blinklist:Step by Step Guide to use Sign in with Twitter with Django</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/furl.gif" medium="image">
			<media:title type="html">furl:Step by Step Guide to use Sign in with Twitter with Django</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/digg.gif" medium="image">
			<media:title type="html">Digg it:Step by Step Guide to use Sign in with Twitter with Django</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/magnolia.gif" medium="image">
			<media:title type="html">ma.gnolia:Step by Step Guide to use Sign in with Twitter with Django</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/stumbleit.gif" medium="image">
			<media:title type="html">Stumble it:Step by Step Guide to use Sign in with Twitter with Django</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/simpy.png" medium="image">
			<media:title type="html">simpy:Step by Step Guide to use Sign in with Twitter with Django</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/newsvine.gif" medium="image">
			<media:title type="html">newsvine:Step by Step Guide to use Sign in with Twitter with Django</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/reddit.gif" medium="image">
			<media:title type="html">reddit:Step by Step Guide to use Sign in with Twitter with Django</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/fark.png" medium="image">
			<media:title type="html">fark:Step by Step Guide to use Sign in with Twitter with Django</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/tailrank.gif" medium="image">
			<media:title type="html">TailRank</media:title>
		</media:content>

		<media:content url="http://sunburntkamel.files.wordpress.com/2008/02/facebookcom.gif" medium="image">
			<media:title type="html">facebook:Step by Step Guide to use Sign in with Twitter with Django</media:title>
		</media:content>
	</item>
		<item>
		<title>How to use oauth-python-twitter</title>
		<link>http://agileweb.wordpress.com/2009/04/28/how-to-use-oauth-python-twitter/</link>
		<comments>http://agileweb.wordpress.com/2009/04/28/how-to-use-oauth-python-twitter/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 16:18:05 +0000</pubDate>
		<dc:creator>Hameedullah Khan</dc:creator>
				<category><![CDATA[OAuth]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://agileweb.wordpress.com/2009/04/28/how-to-use-oauth-python-twitter/</guid>
		<description><![CDATA[Using OAuth for authentication is quite different then using Basic Auth in many ways, first major difference is that one don&#8217;t know the username until it is requested from twitter after completing the authentication process.
Details
You will need following information to start.

Consumer Key
Consumer Secret

If you do not have above, you can request them from here: http://twitter.com/oauth_clients
The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agileweb.wordpress.com&blog=3431341&post=113&subd=agileweb&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Using OAuth for authentication is quite different then using Basic Auth in many ways, first major difference is that one don&#8217;t know the username until it is requested from twitter after completing the authentication process.</p>
<h1>Details</h1>
<p>You will need following information to start.</p>
<ul>
<li>Consumer Key</li>
<li>Consumer Secret</li>
</ul>
<p>If you do not have above, you can request them from here: <a href="http://twitter.com/oauth_clients">http://twitter.com/oauth_clients</a></p>
<p>The following are the steps that should be performed to authenticate user and get user information from twitter, the rest is same as using python-twitter.</p>
<ul>
<li>Get the Request Token from twitter</li>
<li>Get Authorization URL</li>
<li>Get the Access Token from twitter</li>
<li>Get user information</li>
</ul>
<h3>Get the Request Token from twitter</h3>
<p><code><br />
twitter = OAuthApi(CONSUMER_KEY, CONSUMER_SECRET)</p>
<p>request_token = twitter.getRequestToken()<br />
</code></p>
<h3>Get Authorization URL</h3>
<p>using same request_token from previous step</p>
<p><code>authorization_url = twitter.getAuthorizationURL(request_token)</code></p>
<p>Now send the user to authorization URL, for allowing access to the application.</p>
<h3>Get the Access Token from twitter</h3>
<p>Once the user return from twitter, we need to request the access_token from twitter for futher aunthenticated api calls on behalf of user.</p>
<p>NOTE: Need to create the new instance of OAuthApi using request_token from first step.</p>
<p><code>twitter = OAuthApi(CONSUMER_KEY, CONSUMER_SECRET, request_token)</p>
<p>access_token = twitter.getAccessToken()</code></p>
<h3>Get user information</h3>
<p>This api call was not present in python-twitter and the user info call expected that there we know the username before making call, but this is not the case with OAuth, so we have to request User Information so we can use it in our application.</p>
<p>NOTE: Need to create the new instance of OAuthApi using access_token from last step.<br />
<code><br />
twitter = OAuthApi(CONSUMER_KEY, CONSUMER_SECRET, access_token)</p>
<p>user = twitter.GetUserInfo()</code></p>
<p>Now use the rest of python-twitter api calls as you used to use them with basic authentication, for more information see the wiki at:<a rel="nofollow" href="http://code.google.com/p/python-twitter">http://code.google.com/p/python-twitter</a></p>
<p>If you like this post, share it with others:<br />
<a href="http://del.icio.us/post?url=http://agileweb.wordpress.com/2009/04/28/how-to-use-oauth-python-twitter/;title=How to use oauth-python-twitter"><img src="http://agileweb.files.wordpress.com/2008/07/delicious.gif" border="0" alt="add to del.icio.us" title="del.icio.us:How to use oauth-python-twitter" /></a> :: <a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Description=&amp;Url=http://agileweb.wordpress.com/2009/04/28/how-to-use-oauth-python-twitter/;Title=How to use oauth-python-twitter"><img src="http://agileweb.files.wordpress.com/2008/07/blinklist.gif" border="0" alt="Add to Blinkslist" title="blinklist:How to use oauth-python-twitter" /></a> :: <a href="http://www.furl.net/storeIt.jsp?u=http://agileweb.wordpress.com/2009/04/28/how-to-use-oauth-python-twitter/;t=How to use oauth-python-twitter"><img src="http://agileweb.files.wordpress.com/2008/07/furl.gif" border="0" alt="add to furl" title="furl:How to use oauth-python-twitter" /></a> :: <a href="http://digg.com/submit?phase=2&amp;url=http://agileweb.wordpress.com/2009/04/28/how-to-use-oauth-python-twitter/"><img src="http://agileweb.files.wordpress.com/2008/07/digg.gif" border="0" alt="Digg it" title="Digg it:How to use oauth-python-twitter" /></a> :: <a href="http://ma.gnolia.com/bookmarklet/add?url=http://agileweb.wordpress.com/2009/04/28/how-to-use-oauth-python-twitter/;title=How to use oauth-python-twitter"><img src="http://agileweb.files.wordpress.com/2008/07/magnolia.gif" border="0" alt="add to ma.gnolia" title="ma.gnolia:How to use oauth-python-twitter" /></a> :: <a href="http://www.stumbleupon.com/submit?url=http://agileweb.wordpress.com/2009/04/28/how-to-use-oauth-python-twitter/&amp;title=How to use oauth-python-twitter"><img src="http://agileweb.files.wordpress.com/2008/07/stumbleit.gif" border="0" alt="Stumble It!" title="Stumble it:How to use oauth-python-twitter" /></a> :: <a href="http://www.simpy.com/simpy/LinkAdd.do?url=http://agileweb.wordpress.com/2009/04/28/how-to-use-oauth-python-twitter/;title=How to use oauth-python-twitter"><img src="http://agileweb.files.wordpress.com/2008/07/simpy.png" border="0" alt="add to simpy" title="simpy:How to use oauth-python-twitter" /></a> :: <a href="http://www.newsvine.com/_tools/seed&amp;save?url=http://agileweb.wordpress.com/2009/04/28/how-to-use-oauth-python-twitter/;title=How to use oauth-python-twitter"><img src="http://agileweb.files.wordpress.com/2008/07/newsvine.gif" border="0" alt="seed the vine" title="newsvine:How to use oauth-python-twitter" /></a> :: <a href="http://reddit.com/submit?url=http://agileweb.wordpress.com/2009/04/28/how-to-use-oauth-python-twitter/;title=How to use oauth-python-twitter"><img src="http://agileweb.files.wordpress.com/2008/07/reddit.gif" title="reddit:How to use oauth-python-twitter" border="0" alt="reddit" /></a> :: <a href="http://cgi.fark.com/cgi/fark/edit.pl?new_url=http://agileweb.wordpress.com/2009/04/28/how-to-use-oauth-python-twitter/;new_comment=How to use oauth-python-twitter"><img src="http://agileweb.files.wordpress.com/2008/07/fark.png" border="0" alt="fark" title="fark:How to use oauth-python-twitter" /></a> :: <a href="http://tailrank.com/share/?text=&amp;link_href=http://agileweb.wordpress.com/2009/04/28/how-to-use-oauth-python-twitter/&amp;title=How to use oauth-python-twitter" title="TailRank"><img src="http://agileweb.files.wordpress.com/2008/07/tailrank.gif" border="0" alt="TailRank"></a> :: <a href="http://www.facebook.com/sharer.php?u=http://agileweb.wordpress.com/2009/04/28/how-to-use-oauth-python-twitter/&amp;t=How to use oauth-python-twitter"><img src="http://sunburntkamel.files.wordpress.com/2008/02/facebookcom.gif" border="0" alt="post to facebook" title="facebook:How to use oauth-python-twitter" /></a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/agileweb.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/agileweb.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/agileweb.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/agileweb.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/agileweb.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/agileweb.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/agileweb.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/agileweb.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/agileweb.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/agileweb.wordpress.com/113/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agileweb.wordpress.com&blog=3431341&post=113&subd=agileweb&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://agileweb.wordpress.com/2009/04/28/how-to-use-oauth-python-twitter/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc3f3564098a9360787d2679cca2afa1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hameedkhan</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/delicious.gif" medium="image">
			<media:title type="html">del.icio.us:How to use oauth-python-twitter</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/blinklist.gif" medium="image">
			<media:title type="html">blinklist:How to use oauth-python-twitter</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/furl.gif" medium="image">
			<media:title type="html">furl:How to use oauth-python-twitter</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/digg.gif" medium="image">
			<media:title type="html">Digg it:How to use oauth-python-twitter</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/magnolia.gif" medium="image">
			<media:title type="html">ma.gnolia:How to use oauth-python-twitter</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/stumbleit.gif" medium="image">
			<media:title type="html">Stumble it:How to use oauth-python-twitter</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/simpy.png" medium="image">
			<media:title type="html">simpy:How to use oauth-python-twitter</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/newsvine.gif" medium="image">
			<media:title type="html">newsvine:How to use oauth-python-twitter</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/reddit.gif" medium="image">
			<media:title type="html">reddit:How to use oauth-python-twitter</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/fark.png" medium="image">
			<media:title type="html">fark:How to use oauth-python-twitter</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/tailrank.gif" medium="image">
			<media:title type="html">TailRank</media:title>
		</media:content>

		<media:content url="http://sunburntkamel.files.wordpress.com/2008/02/facebookcom.gif" medium="image">
			<media:title type="html">facebook:How to use oauth-python-twitter</media:title>
		</media:content>
	</item>
		<item>
		<title>OAuthApi, an OAuth Extension to python-twitter</title>
		<link>http://agileweb.wordpress.com/2009/04/27/oauthapi-an-oauth-extension-to-python-twitter/</link>
		<comments>http://agileweb.wordpress.com/2009/04/27/oauthapi-an-oauth-extension-to-python-twitter/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 09:15:21 +0000</pubDate>
		<dc:creator>Hameedullah Khan</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[OAuth]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[python-twitter]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://agileweb.wordpress.com/?p=110</guid>
		<description><![CDATA[If you are a python developer and you tried to develop some application for twitter, you must have came acrossed python-twitter. Which provides you a pythonic interface to twitter, by allowing you to access almost all twitter objects as python objects. python-twitter is still in devleopment, and hence still does not have the OAuth compatibility. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agileweb.wordpress.com&blog=3431341&post=110&subd=agileweb&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If you are a python developer and you tried to develop some application for twitter, you must have came acrossed python-twitter. Which provides you a pythonic interface to twitter, by allowing you to access almost all twitter objects as python objects. python-twitter is still in devleopment, and hence still does not have the OAuth compatibility. I am being a oauth pro, deicided to write a derived class from python-twitter, to allow OAuth to be used as the authentication mechnism for python-twitter.</p>
<p>python-twitter is being developed by our beloved google&#8217;s employee: <tt><a id="Python_Twitter"><tt>DeWitt Clinton</tt></a></tt></p>
<p>You can get the python-twitter at: <a href="http://code.google.com/p/python-twitter/">python-twitter</a></p>
<p>You can get the oauth extension to python-twitter at: <a href="http://code.google.com/p/oauth-python-twitter/">oauth-python-twitter</a></p>
<p>In the next following posts I will posting about how I am using it with Django specifically and how I have writter my TwitterAuthBackend for Django. The whole purpose of publishing the code is to get improvements and reviews on the code, so I have allowed non-members to review the above project on code.google.com, you are more then welcome to post your coments here or review the code on the project. Let me know if you don&#8217;t understand anything by asking questions in comments.</p>
<p>P.S I have used the same license as was used for python-twitter.</p>
<p>Happy twittering and developing <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/agileweb.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/agileweb.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/agileweb.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/agileweb.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/agileweb.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/agileweb.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/agileweb.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/agileweb.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/agileweb.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/agileweb.wordpress.com/110/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agileweb.wordpress.com&blog=3431341&post=110&subd=agileweb&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://agileweb.wordpress.com/2009/04/27/oauthapi-an-oauth-extension-to-python-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc3f3564098a9360787d2679cca2afa1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hameedkhan</media:title>
		</media:content>
	</item>
		<item>
		<title>Google App Engine: Do not let your engine stop</title>
		<link>http://agileweb.wordpress.com/2008/09/07/google-app-engine-do-not-let-your-engine-stop/</link>
		<comments>http://agileweb.wordpress.com/2008/09/07/google-app-engine-do-not-let-your-engine-stop/#comments</comments>
		<pubDate>Sun, 07 Sep 2008 22:33:26 +0000</pubDate>
		<dc:creator>AD</dc:creator>
				<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[SDK]]></category>

		<guid isPermaLink="false">http://agileweb.wordpress.com/?p=107</guid>
		<description><![CDATA[As you all might have noticed that I was not posting for a while now, actually had been taken overy by few projects. But today I thought to post about the updates from Google App Engine. Google App Engine have released the Cookbook where you can submit your recipies or can benefit from other people&#8217;s [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agileweb.wordpress.com&blog=3431341&post=107&subd=agileweb&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>As you all might have noticed that I was not posting for a while now, actually had been taken overy by few projects. But today I thought to post about the updates from Google App Engine. Google App Engine have released the <a href="http://googleappengine.blogspot.com/2008/08/our-favorite-recipes-for-app-engine-all.html">Cookbook</a> where you can submit your recipies or can benefit from other people&#8217;s snippets of code.</p>
<p>One more thing that Google App Engine team has done which is really useful, they have included the <a href="http://googleappengine.blogspot.com/2008/08/take-it-with-you-whole-kit-and-caboodle.html">documentation with SDK</a>, so if you are offline you will still have access to SDK. This will not let your engine stops even if you are not connected to internet.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/agileweb.wordpress.com/107/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/agileweb.wordpress.com/107/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/agileweb.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/agileweb.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/agileweb.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/agileweb.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/agileweb.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/agileweb.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/agileweb.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/agileweb.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/agileweb.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/agileweb.wordpress.com/107/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agileweb.wordpress.com&blog=3431341&post=107&subd=agileweb&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://agileweb.wordpress.com/2008/09/07/google-app-engine-do-not-let-your-engine-stop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ef1ebd53d304bd454dee5e4a93cbb317?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">AD</media:title>
		</media:content>
	</item>
		<item>
		<title>Google App Engine is getting popularity.</title>
		<link>http://agileweb.wordpress.com/2008/08/07/google-app-engine-is-getting-popularity/</link>
		<comments>http://agileweb.wordpress.com/2008/08/07/google-app-engine-is-getting-popularity/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 17:00:50 +0000</pubDate>
		<dc:creator>Hameedullah Khan</dc:creator>
				<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://agileweb.wordpress.com/?p=105</guid>
		<description><![CDATA[If you haven&#8217;t been following Google App Engine Blog, according to latest post the Google App Engine is getting popularity and many programmers are learning python just to play with App Engine. According to Marzia Niccolai on Google App Engine Blog:
I&#8217;ve returned from the App Engine hack-a-thon in Chicago a Superfan of the App Engine [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agileweb.wordpress.com&blog=3431341&post=105&subd=agileweb&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If you haven&#8217;t been following Google App Engine Blog, according to latest post the Google App Engine is getting popularity and many programmers are learning python just to play with App Engine. According to <a href="http://googleappengine.blogspot.com/2008/08/deep-dish-on-app-engine-developer.html">Marzia Niccolai on Google App Engine Blog</a>:</p>
<blockquote><p>I&#8217;ve returned from the App Engine hack-a-thon in Chicago a <a href="http://en.wikipedia.org/wiki/Bill_Swerski%27s_Superfans">Superfan</a> of the App Engine community. We had lots of fun meeting App Engine developers, but why let me tell you about it? A couple of attendees wrote great summaries of the day: A <a href="http://addictedtonew.com/archives/298/google-app-engine-chicago-hackathon/">Ruby on Rails developer giving Python a whirl</a>, and <a href="http://farmdev.com/thoughts/52/chicago-s-google-app-engine-hack-a-thon-recap/">a developer who worked on testing with App Engine</a>. We saw people working on iPhone apps, OpenSocial and App Engine, and even a chat application!</p></blockquote>
<p>So, if you want to host your application on reliable Google platform then you gotta learn Python to make your next app in Google App Engine. Google App Engine is going to be the next big thing if they started supporting rest of the languages like PHP, Ruby and Perl which they have already promised. So stay tuned.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/agileweb.wordpress.com/105/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/agileweb.wordpress.com/105/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/agileweb.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/agileweb.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/agileweb.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/agileweb.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/agileweb.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/agileweb.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/agileweb.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/agileweb.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/agileweb.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/agileweb.wordpress.com/105/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agileweb.wordpress.com&blog=3431341&post=105&subd=agileweb&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://agileweb.wordpress.com/2008/08/07/google-app-engine-is-getting-popularity/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc3f3564098a9360787d2679cca2afa1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hameedkhan</media:title>
		</media:content>
	</item>
		<item>
		<title>Rails 2.1 introdcution with scaffolding</title>
		<link>http://agileweb.wordpress.com/2008/07/25/rails-21-introdcution-with-scaffolding/</link>
		<comments>http://agileweb.wordpress.com/2008/07/25/rails-21-introdcution-with-scaffolding/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 06:51:27 +0000</pubDate>
		<dc:creator>Hameedullah Khan</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[agile web development]]></category>
		<category><![CDATA[rails 2.1]]></category>
		<category><![CDATA[rails scaffolding]]></category>
		<category><![CDATA[rails tutorial]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://agileweb.wordpress.com/?p=67</guid>
		<description><![CDATA[Okay, after settig up rails 2.1 we are now ready to start our rails journey. So lets begin with a simple blog application. If you are thinking why are we not following the tradition of &#8220;Hello World&#8221; project here,  the answer is simple, because you can find it all over the internet. For the sake [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agileweb.wordpress.com&blog=3431341&post=67&subd=agileweb&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Okay, after settig up rails 2.1 we are now ready to start our rails journey. So lets begin with a simple blog application. If you are thinking why are we not following the tradition of &#8220;Hello World&#8221; project here,  the answer is simple, because you can find it all over the internet. For the sake of simplicity of this beginner introduction we assume we just want to create posts and add comments to our blog. No categories and no other bells and whistles, because the main point is to learn rails 2.1 neither to learn how to create a blog.<span id="more-67"></span><br />
<br />&nbsp;</p>
<h2>Creating the project</h2>
<p>First thing is to create rails project and for this purpose we use rails command. But there is one thing you need to remember by default rails setup the project&#8217;s database to sqlite, so you need to change it to mysql by using the -d option with rails command, so lets create our project.</p>
<p><strong>Command:</strong></p>
<p><code>rails -d mysql bloggy</code></p>
<p>You will see bunch of lines passing by on your screen, these are all messages from rails about creating the directory structure that is required to build our web app in rails. If you will view your directory listing now you will find a new directory bloggy there, this directory contains subdirectories and files that are being created by the above command. Now change your directory to the bloggy directory.</p>
<p><strong>NOTE:</strong> This is important because from now on we will assume that we are in bloggy directory.</p>
<h3>Directory Structure</h3>
<p>There are 2 directories that are of our interest for now and those are app and config. First talk about config directory, it contains configuration files which you never need to change if you follow purely rails way of developing your web application. But the important files there are database.yml, environment.rb and routes.rb. We will see later what these files are for but for now just remember that they are in the config sub directory under our main project directory.</p>
<h3>Role of the Controllers</h3>
<p>The other sub-direcotry app contains 4 other sub directories, controllers, models, helpers and views. As rails uses MVC approach for development the code is separated in those sub directories. Controllers have all the decision powers and they are called controller because as soon as rails gets a request the first thing it do is matches the url against routes.rb file in config directory and then give the control to the respective controller and from there controller decides what model to call and what view to use. Now you must be asking what are models?</p>
<h3>What are Rails Models?</h3>
<p>Models are interface to your database, so instead of writing SQL in your app you use model objects. You create class which represents table in your database, you instantiate class in your code and that represents a row in the table, and attributes of that object represents columns of that row. So you don&#8217;t write SQL at all just use Models to talk with your database. Now lets get to know what are views so we can gets our hand wet with some rails in practical.</p>
<h3>What are Rails Views?</h3>
<p>Views contain the code that will create your site&#8217;s interface, that is actually viewable by user and hence view sub directory contains further sub directories which contain html + some ruby code for that controller.</p>
<h3>Convention over Configuration</h3>
<p>Although Rails prefers convention over configuration, so if you just place everything in its place you just have to worry about coding your app rather then to change any configuration files. But there is one configuration file that needs to be changed, that is your database configuration file database.yml which is located in config directory. By default database.yml contains following:</p>
<p><code># MySQL.  Versions 4.1 and 5.0 are recommended.<br />
#<br />
# Install the MySQL driver:<br />
#   gem install mysql<br />
# On Mac OS X:<br />
#   sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql<br />
# On Mac OS X Leopard:<br />
#   sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config<br />
#       This sets the ARCHFLAGS environment variable to your native architecture<br />
# On Windows:<br />
#   gem install mysql<br />
#       Choose the win32 build.<br />
#       Install MySQL and put its /bin directory on your path.<br />
#<br />
# And be sure to use new-style password hashing:<br />
#   http://dev.mysql.com/doc/refman/5.0/en/old-client.html<br />
development:<br />
adapter: mysql<br />
encoding: utf8<br />
database: bloggy_development<br />
username: root<br />
password:<br />
socket: /var/run/mysqld/mysqld.sock</code><br />
&#8230;rest of the file skipped&#8230;</p>
<p>The lines starting with &#8216;#&#8217; are comments and followed by the first comment block is the development database clause and that is what we are interested for now. The other databases are production and test, the name suggests what they are used for. So our main concerned now is development db as we are still in the development stage. So now we should provide valid credentials for development database, the file is self explanatory and hopefully you know how to edit text files and save them. So update your database.yml with correct credentials and save the file.</p>
<h3>Creating the databae</h3>
<p>Now run the following rake command to create the database for your application.</p>
<p><code>rake db:create</code></p>
<p>Don&#8217;t worry about rake its just a &#8220;make&#8221; like utility which allows you to perform common rails tasks without worrying much about them. So now we have our rails project and database ready. Now we will generate some scaffolds.</p>
<h3>Generating Scaffolds</h3>
<p>Now there is one more directory that I want to introduce to you, the script sub directory under your project main directory. The script directory contains scripts to allow you to interact with your rails framework. The few main scripts are server (a development web server that allows you to quickly test your app via browser), console (load your rails environment and then gives you ruby prompt) and generate (this is your friend who writes code for you <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ). So we know that generate script is our friend so how do we use it?</p>
<p>Back to our blog application what models to we need? As we decided earlier we will only allow posts and comments. So that means 2 models a Post model and a Comment model. So, first we will create the scaffolding for our Post model. Following table lists the attributes we need for our Post model.</p>
<blockquote><p>Attribute  |   Type    |   MySQL Type<br />
title             string         varchar<br />
body            text            text</p></blockquote>
<p>Now to the practical part of it, how to create the scaffolding for the above model. The new scaffolding that has been introduced in Rails 2.1 has following syntax</p>
<p><code>ruby script/generate scaffold ModelName [field:type field:type ...]</code></p>
<p>We know our fields and types, so we will generate our scaffolding like following:</p>
<p><code>ruby script/generate scaffold Post title:string body:text</code></p>
<p>This will again show you bunch of lines on your screen showing what files has been created. We are almost done, just need to create the post table in our database, in rails terminology migrate our db to current version. And to accomplish this we will again use rake, so the following command will migrate our database to the most current version.</p>
<p><code>rake db:migrate</code></p>
<p>We are done with our scaffolding, now we can test our bloggy app, as it now supports creating posts. In the next part (coming very very soon) I will write how to add comments to the post, that will be part 2 of this post.</p>
<h3>Viewing the outcome</h3>
<p>Now to test our app we have to run the rails development web server using the following command:</p>
<p><code>ruby script/server</code></p>
<p><strong>Output:</strong></p>
<blockquote><p>=&gt; Booting WEBrick&#8230;<br />
=&gt; Rails 2.1.0 application started on http://0.0.0.0:3000<br />
=&gt; Ctrl-C to shutdown server; call with &#8211;help for options<br />
[2008-07-25 11:52:33] INFO  WEBrick 1.3.1<br />
[2008-07-25 11:52:33] INFO  ruby 1.8.6 (2007-09-24) [i486-linux]<br />
[2008-07-25 11:52:33] INFO  WEBrick::HTTPServer#start: pid=4763 port=3000</p></blockquote>
<p>You should see the above output, from the above output we can see our webserver is running on port 3000 so now we will open our web browser and browse to the URL: <em>http://localhost:3000/</em>, you should see &#8220;Welcome aboard&#8221; message from rails that means web server is running fine.</p>
<p><a href="http://agileweb.files.wordpress.com/2008/07/posts-0.png"><img class="size-medium wp-image-82" src="http://agileweb.files.wordpress.com/2008/07/posts-0.png?w=300&#038;h=203" alt="welcome aboard" width="300" height="203" /></a></p>
<p>Now browse to the <em>http://localhost:3000/posts</em> to test our scaffolding that we have generated yet. You should see something like following:</p>
<p><a href="http://agileweb.files.wordpress.com/2008/07/posts-1.png"><img class="size-medium wp-image-83" src="http://agileweb.files.wordpress.com/2008/07/posts-1.png?w=300&#038;h=150" alt="" width="300" height="150" /></a><br />
<br />&nbsp;</p>
<h2>Command Summary:</h2>
<ol>
<li> rails -d mysql bloggy</li>
<li>rake db:create</li>
<li>ruby script/generate scaffold Post title:string body:text</li>
<li>rake db:migrate</li>
<li>ruby script/server</li>
</ol>
<p>&nbsp;</p>
<h2>Practice</h2>
<p>I hope you have been successfully following till here. Now spend sometime getting to know the scaffolding generated, view the code generated for controller, model and views. Get your self familiar with it, ask questions for what you don&#8217;t understand. In the next part we will add comments functionality in our blog app. If you like to be updated you can subscribe to the <a href="http://agileweb.wordpress.com/feed/">feed</a>.<br />
<br />
<a href="http://del.icio.us/post?url=http://agileweb.wordpress.com/2008/07/25/rails-21-introdcution-with-scaffolding/;title=Rails 2.1 introdcution with scaffolding"><img src="http://agileweb.files.wordpress.com/2008/07/delicious.gif" border="0" alt="add to del.icio.us" /></a> <a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Description=&amp;Url=http://agileweb.wordpress.com/2008/07/25/rails-21-introdcution-with-scaffolding/;Title=Rails 2.1 introdcution with scaffolding"><img src="http://agileweb.files.wordpress.com/2008/07/blinklist.gif" border="0" alt="Add to Blinkslist" /></a> <a href="http://www.furl.net/storeIt.jsp?u=http://agileweb.wordpress.com/2008/07/25/rails-21-introdcution-with-scaffolding/;t=Rails 2.1 introdcution with scaffolding"><img src="http://agileweb.files.wordpress.com/2008/07/furl.gif" border="0" alt="add to furl" /></a> <a href="http://digg.com/submit?phase=2&amp;url=http://agileweb.wordpress.com/2008/07/25/rails-21-introdcution-with-scaffolding/"><img src="http://agileweb.files.wordpress.com/2008/07/digg.gif" border="0" alt="Digg it" /></a> <a href="http://ma.gnolia.com/bookmarklet/add?url=http://agileweb.wordpress.com/2008/07/25/rails-21-introdcution-with-scaffolding/;title=Rails 2.1 introdcution with scaffolding"><img src="http://agileweb.files.wordpress.com/2008/07/magnolia.gif" border="0" alt="add to ma.gnolia" /></a> <a href="http://www.stumbleupon.com/submit?url=http://agileweb.wordpress.com/2008/07/25/rails-21-introdcution-with-scaffolding/&amp;title=Rails 2.1 introdcution with scaffolding"><img src="http://agileweb.files.wordpress.com/2008/07/stumbleit.gif" border="0" alt="Stumble It!" /></a> <a href="http://www.simpy.com/simpy/LinkAdd.do?url=http://agileweb.wordpress.com/2008/07/25/rails-21-introdcution-with-scaffolding/;title=Rails 2.1 introdcution with scaffolding"><img src="http://agileweb.files.wordpress.com/2008/07/simpy.png" border="0" alt="add to simpy" /></a> <a href="http://www.newsvine.com/_tools/seed&amp;save?url=http://agileweb.wordpress.com/2008/07/25/rails-21-introdcution-with-scaffolding/;title=Rails 2.1 introdcution with scaffolding"><img src="http://agileweb.files.wordpress.com/2008/07/newsvine.gif" border="0" alt="seed the vine" /></a> <a href="http://reddit.com/submit?url=http://agileweb.wordpress.com/2008/07/25/rails-21-introdcution-with-scaffolding/;title=Rails 2.1 introdcution with scaffolding"><img src="http://agileweb.files.wordpress.com/2008/07/reddit.gif" border="0" alt="reddit" /></a> <a href="http://cgi.fark.com/cgi/fark/edit.pl?new_url=http://agileweb.wordpress.com/2008/07/25/rails-21-introdcution-with-scaffolding/;new_comment=Rails 2.1 introdcution with scaffolding"><img src="http://agileweb.files.wordpress.com/2008/07/fark.png" border="0" alt="fark" /></a> <a href="http://tailrank.com/share/?text=&amp;link_href=http://agileweb.wordpress.com/2008/07/25/rails-21-introdcution-with-scaffolding/&amp;title=Rails 2.1 introdcution with scaffolding" title="TailRank"><img src="http://agileweb.files.wordpress.com/2008/07/tailrank.gif" border="0" alt="TailRank"></a> <a href="http://www.facebook.com/sharer.php?u=http://agileweb.wordpress.com/2008/07/25/rails-21-introdcution-with-scaffolding/&amp;t=Rails 2.1 introdcution with scaffolding"><img src="http://sunburntkamel.files.wordpress.com/2008/02/facebookcom.gif" border="0" alt="post to facebook" /></a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/agileweb.wordpress.com/67/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/agileweb.wordpress.com/67/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/agileweb.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/agileweb.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/agileweb.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/agileweb.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/agileweb.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/agileweb.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/agileweb.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/agileweb.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/agileweb.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/agileweb.wordpress.com/67/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agileweb.wordpress.com&blog=3431341&post=67&subd=agileweb&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://agileweb.wordpress.com/2008/07/25/rails-21-introdcution-with-scaffolding/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc3f3564098a9360787d2679cca2afa1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hameedkhan</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/posts-0.png?w=300" medium="image">
			<media:title type="html">welcome aboard</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/posts-1.png?w=300" medium="image" />

		<media:content url="http://agileweb.files.wordpress.com/2008/07/delicious.gif" medium="image">
			<media:title type="html">add to del.icio.us</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/blinklist.gif" medium="image">
			<media:title type="html">Add to Blinkslist</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/furl.gif" medium="image">
			<media:title type="html">add to furl</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/digg.gif" medium="image">
			<media:title type="html">Digg it</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/magnolia.gif" medium="image">
			<media:title type="html">add to ma.gnolia</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/stumbleit.gif" medium="image">
			<media:title type="html">Stumble It!</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/simpy.png" medium="image">
			<media:title type="html">add to simpy</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/newsvine.gif" medium="image">
			<media:title type="html">seed the vine</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/reddit.gif" medium="image">
			<media:title type="html">reddit</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/fark.png" medium="image">
			<media:title type="html">fark</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/tailrank.gif" medium="image">
			<media:title type="html">TailRank</media:title>
		</media:content>

		<media:content url="http://sunburntkamel.files.wordpress.com/2008/02/facebookcom.gif" medium="image">
			<media:title type="html">post to facebook</media:title>
		</media:content>
	</item>
		<item>
		<title>How to install Rails 2.1 on Ubuntu in 5 steps</title>
		<link>http://agileweb.wordpress.com/2008/07/18/how-to-install-rails-21-on-ubuntu-in-5-steps/</link>
		<comments>http://agileweb.wordpress.com/2008/07/18/how-to-install-rails-21-on-ubuntu-in-5-steps/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 06:41:52 +0000</pubDate>
		<dc:creator>Hameedullah Khan</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rails 2.1]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://agileweb.wordpress.com/?p=16</guid>
		<description><![CDATA[I thought it would be a good idea to start with actually installation of rails 2.1, as many latest linux distributions don&#8217;t come with the latest version of rails which includes Ubuntu 8.04. So in this how to we will cover installation of rails 2.1 on Ubuntu 8.04.
NOTE: This howto is not for you if [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agileweb.wordpress.com&blog=3431341&post=16&subd=agileweb&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I thought it would be a good idea to start with actually installation of rails 2.1, as many latest linux distributions don&#8217;t come with the latest version of rails which includes Ubuntu 8.04. So in this how to we will cover installation of rails 2.1 on Ubuntu 8.04.<span id="more-16"></span></p>
<p>NOTE: This howto is not for you if you want to be keep your system with ubuntu repository. This howto will use gem to install rails and hence will not use the rails version available in ubuntu repository.</p>
<p>This is not actually a Rails 2.1 development tutorial, but it is related to it and hence has been made part of Rails 2.1 tutorials. Once again I would like to clarify that I am not advocating Ubuntu here nor I am saying that you should use Ubuntu for your rails development but that is what I prefer to use for my development and personal use.</p>
<p>NOTE: If you are developing on windows or using any other distribution of Linux then you can still ask in comments if you face any problems and I will try to help you out.</p>
<p>Lets start installing Rails 2.1 on our Ubuntu system. We know that apt-get is our friend which takes care of all the dependencies, fetching them and installing them.</p>
<p><span style="font-size:x-large;"><strong>Step 1:</strong></span> First step is to install ruby and other required software packages.</p>
<p><code>sudo apt-get install ruby rdoc irb ruby1.8-dev rubygems libopenssl-ruby</code><br />
<span style="font-size:x-large;"><strong>Step 2:</strong></span> We have installed RubyGems in &#8220;Step 1&#8243;, now we need to update gem to the latest available version and for this we will use below command:</p>
<p><code>sudo gem update --system</code></p>
<p>You will see a lot of messages on the screen, if you have few minutes you can read them but the last 4-5 lines will be a message that you have successfully updated your gem installation.</p>
<p><strong>Output:</strong></p>
<blockquote><p>RubyGems installed the following executables:<br />
/usr/bin/gem1.8</p>
<p>If `gem` was installed by a previous RubyGems installation, you may need<br />
to remove it by hand.</p>
<p>RubyGems system software updated</p></blockquote>
<p><span style="font-size:x-large;"><strong>Step 3:</strong></span> Now we have two versions of RubyGem on our system one is installed via package manager in Step 1 and the other is via &#8220;gem update&#8221; in Step 2. Now we will remove the version that was intstalled in Step 1 and will keep the latest version from Step 2.</p>
<p><code>sudo apt-get remove rubygems</code><br />
<span style="font-size:x-large;"><strong>Step 4:</strong></span> Now the gem command is removed so we need to create symbolic link to the latest version of gem manager.</p>
<p><code>sudo ln -s /usr/bin/gem1.8 /usr/bin/gem</code><br />
<span style="font-size:x-large;"><strong>Step 5:</strong></span> Now to install rails 2.1 on our system simply use the gem manage to install the rails gem.</p>
<p><code>sudo gem install rails</code></p>
<p><strong>You should see the similar output like following:</strong></p>
<blockquote><p>Successfully installed rake-0.8.1<br />
Successfully installed activesupport-2.1.0<br />
Successfully installed activerecord-2.1.0<br />
Successfully installed actionpack-2.1.0<br />
Successfully installed actionmailer-2.1.0<br />
Successfully installed activeresource-2.1.0<br />
Successfully installed rails-2.1.0<br />
7 gems installed<br />
Installing ri documentation for rake-0.8.1&#8230;<br />
Installing ri documentation for activesupport-2.1.0&#8230;<br />
Installing ri documentation for activerecord-2.1.0&#8230;<br />
Installing ri documentation for actionpack-2.1.0&#8230;<br />
Installing ri documentation for actionmailer-2.1.0&#8230;<br />
Installing ri documentation for activeresource-2.1.0&#8230;<br />
Installing RDoc documentation for rake-0.8.1&#8230;<br />
Installing RDoc documentation for activesupport-2.1.0&#8230;<br />
Installing RDoc documentation for activerecord-2.1.0&#8230;<br />
Installing RDoc documentation for actionpack-2.1.0&#8230;<br />
Installing RDoc documentation for actionmailer-2.1.0&#8230;<br />
Installing RDoc documentation for activeresource-2.1.0&#8230;</p></blockquote>
<p><span style="font-size:larger;"><strong>Congratulations</strong></span></p>
<p>If you have successfully followed till here then you have installed the latest available version of rails i.e rails 2.1 on your system. Yay!!! now get your self ready for actual fun.</p>
<p><a href="http://del.icio.us/post?url=http://agileweb.wordpress.com/2008/07/18/how-to-install-rails-21-on-ubuntu-in-5-steps/;title=How to install Rails 2.1 on Ubuntu in 5 steps"><img src="http://agileweb.files.wordpress.com/2008/07/delicious.gif" border="0" alt="add to del.icio.us" /></a> :: <a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Description=&amp;Url=http://agileweb.wordpress.com/2008/07/18/how-to-install-rails-21-on-ubuntu-in-5-steps/;Title=How to install Rails 2.1 on Ubuntu in 5 steps"><img src="http://agileweb.files.wordpress.com/2008/07/blinklist.gif" border="0" alt="Add to Blinkslist" /></a> :: <a href="http://www.furl.net/storeIt.jsp?u=http://agileweb.wordpress.com/2008/07/18/how-to-install-rails-21-on-ubuntu-in-5-steps/;t=How to install Rails 2.1 on Ubuntu in 5 steps"><img src="http://agileweb.files.wordpress.com/2008/07/furl.gif" border="0" alt="add to furl" /></a> :: <a href="http://digg.com/submit?phase=2&amp;url=http://agileweb.wordpress.com/2008/07/18/how-to-install-rails-21-on-ubuntu-in-5-steps/"><img src="http://agileweb.files.wordpress.com/2008/07/digg.gif" border="0" alt="Digg it" /></a> :: <a href="http://ma.gnolia.com/bookmarklet/add?url=http://agileweb.wordpress.com/2008/07/18/how-to-install-rails-21-on-ubuntu-in-5-steps/;title=How to install Rails 2.1 on Ubuntu in 5 steps"><img src="http://agileweb.files.wordpress.com/2008/07/magnolia.gif" border="0" alt="add to ma.gnolia" /></a> :: <a href="http://www.stumbleupon.com/submit?url=http://agileweb.wordpress.com/2008/07/18/how-to-install-rails-21-on-ubuntu-in-5-steps/&amp;title=How to install Rails 2.1 on Ubuntu in 5 steps"><img src="http://agileweb.files.wordpress.com/2008/07/stumbleit.gif" border="0" alt="Stumble It!" /></a> :: <a href="http://www.simpy.com/simpy/LinkAdd.do?url=http://agileweb.wordpress.com/2008/07/18/how-to-install-rails-21-on-ubuntu-in-5-steps/;title=How to install Rails 2.1 on Ubuntu in 5 steps"><img src="http://agileweb.files.wordpress.com/2008/07/simpy.png" border="0" alt="add to simpy" /></a> :: <a href="http://www.newsvine.com/_tools/seed&amp;save?url=http://agileweb.wordpress.com/2008/07/18/how-to-install-rails-21-on-ubuntu-in-5-steps/;title=How to install Rails 2.1 on Ubuntu in 5 steps"><img src="http://agileweb.files.wordpress.com/2008/07/newsvine.gif" border="0" alt="seed the vine" /></a> :: <a href="http://reddit.com/submit?url=http://agileweb.wordpress.com/2008/07/18/how-to-install-rails-21-on-ubuntu-in-5-steps/;title=How to install Rails 2.1 on Ubuntu in 5 steps"><img src="http://agileweb.files.wordpress.com/2008/07/reddit.gif" border="0" alt="reddit" /></a> :: <a href="http://cgi.fark.com/cgi/fark/edit.pl?new_url=http://agileweb.wordpress.com/2008/07/18/how-to-install-rails-21-on-ubuntu-in-5-steps/;new_comment=How to install Rails 2.1 on Ubuntu in 5 steps"><img src="http://agileweb.files.wordpress.com/2008/07/fark.png" border="0" alt="fark" /></a> :: <a title="TailRank" href="http://tailrank.com/share/?text=&amp;link_href=http://agileweb.wordpress.com/2008/07/18/how-to-install-rails-21-on-ubuntu-in-5-steps/&amp;title=How to install Rails 2.1 on Ubuntu in 5 steps"><img src="http://agileweb.files.wordpress.com/2008/07/tailrank.gif" border="0" alt="TailRank" /></a> :: <a href="http://www.facebook.com/sharer.php?u=http://agileweb.wordpress.com/2008/07/18/how-to-install-rails-21-on-ubuntu-in-5-steps/&amp;t=How to install Rails 2.1 on Ubuntu in 5 steps"><img src="http://sunburntkamel.files.wordpress.com/2008/02/facebookcom.gif" border="0" alt="post to facebook" /></a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/agileweb.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/agileweb.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/agileweb.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/agileweb.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/agileweb.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/agileweb.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/agileweb.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/agileweb.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/agileweb.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/agileweb.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/agileweb.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/agileweb.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agileweb.wordpress.com&blog=3431341&post=16&subd=agileweb&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://agileweb.wordpress.com/2008/07/18/how-to-install-rails-21-on-ubuntu-in-5-steps/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc3f3564098a9360787d2679cca2afa1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hameedkhan</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/delicious.gif" medium="image">
			<media:title type="html">add to del.icio.us</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/blinklist.gif" medium="image">
			<media:title type="html">Add to Blinkslist</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/furl.gif" medium="image">
			<media:title type="html">add to furl</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/digg.gif" medium="image">
			<media:title type="html">Digg it</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/magnolia.gif" medium="image">
			<media:title type="html">add to ma.gnolia</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/stumbleit.gif" medium="image">
			<media:title type="html">Stumble It!</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/simpy.png" medium="image">
			<media:title type="html">add to simpy</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/newsvine.gif" medium="image">
			<media:title type="html">seed the vine</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/reddit.gif" medium="image">
			<media:title type="html">reddit</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/fark.png" medium="image">
			<media:title type="html">fark</media:title>
		</media:content>

		<media:content url="http://agileweb.files.wordpress.com/2008/07/tailrank.gif" medium="image">
			<media:title type="html">TailRank</media:title>
		</media:content>

		<media:content url="http://sunburntkamel.files.wordpress.com/2008/02/facebookcom.gif" medium="image">
			<media:title type="html">post to facebook</media:title>
		</media:content>
	</item>
		<item>
		<title>Rails 2.1 tutorial series is coming</title>
		<link>http://agileweb.wordpress.com/2008/07/14/rails-21-tutorial-series-is-coming/</link>
		<comments>http://agileweb.wordpress.com/2008/07/14/rails-21-tutorial-series-is-coming/#comments</comments>
		<pubDate>Mon, 14 Jul 2008 07:26:22 +0000</pubDate>
		<dc:creator>Hameedullah Khan</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[agile web development]]></category>
		<category><![CDATA[rails 2.1]]></category>
		<category><![CDATA[rails tutorial]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://agileweb.wordpress.com/?p=13</guid>
		<description><![CDATA[As I mentioned earlier I will start writing some rails tutorials in my Post &#8220;Why Django is more attractive then Rails?&#8220;. So now I have created this separate rails tutorial section which will serve as a TOC for all my rails tutorial posts. I have decided to start with a simple todo app. One thing to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agileweb.wordpress.com&blog=3431341&post=13&subd=agileweb&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>As I mentioned earlier I will start writing some rails tutorials in my Post &#8220;<a title="Permanent Link to Why Django is more attractive then Rails?" rel="bookmark" href="../2008/07/09/why-django-is-more-attractive-then-rails/">Why Django is more attractive then Rails?</a>&#8220;. So now I have created this separate <a href="http://agileweb.wordpress.com/rails-21-tutorials/">rails tutorial</a> section which will serve as a TOC for all my rails tutorial posts. I have decided to start with a simple todo app. One thing to note here is we will be using rails 2.1 (which is the latest version of rails), so I might also write how you can install rails 2.1 on your machine. Sorry for the confusion that I wrote in my earlier article that we will be using rails 2.0. But any how its rails 2.x which is very very different then rails 1.x, so I hope my effort will not be wasted and it will be of some benefit for some newbies converting to rails out there.</p>
<p>One more thing I am not a rails advocate or something, I am just a developer who wants to help newbies. The reason I am writing these rails tutorials is because there is a lot of information for django and other frame works but I think rails lack a simple introduction which can help a newbie understand rails better.</p>
<p>So, I am not sure right now how much articles I will be writing to complete the tutorial but we will go in steps, which means I am not going to write a long article at once.  So stay tuned please I am almost finished with my first post and it will be here soon.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/agileweb.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/agileweb.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/agileweb.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/agileweb.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/agileweb.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/agileweb.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/agileweb.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/agileweb.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/agileweb.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/agileweb.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/agileweb.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/agileweb.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agileweb.wordpress.com&blog=3431341&post=13&subd=agileweb&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://agileweb.wordpress.com/2008/07/14/rails-21-tutorial-series-is-coming/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc3f3564098a9360787d2679cca2afa1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hameedkhan</media:title>
		</media:content>
	</item>
		<item>
		<title>Why Django is more attractive then Rails?</title>
		<link>http://agileweb.wordpress.com/2008/07/09/why-django-is-more-attractive-then-rails/</link>
		<comments>http://agileweb.wordpress.com/2008/07/09/why-django-is-more-attractive-then-rails/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 04:48:43 +0000</pubDate>
		<dc:creator>Hameedullah Khan</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[agile web development]]></category>
		<category><![CDATA[Rails 2.0]]></category>
		<category><![CDATA[routes]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[scaffolds]]></category>

		<guid isPermaLink="false">http://agileweb.wordpress.com/?p=12</guid>
		<description><![CDATA[One of my friends was introduced to rails when the version 2.0 was already out. He tried to learn rails for months on his own but couldn&#8217;t succeed. Recently he contacted me and asked if I have books, materials or may be links to some good books/tutorials for learning rails 2.0. And to my surprise [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agileweb.wordpress.com&blog=3431341&post=12&subd=agileweb&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>One of my friends was introduced to rails when the version 2.0 was already out. He tried to learn rails for months on his own but couldn&#8217;t succeed. Recently he contacted me and asked if I have books, materials or may be links to some good books/tutorials for learning rails 2.0. And to my surprise there is not enough material available for a newbie to learn rails 2.0 which is totally different then the older 1.x version.</p>
<p>The whole internet and even the rails site points to old materials and this is quite confusing for newbies. My that friend has already been turned to Django for professional development but he still wants to learn Ruby on Rails. The books like &#8220;Agile Web Development With Rails&#8221; is still to come out for Rails 2.0.</p>
<p>So, now to give something back to the community I have decided to write a through more then a &#8220;Hello Wolrd&#8221; tutorial for rails 2.0 so newbies don&#8217;t waste their precious time just looking for the information which is almost now obsolete. I said obsolete because Rails 2.0 has been changed alot, although the old programmers don&#8217;t notice it much because of their prior experience of the language. But for new comers its confusing when scaffolds don&#8217;t work for them or they get confused when they see the config/routes.rb which has new majic of map.resource covering everything.</p>
<p>So, hopefully I will be able to solve all these mysteries here. Also if you have written something for Rails 2.0 you can post the link in comments and later I will create a separate post that will points to all the external collections.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/agileweb.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/agileweb.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/agileweb.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/agileweb.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/agileweb.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/agileweb.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/agileweb.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/agileweb.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/agileweb.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/agileweb.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/agileweb.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/agileweb.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agileweb.wordpress.com&blog=3431341&post=12&subd=agileweb&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://agileweb.wordpress.com/2008/07/09/why-django-is-more-attractive-then-rails/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc3f3564098a9360787d2679cca2afa1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hameedkhan</media:title>
		</media:content>
	</item>
		<item>
		<title>Rapid Development with Python, Django, and Google App Engine</title>
		<link>http://agileweb.wordpress.com/2008/06/16/rapid-development-with-python-django-and-google-app-engine/</link>
		<comments>http://agileweb.wordpress.com/2008/06/16/rapid-development-with-python-django-and-google-app-engine/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 02:41:29 +0000</pubDate>
		<dc:creator>Hameedullah Khan</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[agile web development]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Guido van Rossum]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://agileweb.wordpress.com/?p=11</guid>
		<description><![CDATA[Google I/O the developer event that happened in SanFransisco, many were able to join it but there are thousands of people who were not able to join it Google has not forgotten them. The videos of almost all the talks has been posted but the best one is &#8220;Rapid Development wiht Python, Django and Google [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agileweb.wordpress.com&blog=3431341&post=11&subd=agileweb&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Google I/O the developer event that happened in SanFransisco, many were able to join it but there are thousands of people who were not able to join it Google has not forgotten them. The videos of almost all the talks has been posted but the best one is &#8220;<a href="http://sites.google.com/site/io/rapid-development-with-python-django-and-google-app-engine">Rapid Development wiht Python, Django and Google App Engine</a>&#8220;.</p>
<p>Its a must watch video so I decided to share it here. I hope you will benefit from it. You can get the presentation slides from <a href="http://sites.google.com/site/io/rapid-development-with-python-django-and-google-app-engine/rapid_development_with_django_gae.pdf?attredirects=0">here</a>.</p>
<p><span style="text-align:center; display: block;"><a href="http://agileweb.wordpress.com/2008/06/16/rapid-development-with-python-django-and-google-app-engine/"><img src="http://img.youtube.com/vi/v1gTI4BOPUw/2.jpg" alt="" /></a></span></p>
<p>If you like the above video then there are few other good videos too related to Google App Engine, so if you ware interested in learning Google App Engine and not only that but there are videos for other Google technologies which include Gears, Gadgets, OpenSocial and gData. Have look at <a href="http://googleappengine.blogspot.com/2008/06/google-io-session-videos-posted-with.html">Google I/O session videos posted with slides</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/agileweb.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/agileweb.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/agileweb.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/agileweb.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/agileweb.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/agileweb.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/agileweb.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/agileweb.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/agileweb.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/agileweb.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/agileweb.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/agileweb.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agileweb.wordpress.com&blog=3431341&post=11&subd=agileweb&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://agileweb.wordpress.com/2008/06/16/rapid-development-with-python-django-and-google-app-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc3f3564098a9360787d2679cca2afa1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hameedkhan</media:title>
		</media:content>

		<media:content url="http://img.youtube.com/vi/v1gTI4BOPUw/2.jpg" medium="image" />
	</item>
	</channel>
</rss>