Permalink
Browse files

making publisher prettier

git-svn-id: http://pubsubhubbub.googlecode.com/svn/trunk@155 ad9c9841-ba53-0410-b846-bb8d69ff4585
  • Loading branch information...
1 parent 74a80fd commit 94b62316412a4052f1733a4205be2ec4f82e0050 bslatkin committed Jul 10, 2009
Showing with 10 additions and 10 deletions.
  1. +1 −1 publisher/app.yaml
  2. +3 −1 publisher/atom.xml
  3. +3 −5 publisher/input.html
  4. +3 −3 publisher/main.py
View
@@ -1,4 +1,4 @@
-application: pubsubhubbub-publisher
+application: pubsubhubbub-publisher1
version: 1
runtime: python
api_version: 1
View
@@ -2,13 +2,15 @@
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Publisher example</title>
<link rel="self" type="application/atom+xml" href="{{source}}"/>
+ <link rel="hub" href="http://pubsubhubbub.appspot.com"/>
<updated>{{first_message.get_zulu_time}}</updated>
<id>{{source}}</id>
+ <author><name>nobody</name></author>
{% for message in messages %}
<entry>
<title>{{message.title}}</title>
- <id>{{message.key.id_or_name}}</id>
+ <id>{{source}}/{{message.key.id_or_name}}</id>
<updated>{{message.get_zulu_time}}</updated>
<content type="html">{{message.content|escape}}</content>
</entry>
View
@@ -1,6 +1,7 @@
<html>
<head>
<title>Publisher</title>
+ <link rel="alternate" href="/feed" type="application/atom+xml"/>
<style type="text/css">
input, textarea { margin-bottom: 2em }
.message { margin-bottom: 1em; }
@@ -17,12 +18,9 @@ <h1>Publisher page</h1>
</div>
<div>
<div>Message:</div>
- <textarea style="width: 300px" name="content" rows="20"></textarea>
- </div>
- <div>
- <div>Hub URL:</div>
- <div><input style="width: 300px" type="text" name="hub"/></div>
+ <input style="width: 300px" type="text" name="content">
</div>
+ <input type="hidden" name="hub" value="http://pubsubhubbub.appspot.com"/></div>
<div><input type="submit" value="Submit"></div>
</form>
View
@@ -29,12 +29,12 @@
class Message(db.Model):
"""A message to publish."""
- title = db.TextProperty(required=True)
- content = db.TextProperty(required=True)
+ title = db.TextProperty(default='')
+ content = db.TextProperty(default='')
when = db.DateTimeProperty(auto_now_add=True)
def get_zulu_time(self):
- return self.when.strftime("%Y-%m-%d %H:%M:%SZ")
+ return self.when.strftime("%Y-%m-%dT%H:%M:%SZ")
class MainHandler(webapp.RequestHandler):

0 comments on commit 94b6231

Please sign in to comment.