annotate pylons_app/controllers/feed.py @ 205:66b20f525750

Added feed controllers, urls,and changed index page to use them.
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 23 May 2010 01:03:54 +0200
parents
children 8bdec09436cb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
205
66b20f525750 Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
1 #!/usr/bin/python
66b20f525750 Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
2 # -*- coding: utf-8 -*-
66b20f525750 Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
3 import logging
66b20f525750 Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
4 from operator import itemgetter
66b20f525750 Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
5 from pylons import tmpl_context as c, request, config
66b20f525750 Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
6 from pylons_app.lib.base import BaseController, render
66b20f525750 Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
7 from pylons_app.lib.utils import get_repo_slug
66b20f525750 Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
8 from pylons_app.model.hg_model import HgModel
66b20f525750 Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
9 from pylons_app.lib.auth import LoginRequired
66b20f525750 Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
10 log = logging.getLogger(__name__)
66b20f525750 Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
11
66b20f525750 Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
12 class FeedController(BaseController):
66b20f525750 Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
13
66b20f525750 Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
14 #secure it or not ?
66b20f525750 Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
15 def __before__(self):
66b20f525750 Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
16 super(FeedController, self).__before__()
66b20f525750 Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
17
66b20f525750 Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
18 def atom(self):
66b20f525750 Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
19 return 'Hello Atom'
66b20f525750 Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
20
66b20f525750 Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
21 def rss(self):
66b20f525750 Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
22 return 'Hello rss'