Can you please email it to me as an attachment?
On Monday, 31 December 2012 12:20:17 UTC-6, Jonathan Lundell wrote: > > On 31 Dec 2012, at 9:36 AM, Massimo Di Pierro > <[email protected]<javascript:>> > wrote: > > This file: > > https://dl.dropbox.com/u/18065445/Tmp/diff2.log > > contains the lines added or edited in the book so far. If some of you can > help proof-read these changes and send corrections in place it would save > lots of time vs reading the entire book. > > > Quick & dirty spellcheck (diffed against the above file): > > Last login: Mon Dec 31 08:27:51 on ttys004 > tmp $ diff web2py-spell-1.txt web2py-spell-2.txt > 6c6 > < +''Ease of use''. This means reducing the learning and deployment time > as well as devlopment and maintenance costs. This is why ``web2py`` is a > full-stack framework without dependencies. It requires no installation and > has no configuration files. Everything works ''out of the box'', including > a web server, database and a web-based IDE that gives access to all the > main features. The API includes just 12 core objects, which are easy to > work with and memorize. It can interoperate with most web servers, > databases and all Python libraries. > --- > > +''Ease of use''. This means reducing the learning and deployment time > as well as development and maintenance costs. This is why ``web2py`` is a > full-stack framework without dependencies. It requires no installation and > has no configuration files. Everything works ''out of the box'', including > a web server, database and a web-based IDE that gives access to all the > main features. The API includes just 12 core objects, which are easy to > work with and memorize. It can interoperate with most web servers, > databases and all Python libraries. > 15c15 > < +This code embeds a fully working wiki with tags, search, tag cloud, > permissions, media attachments, adn oembed support: > --- > > +This code embeds a fully working wiki with tags, search, tag cloud, > permissions, media attachments, and oembed support: > 27,28c27,28 > < +- Easy for users to learn server-side web development without > compromising functionality. For this reason, web2py requires no > installation and no configuration, has no dependencies (except for the > source code distribution, which requires Python 2.5 and its standard > library modules), and exposes most of its functionality via a Web > interface, incuding an Integrated Development Environment with Debugger and > database interface. > < +- web2py has a small footprint and is very fast. It uses the > Rocket``rocket``:cite WSGI web server developed by Timothy Farrell. It is > as fast as Apache with mod_wsgi, supports ssl and IPv6. > --- > > +- Easy for users to learn server-side web development without > compromising functionality. For this reason, web2py requires no > installation and no configuration, has no dependencies (except for the > source code distribution, which requires Python 2.5 and its standard > library modules), and exposes most of its functionality via a Web > interface, including an Integrated Development Environment with Debugger > and database interface. > > +- web2py has a small footprint and is very fast. It uses the > Rocket``rocket``:cite WSGI web server developed by Timothy Farrell. It is > as fast as Apache with mod_wsgi, and supports SSL and IPv6. > 70c70 > < + label='what is yout name?', > --- > > + label='what is your name?', > 89c89 > < +You code is likely to include hardcoded strings such as "What is your > name?". You should be able to customize strings without editing the code > and in particular insert translations for these strings in different > languages. In this wasy if a visitor has the language preference of the > browser set to "Italian", web2py will use the Italian translation for the > strings, if available. This feature of web2py is called > "internationalization" and it is described in more detail in the next > chapter. > --- > > +You code is likely to include hardcoded strings such as "What is your > name?". You should be able to customize strings without editing the code > and in particular insert translations for these strings in different > languages. In this way if a visitor has the language preference of the > browser set to "Italian", web2py will use the Italian translation for the > strings, if available. This feature of web2py is called > "internationalization" and it is described in more detail in the next > chapter. > 91c91 > < +Here we just observe that in order to use this feature you should > markup strings that need stranslation. This is done by wrapping a a quoted > string in code such as > --- > > +Here we just observe that in order to use this feature you should > markup strings that needs translation. This is done by wrapping a a quoted > string in code such as > 118c118 > < +Once the strings are indentified and marked up, web2py takes care of > almost evrything else. The admin interface also provides a page where you > can translate each string in the languages you desire to support. > --- > > +Once the strings are identified and marked up, web2py takes care of > almost everything else. The admin interface also provides a page where you > can translate each string in the languages you desire to support. > 197c197 > < +Here we assume we are starting from cratch from a simple clone of the > "welcome" application called "wikidemo". Edit the controller and replace > the "index" action with > --- > > +Here we assume we are starting from scratch from a simple clone of the > "welcome" application called "wikidemo". Edit the controller and replace > the "index" action with > 253,255c253,255 > < +- ``render`` which defaults to ``'markmin'`` but can be set equal to > ``'html'``. It termines the syntax of the wiki. We will discuss the makrmin > wiki markup later. If you change it to HTML you may want to use a wysiwyg > javascript editor such as TinyMCE of NicEdit. > < +- ``manage_permissions``. This is set to ``False`` by default and only > recognizes permissions for "wiki-editor" and "wiki-author". If you change > it to ``True`` the create/edit page will give the option to specify by > names the groups whose members have permssion to read and edit the page. In > this case is a group "everybody" to give read permission to everybody. > < +- ``force_prefix``. If set to something like ``'%(id)s-'`` it will > restict authors (not editors) to create page with a prefix like "[user > id]-[page name]". The prefix can contain the id ("%(id)s") or the username > ("%(username)s") or any other field from the auth_user table, as long as > the corresponding column contains valid string that would pass URL > validation. > --- > > +- ``render`` which defaults to ``'markmin'`` but can be set equal to > ``'html'``. It termines the syntax of the wiki. We will discuss the markmin > wiki markup later. If you change it to HTML you may want to use a wysiwyg > javascript editor such as TinyMCE of NicEdit. > > +- ``manage_permissions``. This is set to ``False`` by default and only > recognizes permissions for "wiki-editor" and "wiki-author". If you change > it to ``True`` the create/edit page will give the option to specify by > names the groups whose members have permission to read and edit the page. > In this case is a group "everybody" to give read permission to everybody. > > +- ``force_prefix``. If set to something like ``'%(id)s-'`` it will > restrict authors (not editors) to create page with a prefix like "[user > id]-[page name]". The prefix can contain the id ("%(id)s") or the username > ("%(username)s") or any other field from the auth_user table, as long as > the corresponding column contains valid string that would pass URL > validation. > 257c257 > < +- ``menugroups``. This defaults to ``None`` and it indictates that wiki > management menu (search, create, edit, etc.) is always displayed. You can > set it to a list of group names whose members only can see this menu, for > exmaple ``['wiki-editor','wiki-author']``. Notice that even if the menu is > exposed to everybody does not mean everybody is allowed to perform actions > listed in the menu since they are regulated by the access control system. > --- > > +- ``menugroups``. This defaults to ``None`` and it indicates that wiki > management menu (search, create, edit, etc.) is always displayed. You can > set it to a list of group names whose members only can see this menu, for > example ``['wiki-editor','wiki-author']``. Notice that even if the menu is > exposed to everybody does not mean everybody is allowed to perform actions > listed in the menu since they are regulated by the access control system. > 283c283 > < +``auth.wiki`` is more powerful than the barebone MARKMIN helpers. In > fact it supports oembed and components. > --- > > +``auth.wiki`` is more powerful than the barebones MARKMIN helpers, > supporting oembed and components. > 299c299 > < +This call the join function passed as extra with parameters > ``a,b,c=1,2,3`` and will be redered as ``1-2-3``. > --- > > +This call the join function passed as extra with parameters > ``a,b,c=1,2,3`` and will be rendered as ``1-2-3``. > 309c309 > < +- If the URL points to a Youtube page, a Viemo page, or a Flickr page, > web2py contacts the corrsponding web service and queries it about the > propor way to embed the contect. This is done using the ``oembed`` protocol. > --- > > +- If the URL points to a Youtube page, a Vimeo page, or a Flickr page, > web2py contacts the corresponding web service and queries it about the > proper way to embed the content. This is done using the ``oembed`` protocol. > 349c349 > < +This is implemeneted in the web2py file ``gluon.contrib.autolinks`` and > specifically in the function ``expand_one``. You can extend oembed support > by registering more services. This is done by appending an entry to the > ``EMBED_MAPS`` list: > --- > > +This is implemented in the web2py file ``gluon.contrib.autolinks`` and > specifically in the function ``expand_one``. You can extend oembed support > by registering more services. This is done by appending an entry to the > ``EMBED_MAPS`` list: > 352c352 > < +from gluon.contrib.autlinks import EMBED_MAPS > --- > > +from gluon.contrib.autolinks import EMBED_MAPS > 373c373 > < +Similarly you can use the wiki menu to upload a media file (for example > an image) linked to the page. The "manage media" page will show all files > you have uploaded and will show the proper expression to link the media > file. If, for example you upload a file "test.jpg" with title "beach", the > link expression will somthing like: > --- > > +Similarly you can use the wiki menu to upload a media file (for example > an image) linked to the page. The "manage media" page will show all files > you have uploaded and will show the proper expression to link the media > file. If, for example you upload a file "test.jpg" with title "beach", the > link expression will something like: > 394c394 > < +- - Countact us > \@////contactus > --- > > +- - Contact us > \@////contactus > 397c397 > < +Each line a menu item. We used double dash for nested menu ites. The > ``>`` symbols separates the menu item title from the menu item link. > --- > > +Each line a menu item. We used double dash for nested menu items. The > ``>`` symbols separates the menu item title from the menu item link. > 407c407 > < +Notice that there is nothing special with the word "sidebar". Any wiki > page can be retrieved and emebdded in any point in your code. This allows > you mix and match wiki functionalities with regular web2py functionalities. > --- > > +Notice that there is nothing special with the word "sidebar". Any wiki > page can be retrieved and embedded in any point in your code. This allows > you mix and match wiki functionalities with regular web2py functionalities. > 445c445 > < +This allows the visitor interact with the component via Ajax without > reloadin the host page that embeds the widget. Basically the action is > called via Ajax, inherits the stile of the host page, and capture all forms > submissions and flash messages so that thye are handled within the current > page. On top of this the ``SQLFORM.grid`` widget uses digitally signed URLs > to restrict access. More informaiton about components can be found in > chapter 13. > --- > > +This allows the visitor interact with the component via Ajax without > reloading the host page that embeds the widget. Basically the action is > called via Ajax, inherits the stile of the host page, and capture all forms > submissions and flash messages so that they are handled within the current > page. On top of this the ``SQLFORM.grid`` widget uses digitally signed URLs > to restrict access. More information about components can be found in > chapter 13. > 456c456 > < +Most users will be able to build relatively complex applications simply > by using ``auth.wiki`` to create pages and menus, and embedded custom > components into wiki pages. Wiki can be tough as a mechanism to allow > members of the group to create pages but they calso be though as a way to > develop applications in a modular way. > --- > > +Most users will be able to build relatively complex applications simply > by using ``auth.wiki`` to create pages and menus and embedded custom > components into wiki pages. Wikis can be thought of as a mechanism to allow > members of the group to create pages, but they can also be thought of as a > way to develop applications in a modular way. > 475,476c475,476 > < +If you run web2py from source and you have ``pyhton-git`` installed, > you can install applications directly from git reporsitory using the > ``.git`` URL in the upload form. In this case you will also be used to user > the admin interface to push changes back into the repository. > < +If the Google App Engine SDK is installer the admin ''site'' page shows > a button to push your applications to GAE. If ``python-git`` is installed, > there is also a button to push your application to Open Shift. To install > applications on ``heroku`` or other hosting system you should look into the > "scripts" folder for the appropriate script. > --- > > +If you run web2py from source and you have ``python-git`` installed, > you can install applications directly from git repository using the > ``.git`` URL in the upload form. In this case you will also be used to user > the admin interface to push changes back into the repository. > > +If the Google App Engine SDK is installer the admin ''site'' page shows > a button to push your applications to GAE. If ``python-git`` is installed, > there is also a button to push your application to Open Shift. To install > applications on ``Heroku`` or other hosting system you should look into the > "scripts" folder for the appropriate script. > 480c480 > < +##### Intergated debugger > --- > > +##### Integrated debugger > 490c490 > < +and frontend, with a JSONRPC-like stream protocol. ``qdb``:cite > --- > > +and frontend, with a JSON-RPC-like stream protocol. ``qdb``:cite > 507c507 > < +Notice that the admin application includes "plugin_jqmodile" which > packages jQuery Mobile. When admin is accessed from a mobile devide, this > is detected by web2py and the interface is displayed using a mobile > friendly layout. > --- > > +Notice that the admin application includes "plugin_jqmodile" which > packages jQuery Mobile. When admin is accessed from a mobile device; this > is detected by web2py and the interface is displayed using a > mobile-friendly layout. > 629c629 > < +``response.headers``: a ``dict`` for HTTP response headers. Web2py sets > some headers by default, including "Content-Length", "Content-Type", and > "X-Powered-By" (set equal to web2py). Web2py also sets the "Cache-Control", > "Expires", and "Pragma" headers to prevent client-side caching, except for > static file requests, for which client-side caching is enabled. The headers > that web2py sets can be overwritten or removed, and new headers can be > added (e.g., ``response.headers['Cache-Control'] = 'private'``). You can > remove a header removing its key from the response.headers dict, e.g.``del > response.headers['Custom-Header']``, however web2py's default headers will > be re-added just before returning the response. To avoid this behaviour, > just set the header value to None, e.g. to remove the default Content-Type > header, ``response.headers['Content-Type'] = None`` > --- > > +``response.headers``: a ``dict`` for HTTP response headers. Web2py sets > some headers by default, including "Content-Length", "Content-Type", and > "X-Powered-By" (set equal to web2py). Web2py also sets the "Cache-Control", > "Expires", and "Pragma" headers to prevent client-side caching, except for > static file requests, for which client-side caching is enabled.... > Show > original<https://groups.google.com/group/web2py/msg/e75c418b11ee9cc3?dmode=source&output=gplain&noredirect> > --

