parameciofm/modules/welcome/index.py
Antonio de la Rosa 18a0d48c8c Added new files
2015-12-07 03:39:06 +01:00

27 lines
No EOL
741 B
Python

#!/usr/bin/python3
from paramecio.citoplasma.mtemplates import ptemplate
from paramecio.citoplasma.urls import make_url
from bottle import route, request
from settings import config
t=ptemplate(__file__)
@route('/welcome')
def home():
return t.load_template('welcome.html', title="Welcome to Paramecio!!!", content="The simple web framework writed in Python3!!!")
@route('/welcome/<id:int>')
def page(id):
return t.load_template('index.html', title="A simple example of a page", id=id, value=request.query.value)
@route('/welcome/test/<id:int>')
def test(id):
return make_url('welcome/test/5', {'ohmygod': 'This is gooood', 'shutup':'Shut up!!'})
if config.default_module=="welcome":
home = route("/")(home)