From 0c30bc5d7deeda8c48c3eccc4e4e093178cd318a Mon Sep 17 00:00:00 2001 From: niphlod Date: Tue, 8 Apr 2014 23:03:15 +0200 Subject: [PATCH] few "fashion" tweaks plus sphinx over epydoc docs --- applications/examples/controllers/default.py | 22 +-- .../en/default/documentation/official.markmin | 2 +- .../content/en/default/what/whyweb2py.markmin | 2 +- applications/examples/static/css/artwork.css | 141 ++++++++++++++++++ .../examples/views/default/download.html | 6 +- applications/examples/views/default/who.html | 2 +- applications/examples/views/global/vars.html | 2 +- 7 files changed, 159 insertions(+), 18 deletions(-) create mode 100644 applications/examples/static/css/artwork.css diff --git a/applications/examples/controllers/default.py b/applications/examples/controllers/default.py index 90443cb8..10e55f11 100644 --- a/applications/examples/controllers/default.py +++ b/applications/examples/controllers/default.py @@ -10,12 +10,12 @@ session.forget() cache_expire = not request.is_local and 300 or 0 -@cache('index', time_expire=cache_expire) +@cache.action(time_expire=300, cache_model=cache.ram, quick='P') def index(): return response.render() -@cache('what', time_expire=cache_expire) +@cache.action(time_expire=300, cache_model=cache.ram, quick='P') def what(): import urllib try: @@ -26,27 +26,27 @@ def what(): return response.render(images=images) -@cache('download', time_expire=cache_expire) +@cache.action(time_expire=300, cache_model=cache.ram, quick='P') def download(): return response.render() -@cache('who', time_expire=cache_expire) +@cache.action(time_expire=300, cache_model=cache.ram, quick='P') def who(): return response.render() -@cache('support', time_expire=cache_expire) +@cache.action(time_expire=300, cache_model=cache.ram, quick='P') def support(): return response.render() -@cache('documentation', time_expire=cache_expire) +@cache.action(time_expire=300, cache_model=cache.ram, quick='P') def documentation(): return response.render() -@cache('usergroups', time_expire=cache_expire) +@cache.action(time_expire=300, cache_model=cache.ram, quick='P') def usergroups(): return response.render() @@ -55,7 +55,7 @@ def contact(): redirect(URL('default', 'usergroups')) -@cache('videos', time_expire=cache_expire) +@cache.action(time_expire=300, cache_model=cache.ram, quick='P') def videos(): return response.render() @@ -68,7 +68,7 @@ def api(): redirect('http://www.web2py.com/book/default/chapter/04#API') -@cache('license', time_expire=cache_expire) +@cache.action(time_expire=300, cache_model=cache.ram, quick='P') def license(): import os filename = os.path.join(request.env.gluon_parent, 'LICENSE') @@ -83,12 +83,12 @@ def version(): a,b,c,build.year,build.month,build.day, build.hour,build.minute,build.second,pre_release) -@cache('examples', time_expire=cache_expire) +@cache.action(time_expire=300, cache_model=cache.ram, quick='P') def examples(): return response.render() -@cache('changelog', time_expire=cache_expire) +@cache.action(time_expire=300, cache_model=cache.ram, quick='P') def changelog(): import os filename = os.path.join(request.env.gluon_parent, 'CHANGELOG') diff --git a/applications/examples/private/content/en/default/documentation/official.markmin b/applications/examples/private/content/en/default/documentation/official.markmin index 76303290..af686d1e 100644 --- a/applications/examples/private/content/en/default/documentation/official.markmin +++ b/applications/examples/private/content/en/default/documentation/official.markmin @@ -6,4 +6,4 @@ - [[web2py Application Development Cookbook http://www.packtpub.com/web2py-application-development-recipes-to-master-python-web-framework-cookbook/book?utm_source=web2py.com&utm_medium=link&utm_content=pod&utm_campaign=mdb_009617]] - [[Quick Examples http://www.web2py.com/examples/default/examples]] - [[API http://web2py.com/book/default/chapter/04#API popup]] -- [[Epydoc (source code documentation) http://www.web2py.com/examples/static/epydoc/index.html popup]] +- [[Sphinx (source code documentation) http://web2py.readthedocs.org/en/latest/ popup]] diff --git a/applications/examples/private/content/en/default/what/whyweb2py.markmin b/applications/examples/private/content/en/default/what/whyweb2py.markmin index 714c5502..e4337a59 100644 --- a/applications/examples/private/content/en/default/what/whyweb2py.markmin +++ b/applications/examples/private/content/en/default/what/whyweb2py.markmin @@ -3,7 +3,7 @@ - **Created by a community of professionals** and University professors in Computer Science and Software Engineering. - **Always backward compatible.** We have not broken backward compatibility since version 1.0 in 2007, and we pledge not to break it in the future. - **Easy to run.** It requires no installation and no configuration. -- **Runs on** Windows, Mac, Unix/Linux, Google App Engine, Amazon EC2, and almost any web hosting via Python 2.5/2.6/2.7, or Java with Jython. +- **Runs on** Windows, Mac, Unix/Linux, Google App Engine, Amazon EC2, and almost any web hosting via Python 2.5/2.6/2.7/pypy, or Java with Jython. - **Runs with** Apache, Lighttpd, Cherokee and almost any other web server via CGI, FastCGI, WSGI, mod_proxy, and/or mod_python. It can embed third party WSGI apps and middleware. - **Talks to** SQLite, PostgreSQL, MySQL, MSSQL, FireBird, Oracle, IBM DB2, Informix, Ingres, and Google App Engine. - **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. diff --git a/applications/examples/static/css/artwork.css b/applications/examples/static/css/artwork.css new file mode 100644 index 00000000..e9cf37a4 --- /dev/null +++ b/applications/examples/static/css/artwork.css @@ -0,0 +1,141 @@ + +/*---------------------------------- ARTWORK E STICKERS -----------------------------------------*/ +/*logo*/ +.logosDow{ + border-width: 1px; + border-style: solid; + border-color:#CCC; + border-radius:3px; + background-color:#FFF; + -webkit-border-radius: 3px; + -moz-border-radius:3px; + margin:20px auto; + background: -moz-linear-gradient(top, #fbfbfb, #f1f1f1) repeat-X; + background: -webkit-gradient(linear, left top, left bottom, from(#fbfbfb), to(#f1f1f1)) repeat-X; + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#666, endColorstr=#FFFFFFFF)"; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#fbfbfb, endColorstr=#f1f1f1); + border-width: 1px; + border-style: solid; + border-color:#CCC; + border-radius:3px; + background-color:#FFF; + -webkit-border-radius: 3px; + -moz-border-radius:3px; + width:100%; + + padding:10px 10px 0 10px; + padding-bottom:0 + } +.WH1{ + height:190px; + } +.WH2{ + height:90px; + + } +.logosDow span{ + margin:8px 15px; + float:left; + width:700px; height:20px; + color:#555555; + font:bold 18px/30px Arial,Helvetica,sans-serif; + letter-spacing:-1px; +} +.box-A{ + margin:10px; + float:left; + border-width: 1px; + border-style: solid; + border-color:#CCC; + border-radius:3px; + background-color:#FFF; + -webkit-border-radius: 3px; + -moz-border-radius:3px; + width:250px; height:130px; +} +a.box-A span{ + display:none; + position:relative; + top:-55px; + left:-10px; + width:235px; + height:50px; + background-image:url(../img/tipDownloads2.png); + background-position:center; + background-repeat:no-repeat; +} +a.box-A:hover span{ + display:block; +} +.logoDow1{ + background-image:url(../img/logo3Tones.png); + background-repeat:no-repeat; + background-position:-10px -155px; +} +.logoDow2{ + background-image:url(../img/logo3Tones.png); + background-repeat:no-repeat; + background-position:-10px 0px; +} +.logoDow3{ + background-image:url(../img/logo3Tones.png); + background-repeat:no-repeat; + background-position:-10px -312px; +} +/*fim logo*/ +/*Stick*/ +.stikImage{ + float:left; + width:100px; + height:50px; + margin-left:15px; + background-repeat:no-repeat; + background-position:center; + + } +.stikimage1{ + background-image:url(../img/Stickers1.png); + background-position:center; +} +.stikimage2{ + background-image:url(../img/Stickers2.png); + background-position:center; +} +.stikimage3{ + background-image:url(../img/Stickers3.png); + background-position:center; +} +.stikimage4{ + background-image:url(../img/Stickers8.png); + background-position:center; +} +.stikimage5{ + background-image:url(../img/Stickers5.png); + background-position:center; +} +.stikimage6{ + background-image:url(../img/Stickers6.png); + background-position:center; +} +.stikimage7{ + background-image:url(../img/Stickers7.png); + background-position:center; +} +a.stikImage span{ + display:none; + position:relative; + top:-50px; + left:-50px; + width:180px; + height:50px; + background-image:url(../img/tipDownloads.png); + background-position:center; + background-repeat:no-repeat; +} +a.stikImage:hover span{ + display:block; +} +/*fim do Stick*/ + +/*------------------------------ FIM ARTWORK E STICKERS -----------------------------------------*/ + diff --git a/applications/examples/views/default/download.html b/applications/examples/views/default/download.html index 8d939980..90f023a2 100644 --- a/applications/examples/views/default/download.html +++ b/applications/examples/views/default/download.html @@ -25,7 +25,7 @@ Source Code Source Code - Epydoc + Source code docs Manual @@ -43,9 +43,9 @@

Instructions

After download, unzip it and click on web2py.exe (windows) or web2py.app (osx). To run from source, type:

-{{=CODE("python2.5 web2py.py",language=None,counter='>',_class='boxCode')}} +{{=CODE("python2.7 web2py.py",language=None,counter='>',_class='boxCode')}}

or for more info type:

-{{=CODE("python2.5 web2py.py -h",language=None,counter='>',_class='boxCode')}} +{{=CODE("python2.7 web2py.py -h",language=None,counter='>',_class='boxCode')}}

Caveats

diff --git a/applications/examples/views/default/who.html b/applications/examples/views/default/who.html index 2399200a..82608825 100644 --- a/applications/examples/views/default/who.html +++ b/applications/examples/views/default/who.html @@ -120,7 +120,7 @@
  • Scott Roberts (testing, book)
  • Sergey Podlesnyi (Oracle and migrations tester)
  • Sharriff Aina (tester and PyAMF integration) -
  • Simone Bizzotto (scheduler, redis) +
  • Simone Bizzotto (scheduler, dal, redis, tests, sphinx)
  • Sriram Durbha (book)
  • Sterling Hankins (tester, book)
  • Stuart Rackham (MSSQL support) diff --git a/applications/examples/views/global/vars.html b/applications/examples/views/global/vars.html index 10c4ec94..66154513 100644 --- a/applications/examples/views/global/vars.html +++ b/applications/examples/views/global/vars.html @@ -7,7 +7,7 @@
    [ Python Tutorial ] [ Python Libraries ] - [ web2py epydoc ] + [ web2py source docs ]

    {{=T('Description')}}