diff --git a/ddportfolioservice/controllers/ddportfolio.py b/ddportfolioservice/controllers/ddportfolio.py index 6e0987b..10dc215 100644 --- a/ddportfolioservice/controllers/ddportfolio.py +++ b/ddportfolioservice/controllers/ddportfolio.py @@ -10,4 +10,4 @@ class DdportfolioController(BaseController): # Return a rendered template # return render('/some/template.mako') # or, Return a response - return 'Hello World' + return render('/showform.mako') diff --git a/ddportfolioservice/lib/helpers.py b/ddportfolioservice/lib/helpers.py index 0eb7c8f..bfa5567 100644 --- a/ddportfolioservice/lib/helpers.py +++ b/ddportfolioservice/lib/helpers.py @@ -4,3 +4,4 @@ Consists of functions to typically be used within templates, but also available to Controllers. This module is available to both as 'h'. """ from webhelpers import * +from webhelpers.rails import * diff --git a/ddportfolioservice/templates/showform.mako b/ddportfolioservice/templates/showform.mako new file mode 100644 index 0000000..e2fbc99 --- /dev/null +++ b/ddportfolioservice/templates/showform.mako @@ -0,0 +1,21 @@ + + + + ${_('Debian Developer Portfolio')} + + + ${h.start_form(h.url_for(action='handle_post'), method='post')} +
+ ${_('Debian Developer Portfolio')} +
+ ${h.text_field('name', value=request.params.get('name', None))}
+
+ ${h.text_field('email', value=request.params.get('email', None))}
+
+ ${h.text_field('username', value=request.params.get('username', None))}
+ ${h.submit(value=_('Build DD Portfolio URLs'))} +
+ ${h.end_form()} + +