Twitter in 30 Minutes

To run this sample, copy-paste the following two HTML files, and save the attachments at bottom, to a twitter directory.

*** home.html ****

<html>
  <body>
    <h1>{{message}}</h1>
    <br/>

   <form action="/twit" method="get">
      <input type="text" name="status" value="status">
      <input type="submit" value="Submit">
    </form>

   <br/>
   {% for tweet in twitters %}
     
        {{tweet.user.email}}:{{tweet.status}}:{{tweet.date}}</b>
      
        <br/>
   {% endfor %}
   <br/>
   <a href={{logout_url}}>logout</a>
  </body>
</html>

*** welcome.html ***

<html>
  <body>
    Already logged in? <a href={{login_url}}  >login</a>
    <br/>
    Register <br/>
      <form action="/register" method="get">
      <input type="text" name="name" value="name">
      <input type="submit" value="Submit">
    </form>

  </body>
</html>

Attachments (3)

  • app.yaml - on Apr 29, 2009 3:48 PM by David Wolber (version 1)
    1k Download
  • model.py - on Apr 29, 2009 3:06 PM by David Wolber (version 1)
    1k Download
  • twitter_controller.py - on Apr 29, 2009 3:06 PM by David Wolber (version 1)
    2k Download