Permalink
Browse files

Started implementing create_node.

  • Loading branch information...
1 parent ad84e86 commit 7b7e677e2642a4970c2f2c440b255d30cca60ceb @jjinux committed Mar 24, 2011
Showing with 14 additions and 1 deletion.
  1. +14 −1 pyteladventure/views.py
View
@@ -1,4 +1,5 @@
-from flask import url_for, render_template, request, g, Markup, redirect
+from flask import url_for, render_template, request, g, Markup, redirect, \
+ session
from pyteladventure import app
from pyteladventure.choice import Choice
@@ -89,6 +90,18 @@ def show_node():
node=node)
+@app.route('/create_node/<int:parent_id>')
+def create_node(parent_id):
+ assert g.model.find(parent_id)
+ session["node"] = dict(parent_id=parent_id)
+ return redirect(url_for("create_node_pause"))
+
+
+@app.route('/create_node_pause')
+def create_node_pause():
+ return "Hello world"
+
+
def _say_message_and_redirect(message, url):
"""Render a TwiML response containing a message and a redirect."""
return render_template('say_message_and_redirect.xml', message=message,

0 comments on commit 7b7e677

Please sign in to comment.