Skip to content

Commit

Permalink
minor errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Kilo Force authored and anandology committed Dec 24, 2010
1 parent a788dbb commit f212be7
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions pages/tutorial3
Expand Up @@ -89,7 +89,7 @@ Save the file and run the following command to start your application:

The first output of your application is the address of your web site. By default this is:

http://0.0.0.0:8080/
http://locahost:8080/

Open this address with your web browser. That's it. Congrats! You can stop your application at any time by pressing `ctrl+c` in the terminal.

Expand All @@ -108,7 +108,7 @@ As mentioned above, each page needs a unique address. Modify your list of URLs a

urls = (
'/', 'hello',
'/bye/', 'bye')
'/bye', 'bye')

This will make your class `bye` respond to requests at `/bye/`. Now start your application and open `http://localhost:8080/bye/` in your browser.

Expand All @@ -127,13 +127,13 @@ hello.py

urls = (
'/', 'hello',
'/bye/', 'bye')
'/bye', 'bye')

app = web.application(urls, globals(), web.reloader)
app = web.application(urls, globals(), True)

class hello:
def GET(self):
return time.ctime()
return 'Hello, web!'

class bye:
def GET(self):
Expand All @@ -156,7 +156,7 @@ Change the "hello" class above so it looks like this:
i = web.input(name = 'web')
return 'Hello, ' + web.websafe(i.name) + '!'

Run the script, and then go to http://0.0.0.0:8080/?name=Luke . You should see "Hello, Luke!."
Run the script, and then go to http://localhost:8080/?name=Luke . You should see "Hello, Luke!."

Here is what is happening:

Expand Down Expand Up @@ -222,9 +222,9 @@ hello.py

urls = (
'/', 'hello',
'/bye/', 'bye')
'/bye', 'bye')

app = web.application(urls, globals(), web.reloader)
app = web.application(urls, globals(), True)

class hello:
def GET(self):
Expand Down Expand Up @@ -305,13 +305,13 @@ hello.py
'/', 'hello',
'/bye/', 'bye')

app = web.application(urls, globals(), web.reloader)
app = web.application(urls, globals(), True)

render = web.template.render('templates/')

class hello:
def GET(self):
return render.hello("Templates demo", "Hello", "A long time ago...", "bla")
return render.hello("Templates demo", "Hello", "A long time ago...")

class bye:
def GET(self):
Expand Down

0 comments on commit f212be7

Please sign in to comment.