Added new files

This commit is contained in:
Antonio de la Rosa 2015-12-07 03:39:06 +01:00
commit 18a0d48c8c
31 changed files with 1956 additions and 0 deletions

View file

View file

@ -0,0 +1,6 @@
#!/usr/bin/python3
def home(request, **args):
return "Hello ajaaax"

27
modules/welcome/index.py Normal file
View 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)

View file

@ -0,0 +1,5 @@
body {
margin:0px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 KiB

View file

@ -0,0 +1,83 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Paramecio WebFramework</title>
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<style type="text/css">
h1, h2, h3 {
/*border: solid #cdcdcd 1px;*/
padding:5px 10px 5px 10px;
margin:0px;
background: #b80505;
color: #fbfbfb;
}
body {
background: #fbfbfb;
margin-left:15px;
margin-right:15px;
font-size:14px;
font-family: 'Open Sans', sans-serif;
}
#container {
margin-left:auto;
margin-right:auto;
padding:10px 20px 10px 20px;
margin:0px;
}
.body {
padding:10px 20px 10px 20px;
border: solid #c4c4c4 1px;
margin:0px;
background: #fff;
}
.footer {
text-align:right;
padding:3px 6px 3px 6px;
font-size:8pt;
}
.code {
}
</style>
</head>
<body>
<div id="container">
<h1>${title}</h1>
<div class="body">
<%block name="content">
<p><strong>This is an id from an url</strong>: ${id}</p>
<p><strong>This is an query from an url with name value</strong>: ${value}</p>
</%block>
</div>
<div class="footer">Paramecio, a system created for create webapps</div>
</div>
</body>
</html>

View file

@ -0,0 +1,4 @@
<%inherit file="index.html"/>
<%block name="content">
This is Paramecio, a simple web framework based in Bottle, Mako and Python 3.
</%block>