Added new files
This commit is contained in:
commit
18a0d48c8c
31 changed files with 1956 additions and 0 deletions
27
modules/welcome/index.py
Normal file
27
modules/welcome/index.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#!/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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue