诛仙法宝飞升特效大全:[Python]Code samples(Web.py)

来源:百度文库 编辑:九乡新闻网 时间:2024/04/28 12:18:50

Code samples

Simple samples:

All samples are in the public domain. They are intentionally unstyled, and they usually lack features that make them usable. They are intended to show how common patterns are performed in web.py.

  • Skeleton code. The very basics required to get started.
  • Todo-list. The simplest database-driven app possible.
  • Blog. A very simple blog, showing basic CRUD functionality.
  • wiki. A very basic wiki engine.

Deprecated Samples:

These samples no longer works with the current version of web.py, but may still contain good patterns:

  • skeleton code
  • simple todo-list engine
  • simple del.icio.us clone

Real Web Apps:

These are fully functional apps with code that have been built with web.py. Note that these may be using older versions of web.py than the current release.

  • redditriver.com: a mobile version of reddit.com (src and how it was written)
  • webme: a blogging and podcasting system (src)
  • webr: a flickr powered photo gallery
  • colr.org (v5): A site for playing with colors. (see rewrite)
  • todo: a simple web.py example where you can create, delete and edit-in-place an item (CRUD). (src)
  • music-share: a simple web app for music sharing (mp3 files). (src)
  • Google Modules: an iGoogle Gadget directory written in MVC style. (src)
  • Mailer: a very simple mass mailer. (src)
  • MLSS Admin: a system to rate, comment and accept candidates for conferences and likes. (src)
  • Wikitrivia: take randomly generated quizes generated using Wikipedia. (src)

Tips and Tricks:

  • tricks with template.py
  • quick vhosting hack
  • using a metaclass to automate setting urls
  • test your web application with paste
  • Serving Images
  • Create multiple apps using web.py
  • Templating with Genshi