1. Francisco Souza
  2. PyConference

Commits

Francisco Souza  committed 41c77e7

Adição da controladora "conference".

  • Participants
  • Parent commits 9608ebd
  • Branches default

Comments (0)

Files changed (3)

File pyconference/config/routing.py

View file
  • Ignore whitespace
     map.connect('/error/{action}/{id}', controller='error')
 
     # CUSTOM ROUTES HERE
-
+    map.connect('/', controller='conference', action='index')
     map.connect('/{controller}/{action}')
     map.connect('/{controller}/{action}/{id}')
 

File pyconference/controllers/conference.py

View file
  • Ignore whitespace
+import logging
+
+from pylons import request, response, session, tmpl_context as c
+from pylons.controllers.util import abort, redirect_to
+
+from pyconference.lib.base import BaseController, render
+
+log = logging.getLogger(__name__)
+
+class ConferenceController(BaseController):
+
+    def index(self):
+        # Return a rendered template
+        #return render('/conference.mako')
+        # or, return a response
+        return 'Hello World'

File pyconference/tests/functional/test_conference.py

View file
  • Ignore whitespace
+from pyconference.tests import *
+
+class TestConferenceController(TestController):
+
+    def test_index(self):
+        response = self.app.get(url(controller='conference', action='index'))
+        # Test response...