Author: cornmander
Date: Sat Jun 27 03:35:38 2009
New Revision: 36415
URL: http://svn.gna.org/viewcvs/wesnoth?rev=36415&view=rev
Log:
Changed URL from a noun to a verb (newview->addview) and stubbed a deleteview
page. Removed completed timestamp support from
TODO.
Added:
website/stats.wesnoth.org/wesstats/templates/addview.html (props changed)
- copied unchanged from r36381,
website/stats.wesnoth.org/wesstats/templates/newview.html
website/stats.wesnoth.org/wesstats/templates/deleteview.html (contents,
props changed)
- copied, changed from r36381,
website/stats.wesnoth.org/wesstats/templates/newview.html
Removed:
website/stats.wesnoth.org/wesstats/controllers/root.py.bak
website/stats.wesnoth.org/wesstats/templates/newview.html
Modified:
website/stats.wesnoth.org/TODO
website/stats.wesnoth.org/wesstats/controllers/root.py
Modified: website/stats.wesnoth.org/TODO
URL:
http://svn.gna.org/viewcvs/wesnoth/website/stats.wesnoth.org/TODO?rev=36415&r1=36414&r2=36415&view=diff
==============================================================================
--- website/stats.wesnoth.org/TODO (original)
+++ website/stats.wesnoth.org/TODO Sat Jun 27 03:35:38 2009
@@ -2,7 +2,6 @@
--add in support for line and bar graphs (6/22)
--finish the page for adding new views (6/22?-6/24)
--add page for deleting views (6/23)
---add filtering by date ranges (6/24)
-code documentation and cleanness (6/24)
--add proper logging support, everything is currently spewed to httpd's stdout
Modified: website/stats.wesnoth.org/wesstats/controllers/root.py
URL:
http://svn.gna.org/viewcvs/wesnoth/website/stats.wesnoth.org/wesstats/controllers/root.py?rev=36415&r1=36414&r2=36415&view=diff
==============================================================================
--- website/stats.wesnoth.org/wesstats/controllers/root.py (original)
+++ website/stats.wesnoth.org/wesstats/controllers/root.py Sat Jun 27 03:35:38
2009
@@ -110,8 +110,12 @@
conn.close()
return dict(views=views)
- @expose(template="wesstats.templates.newview")
- def newview(self):
+ @expose(template="wesstats.templates.addview")
+ def addview(self):
+ return dict()
+
+ @expose(template="wesstats.templates.deleteview")
+ def deleteview(self):
return dict()
@expose()
Removed: website/stats.wesnoth.org/wesstats/controllers/root.py.bak
URL:
http://svn.gna.org/viewcvs/wesnoth/website/stats.wesnoth.org/wesstats/controllers/root.py.bak?rev=36414&view=auto
==============================================================================
--- website/stats.wesnoth.org/wesstats/controllers/root.py.bak (original)
+++ website/stats.wesnoth.org/wesstats/controllers/root.py.bak (removed)
@@ -1,96 +1,0 @@
-# -*- coding: utf-8 -*-
-"""Main Controller"""
-
-from tg import expose, flash, require, url, request, redirect
-from pylons.i18n import ugettext as _, lazy_ugettext as l_
-from catwalk.tg2 import Catwalk
-from repoze.what import predicates
-
-from wesstats.lib.base import BaseController
-from wesstats.model import DBSession, metadata
-from wesstats.controllers.error import ErrorController
-from wesstats import model
-from wesstats.controllers.secure import SecureController
-
-__all__ = ['RootController']
-
-
-class RootController(BaseController):
- """
- The root controller for the wesstats application.
-
- All the other controllers and WSGI applications should be mounted on this
- controller. For example::
-
- panel = ControlPanelController()
- another_app = AnotherWSGIApplication()
-
- Keep in mind that WSGI applications shouldn't be mounted directly: They
- must be wrapped around with :class:`tg.controllers.WSGIAppController`.
-
- """
- secc = SecureController()
-
- admin = Catwalk(model, DBSession)
-
- error = ErrorController()
-
- @expose('wesstats.templates.index')
- def index(self):
- """Handle the front-page."""
- return dict(page='index')
-
- @expose('wesstats.templates.about')
- def about(self):
- """Handle the 'about' page."""
- return dict(page='about')
-
- @expose('wesstats.templates.authentication')
- def auth(self):
- """Display some information about auth* on this application."""
- return dict(page='auth')
-
- @expose('wesstats.templates.index')
- @require(predicates.has_permission('manage', msg=l_('Only for managers')))
- def manage_permission_only(self, **kw):
- """Illustrate how a page for managers only works."""
- return dict(page='managers stuff')
-
- @expose('wesstats.templates.index')
- @require(predicates.is_user('editor', msg=l_('Only for the editor')))
- def editor_user_only(self, **kw):
- """Illustrate how a page exclusive for the editor works."""
- return dict(page='editor stuff')
-
- @expose('wesstats.templates.login')
- def login(self, came_from=url('/')):
- """Start the user login."""
- login_counter = request.environ['repoze.who.logins']
- if login_counter > 0:
- flash(_('Wrong credentials'), 'warning')
- return dict(page='login', login_counter=str(login_counter),
- came_from=came_from)
-
- @expose()
- def post_login(self, came_from=url('/')):
- """
- Redirect the user to the initially requested page on successful
- authentication or redirect her back to the login page if login failed.
-
- """
- if not request.identity:
- login_counter = request.environ['repoze.who.logins'] + 1
- redirect(url('/login', came_from=came_from,
__logins=login_counter))
- userid = request.identity['repoze.who.userid']
- flash(_('Welcome back, %s!') % userid)
- redirect(came_from)
-
- @expose()
- def post_logout(self, came_from=url('/')):
- """
- Redirect the user to the initially requested page on logout and say
- goodbye as well.
-
- """
- flash(_('We hope to see you soon!'))
- redirect(came_from)
Propchange: website/stats.wesnoth.org/wesstats/templates/addview.html
------------------------------------------------------------------------------
svn:mergeinfo =
Copied: website/stats.wesnoth.org/wesstats/templates/deleteview.html (from
r36381, website/stats.wesnoth.org/wesstats/templates/newview.html)
URL:
http://svn.gna.org/viewcvs/wesnoth/website/stats.wesnoth.org/wesstats/templates/deleteview.html?p2=website/stats.wesnoth.org/wesstats/templates/deleteview.html&p1=website/stats.wesnoth.org/wesstats/templates/newview.html&r1=36381&r2=36415&rev=36415&view=diff
==============================================================================
--- website/stats.wesnoth.org/wesstats/templates/newview.html (original)
+++ website/stats.wesnoth.org/wesstats/templates/deleteview.html Sat Jun 27
03:35:38 2009
@@ -14,28 +14,8 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:py="http://genshi.edgewall.org/"
xmlns="http://www.w3.org/1999/xhtml">
<head>
-<title>Add a New View</title>
+<title>Delete a View</title>
</head>
<body>
-<form>
-View Title:
-<input type="text" name="title" />
-<br />
-View URL:
-<input type="text" name="url" />
-<br />
-X-Axis Label:
-<input type="text" name="xlabel" />
-<br />
-Graph Type
-<br />
-<input type="radio" name="gtype" value="pie" /> Pie Chart
-<br />
-<input type="radio" name="gtype" value="line" /> Line Graph
-<br />
-<input type="radio" name="gtype" value="bar" /> Bar Graph
-<br />
-<input type="submit" value="Submit" />
-</form>
</body>
</html>
Propchange: website/stats.wesnoth.org/wesstats/templates/deleteview.html
------------------------------------------------------------------------------
svn:mergeinfo =
Removed: website/stats.wesnoth.org/wesstats/templates/newview.html
URL:
http://svn.gna.org/viewcvs/wesnoth/website/stats.wesnoth.org/wesstats/templates/newview.html?rev=36414&view=auto
==============================================================================
--- website/stats.wesnoth.org/wesstats/templates/newview.html (original)
+++ website/stats.wesnoth.org/wesstats/templates/newview.html (removed)
@@ -1,41 +1,0 @@
-<!-- $Id$ -->
-<!--
- Copyright (C) 2009 by Gregory Shikhman <[email protected]>
- Part of the Battle for Wesnoth Project http://www.wesnoth.org/
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2
- or at your option any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY.
-
- See the COPYING file for more details.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns:py="http://genshi.edgewall.org/"
xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>Add a New View</title>
-</head>
-<body>
-<form>
-View Title:
-<input type="text" name="title" />
-<br />
-View URL:
-<input type="text" name="url" />
-<br />
-X-Axis Label:
-<input type="text" name="xlabel" />
-<br />
-Graph Type
-<br />
-<input type="radio" name="gtype" value="pie" /> Pie Chart
-<br />
-<input type="radio" name="gtype" value="line" /> Line Graph
-<br />
-<input type="radio" name="gtype" value="bar" /> Bar Graph
-<br />
-<input type="submit" value="Submit" />
-</form>
-</body>
-</html>
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits