examples path, thanks Anthony

This commit is contained in:
Massimo Di Pierro
2011-12-13 15:31:09 -06:00
parent 711a701ed7
commit d3a3b098c7
9 changed files with 152 additions and 62 deletions
+1 -1
View File
@@ -1 +1 @@
Version 1.99.3 (2011-12-13 15:21:08) stable Version 1.99.3 (2011-12-13 15:31:01) stable
+12 -11
View File
@@ -7,12 +7,13 @@ response.keywords = T('web2py, Python, Web Framework')
response.description = T('web2py Web Framework') response.description = T('web2py Web Framework')
session.forget() session.forget()
cache_expire = not request.is_local and 300 or 0
@cache('index') @cache('index', time_expire=cache_expire)
def index(): def index():
return response.render() return response.render()
@cache('what') @cache('what', time_expire=cache_expire)
def what(): def what():
import urllib; import urllib;
try: try:
@@ -21,30 +22,30 @@ def what():
images = [] images = []
return response.render(images=images) return response.render(images=images)
@cache('download') @cache('download', time_expire=cache_expire)
def download(): def download():
return response.render() return response.render()
@cache('who') @cache('who', time_expire=cache_expire)
def who(): def who():
return response.render() return response.render()
@cache('support') @cache('support', time_expire=cache_expire)
def support(): def support():
return response.render() return response.render()
@cache('documentation') @cache('documentation', time_expire=cache_expire)
def documentation(): def documentation():
return response.render() return response.render()
@cache('usergroups') @cache('usergroups', time_expire=cache_expire)
def usergroups(): def usergroups():
return response.render() return response.render()
def contact(): def contact():
redirect(URL('default','usergroups')) redirect(URL('default','usergroups'))
@cache('videos') @cache('videos', time_expire=cache_expire)
def videos(): def videos():
return response.render() return response.render()
@@ -54,7 +55,7 @@ def security():
def api(): def api():
redirect('http://web2py.com/book/default/chapter/04#API') redirect('http://web2py.com/book/default/chapter/04#API')
@cache('license') @cache('license', time_expire=cache_expire)
def license(): def license():
import os import os
filename = os.path.join(request.env.gluon_parent, 'LICENSE') filename = os.path.join(request.env.gluon_parent, 'LICENSE')
@@ -63,11 +64,11 @@ def license():
def version(): def version():
return 'Version %s.%s.%s (%s) %s' % request.env.web2py_version return 'Version %s.%s.%s (%s) %s' % request.env.web2py_version
@cache('examples') @cache('examples', time_expire=cache_expire)
def examples(): def examples():
return response.render() return response.render()
@cache('changelog') @cache('changelog', time_expire=cache_expire)
def changelog(): def changelog():
import os import os
filename = os.path.join(request.env.gluon_parent, 'CHANGELOG') filename = os.path.join(request.env.gluon_parent, 'CHANGELOG')
@@ -1,4 +1,4 @@
### Community Sources ### Community Documentation
- [[web2pybrasil http://www.web2pybrasil.com.br popup]] - [[web2pybrasil http://www.web2pybrasil.com.br popup]]
- Apostila em português [[Download http://dl.dropbox.com/u/830444/apostila_web2py_basico.pdf popup]] e [[Online http://web2pybrasil.appspot.com/init/plugin_wiki/page/curso-web2py-000 popup]] - Apostila em português [[Download http://dl.dropbox.com/u/830444/apostila_web2py_basico.pdf popup]] e [[Online http://web2pybrasil.appspot.com/init/plugin_wiki/page/curso-web2py-000 popup]]
@@ -9,12 +9,9 @@
- **Secure** [[It prevents the most common types of vulnerabilities http://web2py.com/examples/default/security]] including Cross Site Scripting, Injection Flaws, and Malicious File Execution. - **Secure** [[It prevents the most common types of vulnerabilities http://web2py.com/examples/default/security]] including Cross Site Scripting, Injection Flaws, and Malicious File Execution.
- **Enforces good Software Engineering practices** (Model-View-Controller design, Server-side form validation, postbacks) that make the code more readable, scalable, and maintainable. - **Enforces good Software Engineering practices** (Model-View-Controller design, Server-side form validation, postbacks) that make the code more readable, scalable, and maintainable.
- **Speaks multiple protocols** HTML/XML, RSS/ATOM, RTF, PDF, JSON, AJAX, XML-RPC, CSV, REST, WIKI, Flash/AMF, and Linked Data (RDF). - **Speaks multiple protocols** HTML/XML, RSS/ATOM, RTF, PDF, JSON, AJAX, XML-RPC, CSV, REST, WIKI, Flash/AMF, and Linked Data (RDF).
- **Includes** a SSL-enabled and streaming-capable web server, a relational database, a web-based integrated development environment and web-based management interface, a Database Abstraction Layer that writes SQL for you in real time, internationalization support, multiple authentication methods, role based access control, an error logging and ticketing system, multiple caching methods for scalability, the jQuery library for AJAX and effects. [[Read more... http://web2py.com/examples/default/what]] - **Includes** a SSL-enabled and streaming-capable web server, a relational database, a web-based integrated development environment and web-based management interface, a Database Abstraction Layer that writes SQL for you in real time, internationalization support, multiple authentication methods, role based access control, an error logging and ticketing system, multiple caching methods for scalability, the jQuery library for AJAX and effects.
The best way to understand web2py is to try it. The best way to understand web2py is to try it. You can try it online [[here http://www.web2py.com/demo_admin]] (this online version is identical to the actual web2py although some functions are disabled for security reasons).
You can try it online [[here http://www.web2py.com/demo_admin]].
This online version is identical to the actual web2py although some functions are disabled for security reasons.
web2py was inspired by Ruby on Rails and, as Rails, it focuses on rapid development and follows a Model View Controller design. web2py differs from Rails because it is based on Python (thus it is faster and more scalable), because it provides a comprehensive web-based administrative interface (thus there is no need to ever type shell commands unless you wish), includes libraries to handle more protocols (for example XML-RPC and RSS feeds), and can run on the Google App Engine. web2py was inspired by Ruby on Rails and, as Rails, it focuses on rapid development and follows a Model View Controller design. web2py differs from Rails because it is based on Python (thus it is faster and more scalable), because it provides a comprehensive web-based administrative interface (thus there is no need to ever type shell commands unless you wish), includes libraries to handle more protocols (for example XML-RPC and RSS feeds), and can run on the Google App Engine.
+106 -10
View File
@@ -1,21 +1,117 @@
.statusbar {padding-top: 2px; padding-bottom: 2px; border: 0; margin-bottom: 60px; footer-content {position: relative; bottom: 0; width: 100%;}
background: url('../images/menu.png') repeat-x; }
.statusbar a, .statusbar a:visited {color: #406361} .statusbar {
padding: 2px 0;
border: 0;
margin-bottom: 15px;
background-color: #C1CDCD;
/*background: url('../images/menu.png') repeat-x;*/
}
.statusbar a, .statusbar a:visited {
color: #406361;
}
.footer {
position: relative;
}
.footer-content {
height: 100%;
position: absolute;
}
a, a:visited, a:hover, h1,h2,h3,h4,h5 {color: #658883} a, a:visited, a:hover, h1,h2,h3,h4,h5 {color: #658883}
.wrapper { background: url('../images/back-02.png') repeat-x; padding-top:10px;} a.button {color: #658883}
.sf-menu li, .sf-menu li a { border-radius: 5px;}
.wrapper {
background: url('../images/back-02.png') repeat-x;
padding-top:10px;
}
h1 { font-size: 32px } h1 { font-size: 32px }
h2 { font-size: 24px } h2 { font-size: 24px }
h3 { font-size: 20px } h3 { font-size: 20px }
h4 { font-size: 14px } h4 { font-size: 14px }
sup { font-size: 0.5em; line-height: 2em; vertical-align: top;} sup {
.frame { border: 3px solid #959595; margin-bottom: 5px; } font-size: 0.5em;
line-height: 2em;
vertical-align: top;
}
ul { list-style: circle outside;} ul { list-style: circle outside;}
.announce { position:absolute;align:center;color:white;top:120px;font-weight:bold;text-align:center;
}
.announce a { color: white !important;}
input:focus,textarea:focus {background:#f0f0f0!important} .frame {
border: 3px solid #959595;
margin-bottom: 5px;
}
.header h5 {
float: left;
}
.logo: {
float:left;
}
.announce {
text-align: center;
color: white;
top: 0;
font-weight: bold;
text-align: center;
left: 0;
position: relative;
background: #000;
border-radius: 5px;
margin: 7px 0 15px;
}
.announce a {color: white}
input:focus, textarea:focus {background:#f0f0f0}
table.downloads { width:100%; } table.downloads { width:100%; }
table.downloads th, table.downloads td {text-align:center;} table.downloads th, table.downloads td {text-align:center;}
table.downloads a.button { width: 150px; } table.downloads a.button { width: 150px; }
th,td {padding-right: 10px;} th,td {padding-right: 10px;}
p {text-align: left;}
p + p {
margin-bottom: .75em;
}
strong {color: inherit;}
img.centered {
margin: 0 auto;
display: block;
}
.tagCloud {
width: 100%;
max-width: 489px;
}
.mainbody {
margin-bottom: 20px;
}
.aboutW2P {
margin-top: 23px;
margin-bottom: 15px;
}
.aboutW2P p {
padding: 0 0.5em;
font-size: 1.15em;
}
.aboutW2P h3 {
padding: 0 0.3em;
}
.userQuotes {
/*border-top: #eee 2px solid;*/
padding-top: 15px;
}
.userQuotes p {
text-align: left;
font-size: 111%;
color: #777;
}
#menu {
padding: 0.1em 0.5em;
}
@@ -5,6 +5,7 @@
<h2>web2py<sup style="font-size:0.5em;">TM</sup> Download</h2> <h2>web2py<sup style="font-size:0.5em;">TM</sup> Download</h2>
<div style="width: 90%; margin: 0 auto;">
<center> <center>
<table class="downloads"> <table class="downloads">
<tr> <tr>
@@ -39,6 +40,7 @@
</tr> </tr>
</table> </table>
</center> </center>
<p style="text-align:left;"> <p style="text-align:left;">
The source code version works on all supported platforms, including Linux, but it requires Python 2.5, 2.6, or 2.7. The source code version works on all supported platforms, including Linux, but it requires Python 2.5, 2.6, or 2.7.
It runs on Windows and most Unix systems, including <b>Linux</b> and <b>BSD</b>. It runs on Windows and most Unix systems, including <b>Linux</b> and <b>BSD</b>.
@@ -99,4 +101,4 @@
{{block sidebar}}{{end}} {{block sidebar}}{{end}}
{{block leftbadges}}{{end}} {{block leftbadges}}{{end}}
</div>
+14 -16
View File
@@ -1,41 +1,40 @@
{{right_sidebar_enabled=True}} {{right_sidebar_enabled=True}}
{{extend 'layout.html'}} {{extend 'layout.html'}}
<center> <img class="scale-with-grid centered" src="{{=URL('static','images/tag-cloud-color-small.png')}}" />
<img src="{{=URL('static','images/tag-cloud-color-small.png')}}"/>
</center>
<h3>WEB2PY<sup>TM</sup> WEB FRAMEWORK</h3> <h3>WEB2PY<sup>TM</sup> WEB FRAMEWORK</h3>
<p>Free open source full-stack framework for rapid development of fast, scalable, <a href="http://www.web2py.com/book/default/chapter/01#security" target="_blank">secure</a> and portable database-driven web-based applications. Written and programmable in <a href="http://www.python.org" target="_blank">Python</a>. <a href="http://www.gnu.org/licenses/lgpl.html">LGPLv3 License</a>. <p>Free open source full-stack framework for rapid development of fast, scalable, <a href="http://www.web2py.com/book/default/chapter/01#security" target="_blank">secure</a> and portable database-driven web-based applications. Written and programmable in <a href="http://www.python.org" target="_blank">Python</a>. <a href="http://www.gnu.org/licenses/lgpl.html">LGPLv3 License</a>.
Current version: {{="%s.%s.%s (%s) %s" % request.env.web2py_version}}</p> Current version: {{="%s.%s.%s (%s) %s" % request.env.web2py_version}}</p>
{{block extra}} {{block extra}}
<div class="container"> <div class="container aboutW2P">
<div class="sixteen columns"> <div class="sixteen columns">
<div class="five columns"> <div class="one-third column alpha">
<h3><a href="{{=URL('about')}}">BATTERIES INCLUDED</a></h3> <h3><a href="{{=URL('about')}}">BATTERIES INCLUDED</a></h3>
<p>Everything you need in one package including fast multi-threaded web server, SQL database and web-based interface. No third party dependencies but works with <a href={{=URL('what')}}>third party tools</a>.</p> <p>Everything you need in one package including fast multi-threaded web server, SQL database and web-based interface. No third party dependencies but works with <a href={{=URL('what')}}>third party tools</a>.</p>
</div> </div>
<div class="five columns"> <div class="one-third column">
<h3><a href="http://web2py.com/demo_admin">WEB-BASED IDE</a></h3> <h3><a href="http://web2py.com/demo_admin">WEB-BASED IDE</a></h3>
<p>Create, modify, deploy and manage application from anywhere using your browser. One web2py instance can run multiple web sites using different databases. Try the <a href="http://web2py.com/demo_admin">interactive demo</a>.</p> <p>Create, modify, deploy and manage application from anywhere using your browser. One web2py instance can run multiple web sites using different databases. Try the <a href="http://web2py.com/demo_admin">interactive demo</a>.</p>
</div> </div>
<div class="five columns"> <div class="one-third column omega">
<h3><a href="{{=URL('documentation')}}">EXTENSIVE DOCS</a></h3> <h3><a href="{{=URL('documentation')}}">EXTENSIVE DOCS</a></h3>
<p>Start with some <a href="{{=URL('examples')}}">quick examples</a>, then read the <a href="http://web2py.com/book">reference manual</a>, watch <a href="http://vimeo.com/album/178500">videos</a>, and join a <a href="{{=URL('default', 'usergroups')}}">user group</a> for discussion. Take advantage of the <a href="http://web2py.com/layouts">layouts</a>, <a href="http://dev.s-cubism.com/web2py_plugins">plugins</a>, and <a href="http://web2pyslices.com">recipes</a>.</p> <p>Start with some <a href="{{=URL('examples')}}">quick examples</a>, then read the <a href="http://web2py.com/book">reference manual</a>, watch <a href="http://vimeo.com/album/178500">videos</a>, and join a <a href="{{=URL('default', 'usergroups')}}">user group</a> for discussion. Take advantage of the <a href="http://web2py.com/layouts">layouts</a>, <a href="http://dev.s-cubism.com/web2py_plugins">plugins</a>, and&nbsp;<a href="http://web2pyslices.com">recipes</a>.</p>
</div> </div>
</div> </div>
</div> </div>
<div class="container"> <img class="scale-with-grid centered" src="/examples/static/images/shadow-bottom.png">
<div class="container userQuotes">
<div class="sixteen columns"> <div class="sixteen columns">
<img src="{{=URL('static','images/shadow-bottom.png')}}" width="100%"/> <!-- img src="{{=URL('static','images/shadow-bottom.png')}}" width="100%"/ -->
{{for k,quote in enumerate(quotes[:3]):}} {{for k,quote in enumerate(quotes[:3]):}}
<div class="five columns"> <div class="one-third column {{=[' alpha', '', ' omega'][k]}}">
<em> <em>
<p>{{=quote[0]}}</p> <p>{{=quote[0]}}</p>
</em> </em>
<span class="right"> <span class="right">
<a href="{{=quote[2]}}"><em>{{=quote[1]}}</em></a> <a href="{{=quote[2]}}"><em>&mdash;{{=quote[1]}}</em></a>
</span> </span>
</div> </div>
{{pass}} {{pass}}
@@ -44,12 +43,11 @@ Current version: {{="%s.%s.%s (%s) %s" % request.env.web2py_version}}</p>
{{end}} {{end}}
{{block right_sidebar}} {{block right_sidebar}}
<div style="text-align:center"> <div class="one-third column" style="text-align:center">
<a href="http://web2py.com/book"><img src="{{=URL('static','images/tablet.png')}}" alt="Tablet" /></a> <a href="http://web2py.com/book"><img src="{{=URL('static','images/tablet.png')}}" alt="Tablet" /></a>
<br/> <br/>
<a class="button" href="{{=URL('download')}}" style="width:90%">DOWNLOAD NOW</a><br/> <a class="button" href="{{=URL('download')}}" style="width:90%">DOWNLOAD NOW</a><br/>
<a class="button" href="http://web2py.com/demo_admin" style="width:90%">ONLINE DEMO</a><br/> <a class="button" href="http://web2py.com/demo_admin" style="width:90%">ONLINE DEMO</a><br/>
<a class="button" href="http://web2py.com/poweredby" style="width:90%">SITES POWERED</a> <a class="button" href="http://web2py.com/poweredby" style="width:90%">SITES POWERED BY WEB2PY</a>
</div> </div>
{{end}} {{end}}
@@ -39,6 +39,7 @@
</li><li>Carlos Galindo </li><li>Carlos Galindo
</li><li>Carsten Haese (Informix) </li><li>Carsten Haese (Informix)
</li><li>Chris Clark (Ingres, Jython support) </li><li>Chris Clark (Ingres, Jython support)
</li><li>Chris May (new website)
</li><li>Chris Steel </li><li>Chris Steel
</li><li>Christian Foster Howes (GAE support) </li><li>Christian Foster Howes (GAE support)
</li><li>Christopher Smiga (Informix) </li><li>Christopher Smiga (Informix)
+12 -17
View File
@@ -55,11 +55,7 @@
</script> </script>
{{ {{
# using sidebars need to know what sidebar you want to use
left_sidebar_enabled = globals().get('left_sidebar_enabled',False)
right_sidebar_enabled = globals().get('right_sidebar_enabled',False) right_sidebar_enabled = globals().get('right_sidebar_enabled',False)
middle_columns = {0:'sixteen',1:'ten',2:'eight'}[
(left_sidebar_enabled and 1 or 0)+(right_sidebar_enabled and 1 or 0)]
}} }}
<!-- uncomment here to load jquery-ui <!-- uncomment here to load jquery-ui
@@ -74,39 +70,38 @@
<div class="header"> <div class="header">
<div class="container"> <div class="container">
<div class="sixteen columns"> <div class="sixteen columns">
<img src="{{=URL('static','images/web2py_logo.png')}}" /> <img src="{{=URL('static','images/web2py_logo.png')}}" class="logo" alt="web2py logo" />
<h5>{{=response.subtitle or ''}}</h5> <h5>{{=response.subtitle or ''}}</h5>
</div> </div>
<div class="sixteen columns statusbar"> <div class="sixteen columns statusbar">
{{block statusbar}} {{block statusbar}}
{{is_mobile=request.user_agent().is_mobile}} {{is_mobile=request.user_agent().is_mobile}}
<div id="menu">{{=MENU(response.menu,_class='mobile-menu' if is_mobile else 'sf-menu',mobile=is_mobile)}} <div id="menu" class="clearfix">{{=MENU(response.menu,_class='mobile-menu' if is_mobile else 'sf-menu',mobile=is_mobile)}}
{{end}} {{end}}
<!-- AddToAny BEGIN --> <!-- AddToAny BEGIN -->
<div style="float:right;padding-top:6px;" class="a2a_kit a2a_default_style"> <div style="float:right;padding-top:6px;" class="a2a_kit a2a_default_style">
<a class="a2a_dd" href="http://www.addtoany.com/share_save">Share</a></div> <a class="a2a_dd" href="http://www.addtoany.com/share_save">Share</a></div>
<script type="text/javascript" src="http://static.addtoany.com/menu/page.js"></script> <script type="text/javascript" src="http://static.addtoany.com/menu/page.js"></script>
<!-- AddToAny END --> <!-- AddToAny END -->
</div> </div>
</div>
<div class="sixteen columns announce"> <div class="sixteen columns announce">
<a href="http://www.infoworld.com/d/open-source-software/bossie-awards-2011-the-best-open-source-application-development-software-171759-0&current=10&last=1#slideshowTop">2011 BOSSIE AWARD FOR OPEN SOURCE DEVELOPMENT SOFTWARE</a> <a href="http://www.infoworld.com/d/open-source-software/bossie-awards-2011-the-best-open-source-application-development-software-171759-0&current=10&last=1#slideshowTop">2011 BOSSIE AWARD FOR OPEN SOURCE DEVELOPMENT SOFTWARE</a>
</div> </div>
</div>
</div> </div>
</div> </div>
<div class="main"> <div class="main">
<div class="container mainbody"> <div class="container mainbody">
<div class="sixteen columns"> <div class="sixteen columns">
<div class="{{=middle_columns}} columns center"> <div class="{{=right_sidebar_enabled and 'two-thirds column alpha' or 'sixteen columns alpha omega'}}">
{{block center}} {{block center}}
{{include}} {{include}}
{{end}} {{end}}
</div> </div>
{{if right_sidebar_enabled:}} {{if right_sidebar_enabled:}}
<div class="five columns"> <div class="one-third column omega">
{{block right_sidebar}} {{block right_sidebar}}
<h3>Right Sidebar</h3> <h3>Right Sidebar</h3>
<p></p> <p></p>