web2py Application Development Cookbook
Formats:
save 15%!
save 37%!
Free Shipping!
| Also available on: |
|
- Take your web2py skills to the next level by dipping into delicious, usable recipes in this cookbook
- Learn advanced web2py usage from building advanced forms to creating PDF reports
- Written by developers of the web2py project with plenty of code examples for interesting and comprehensive learning
Book Details
Language : EnglishPaperback : 364 pages [ 235mm x 191mm ]
Release Date : March 2012
ISBN : 1849515468
ISBN 13 : 9781849515467
Author(s) : Mariano Reingart, Bruno Cezar Rocha, Jonathan Lundell, Pablo Martin Mulone, Michele Comitini, Richard Gordon, Massimo Di Pierro
Topics and Technologies : All Books, Cookbooks, Open Source, Python
Table of Contents
PrefaceChapter 1: Deploying web2py
Chapter 2: Building Your First Application
Chapter 3: Database Abstraction Layer
Chapter 4: Advanced Forms
Chapter 5: Adding Ajax Effects
Chapter 6: Using Third-party Libraries
Chapter 7: Web Services
Chapter 8: Authentication and Authorization
Chapter 9: Routing Recipes
Chapter 10: Reporting Recipes
Chapter 11: Other Tips and Tricks
Index
- Chapter 1: Deploying web2py
- Introduction
- Installing web2py on Windows (from source code)
- Installing web2py in Ubuntu
- Setting up a production deployment on Ubuntu
- Running web2py with Apache, mod_proxy, and mod_rewrite
- Running web2py with Lighttpd
- Running web2py with Cherokee
- Running web2py with Nginx and uWSGI
- Running web2py on shared hosts using CGI
- Running web2py on shared hosts with mod_proxy
- Running web2py from a user-defined folder
- Installing web2py as a service in Ubuntu
- Running web2py with IIS as a proxy
- Running web2py with ISAPI
- Chapter 2: Building Your First Application
- Introduction
- Improving the scaffolding application
- Building a simple contacts application
- Building a Reddit clone
- Building a Facebook clone
- Using crud.archive
- Converting an existing static site into a web2py application
- Creating semi-static pages (flatpages)
- Adding your custom logo
- Creating menus and submenus
- Customizing menus with icons
- Creating a navigation bar
- Using cookies to set the language
- Designing modular applications
- Speeding up downloads
- Chapter 3: Database Abstraction Layer
- Introduction
- Creating a new model
- Creating a model from a CSV file
- Batch upload of your data
- Moving your data from one database to another
- Creating a model from existing MySQL and PostgreSQL databases
- Efficiently searching by tag
- Accessing your database from multiple applications
- Hierarchical category tree
- Creating records on demand
- OR, LIKE, BELONGS, and more on Google App Engine
- Replacing slow virtual fields with DB views
- Chapter 4: Advanced Forms
- Introduction
- Adding confirmation on form submit
- Searching data dynamically
- Embedding multiple forms in one page
- Detecting and blocking concurrent updates
- Creating a form wizard
- De-normalizing data temporarily
- Removing form labels
- Using fileuploader.js
- Uploading files using a LOADed component
- Making image thumbnails from uploaded images
- Monitoring upload progress
- Auto tooltips in forms
- Color picker widget
- Shortening text fields
- Creating multi-table forms
- Creating a multi-table form with references
- Creating a multi-table update form
- Star rating widget
- Chapter 5: Adding Ajax Effects
- Introduction
- Using jquery.multiselect.js
- Creating a select_or_add widget
- Using an autocompletion plugin
- Creating a drop-down date selector
- Improving the built-in ajax function
- Using a slider to represent a number
- Using jqGrid and web2py
- Improving data tables with WebGrid
- Ajaxing your search functions
- Creating sparklines
- Chapter 6: Using Third-party Libraries
- Introduction
- Customizing logging
- Aggregating feeds
- Displaying Tweets
- Plotting with matplotlib
- Extending PluginWiki with an RSS widget
- Chapter 7: Web Services
- Introduction
- Consuming a web2py JSON service with jQuery
- Consuming a JSON-RPC service
- JSON-RPC from JavaScript
- Making amf3 RPC calls from Flex using pyamf
- PayPal integration in Web2py
- PayPal web payments standard
- Getting Flickr photos
- Sending e-mails with Boto through Amazon Web Services (AWS)
- Making GIS amps using mapscript
- Google groups and Google code feeds reader
- Creating SOAP web services
- Chapter 8: Authentication and Authorization
- Introduction
- Customizing Auth
- Using CAPTCHA on login failure
- Using pyGravatar to get avatars for user profile pages
- Multi-user and teacher modes
- Authenticating with Facebook using OAuth 2.0
- Chapter 9: Routing Recipes
- Introduction
- Making cleaner URLs with routes.py
- Creating a simple router
- Adding a URL prefix
- Associating applications with domains
- Omitting the application name
- Removing application name and controllers from URLs
- Replacing underscores with hyphens in URLs
- Mapping favicons.ico and robots.txt
- Using URLs to specify the language
- Chapter 10: Reporting Recipes
- Introduction
- Creating PDF reports
- Creating PDF listings
- Creating pdf labels, badges, and invoices
- Chapter 11: Other Tips and Tricks
- Introduction
- Using PDB and the embedded web2py debugger
- Debugging with Eclipse and PyDev
- Updating web2py using a shell script
- Creating a simple page statistics plugin
- Rounding corners without images or JavaScript
- Setting a cache.disk quota
- Checking if web2py is running using cron
- Building a Mercurial plugin
- Building a pingback plugin
- Changing views for mobile browsers
- Background processing with a database queue
- How to effectively use template blocks
- Making standalone applications with web2py and wxPython
Mariano Reingart
Bruno Cezar Rocha
Jonathan Lundell
Pablo Martin Mulone
Michele Comitini
Richard Gordon
Massimo Di Pierro
Code Downloads
Download the code and support files for this book.
Submit Errata
Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.
Errata
- 1 submitted: last submission 02 Apr 2013Errata type: Others | Page number: 95 | Errata date: 12 June 2012
Change line: response.ajax='web2py_component("%s", "show_itemlist" % URL('showitems') To Line: response.headers['web2py-component-command']='web2py_component("%s", "showitems" % URL('list_items')
Sample chapters
You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.
- Install web2py on windows from source code and run it on Apache, Lighttpd, and Nginx servers
- Build simple applications such as a contacts applications and a facebook clone
- Create a new model and batch upload your data
- Embed multiple forms in one page and create multi-table forms
- Improve the built-in AJAX function and AJAXify your search functions
- Generate PDF reports and charts
- Consume JSON service and integrate Paypal with web2py
- Debug with eclipse and PyDev, learn to build your own plugin
web2py is a free open source full-stack framework for rapid development of fast, scalable, secure and portable database-driven web-based applications. It is written and programmable in Python, and straightforward to run. web2py implements Model-View-Controller design, server-side form validation, and postbacks that make the code more readable, scalable, and maintainable. Are you familiar with web2py, and interested in gaining more advanced knowledge?
web2py Application Development Cookbook gives you the necessary knowledge to make you a web2py expert. Right from teaching you about the database abstraction layer to adding AJAX effects to recipes about recipe, the book will make you a master of web2py through advanced practical recipes without any drudgery or straining the brain.
web2py Application Development Cookbook is the tool you will need to expand and enhance your web2py skills.
This book begins with teaching you running web2py in various different systems followed by building simple applications. It focuses on database abstraction layer next and then explains building advanced forms. Adding stunning AJAX effects, using third party libraries and recipes on web services follow. Advanced recipes on authentication and authorization are taught and then routing and reporting recipes claim your attention. There is a final wrap-up with useful, interesting tips and tricks which you will really enjoy.
In short, this book will make you an expert in web2py in a trouble-free, quick, and easy manner.
This is a cookbook and you may read the chapters in any order. The recipes need not be read sequentially. There are a good amount of code examples and relevant screenshots to ease learning pains.
The target audience are Python developers with basic knowledge of web2py who want to gain further knowledge of web2py.

