vigiboard / vigiboard / controllers / feeds.py @ c94dc931
History | View | Annotate | Download (959 Bytes)
1 | bc31210c | Francois POIROTTE | # -*- coding: utf-8 -*-
|
---|---|---|---|
2 | c94dc931 | Francois POIROTTE | # Copyright (C) 2006-2020 CS-SI
|
3 | b373a5de | Aurelien BOMPARD | # License: GNU GPL v2 <http://www.gnu.org/licenses/gpl-2.0.html>
|
4 | |||
5 | bc31210c | Francois POIROTTE | """Sample controller module"""
|
6 | |||
7 | import logging |
||
8 | 8b2edebe | Aurelien BOMPARD | from tg import expose, response |
9 | bc31210c | Francois POIROTTE | from datetime import datetime |
10 | |||
11 | from vigilo.turbogears.controllers import BaseController |
||
12 | |||
13 | LOGGER = logging.getLogger(__name__) |
||
14 | |||
15 | __all__ = ['FeedsController']
|
||
16 | |||
17 | class FeedsController(BaseController): |
||
18 | # pylint: disable-msg=R0201,W0613
|
||
19 | |||
20 | 02c4a1e7 | Francois POIROTTE | @expose('atom.xml') |
21 | adb0e63f | Francois POIROTTE | def atom(self, token, username): |
22 | bc31210c | Francois POIROTTE | """
|
23 | """
|
||
24 | 8c4b2f70 | Francois POIROTTE | response.headers['Content-Type'] = 'application/atom+xml; charset=utf-8' |
25 | bc31210c | Francois POIROTTE | return {
|
26 | 'feed': {
|
||
27 | 'title': 'VigiBoard', |
||
28 | 1c5486c7 | Francois POIROTTE | 'mtime': datetime.utcnow(),
|
29 | bc31210c | Francois POIROTTE | }, |
30 | 'entries': [
|
||
31 | { |
||
32 | 'title': 'Test', |
||
33 | 1c5486c7 | Francois POIROTTE | 'mtime': datetime.utcnow(),
|
34 | bc31210c | Francois POIROTTE | 'summary': 'Foo bar on baz', |
35 | } |
||
36 | ], |
||
37 | } |