Created
April 1, 2010 02:45
-
-
Save shiroyuki/351260 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys, os | |
basePath = os.path.abspath(os.path.dirname(os.path.abspath(__file__))) | |
sys.path.append(basePath) | |
# Add the experimental package of Yotsuba 3 | |
if not os.path.exists('/path/to/your/copy'): | |
raise Exception("Required Yotsuba 3 experimental package") | |
sys.path.append('/path/to/your/copy') | |
from yotsuba3.lib import tori | |
tori.setup('config.xml') | |
class websiteObjectWithToriBaseInterface(tori.baseInterface): | |
def index(): | |
return self.render("demo.html", msg = "Hello, world") | |
index.exposed = True | |
class websiteObjectWithoutToriBaseInterface: | |
def index(): | |
return "Hello, world" | |
index.exposed = True | |
application = tori.serverInterface.auto(websiteObjectWithToriBaseInterface(), tori.baseURI) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment