Added basic files
This commit is contained in:
commit
114342bc9b
16 changed files with 1320 additions and 0 deletions
0
paramecio2/modules/welcome/__init__.py
Normal file
0
paramecio2/modules/welcome/__init__.py
Normal file
20
paramecio2/modules/welcome/app.py
Normal file
20
paramecio2/modules/welcome/app.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
from flask import Blueprint, render_template
|
||||
from settings import config
|
||||
from paramecio2.libraries.mtemplates import PTemplate, env_theme
|
||||
|
||||
env=env_theme(__file__)
|
||||
|
||||
t=PTemplate(env)
|
||||
|
||||
welcome_app=Blueprint('welcome_app', __name__)
|
||||
|
||||
@welcome_app.route('/welcome')
|
||||
def home():
|
||||
|
||||
return t.load_template('welcome.phtml', title="Welcome", content='Welcome to the real world')
|
||||
|
||||
#return render_template('welcome.html', title="Welcome")
|
||||
|
||||
if config.default_module=="welcome":
|
||||
|
||||
home=welcome_app.route("/")(home)
|
||||
9
paramecio2/modules/welcome/babel.cfg
Normal file
9
paramecio2/modules/welcome/babel.cfg
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# Extraction from Python source files
|
||||
|
||||
[python: **.py]
|
||||
|
||||
# Extraction from Mako templates
|
||||
|
||||
[mako: templates/**.phtml]
|
||||
input_encoding = utf-8
|
||||
|
||||
79
paramecio2/modules/welcome/templates/welcome.html
Normal file
79
paramecio2/modules/welcome/templates/welcome.html
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
<!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">
|
||||
HELLO
|
||||
</div>
|
||||
|
||||
<div class="footer">Paramecio, a system created for create webapps</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
79
paramecio2/modules/welcome/templates/welcome.phtml
Normal file
79
paramecio2/modules/welcome/templates/welcome.phtml
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
<!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">
|
||||
${lang('cuchulutrip', 'FUCK', 'FUCK')}
|
||||
</div>
|
||||
|
||||
<div class="footer">Paramecio, a system created for create webapps</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
9
paramecio2/modules/welcome/welcome.py
Normal file
9
paramecio2/modules/welcome/welcome.py
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
from flask import Blueprint
|
||||
|
||||
|
||||
welcome=Blueprint('welcome', __name__, template_folder='templates')
|
||||
|
||||
@welcome.route('/welcome')
|
||||
def home():
|
||||
|
||||
return "WELCOME TO FLASK APPLICATION"
|
||||
Loading…
Add table
Add a link
Reference in a new issue