Permalink
Browse files

Merge branch 'development'

Conflicts:
	docs/conf.py
  • Loading branch information...
2 parents b2684c7 + 8af4d63 commit 50fd1de333ed37344f26f77fcaf1201c1bc113d5 @pedersen pedersen committed Apr 7, 2012
Showing with 819 additions and 600 deletions.
  1. +3 −3 book/appendices/contributing/prepenv.rst
  2. +2 −1 book/appendices/preprelease.rst
  3. +14 −9 book/part1/install.rst
  4. +1 −1 book/part1/wiki20.rst
  5. +9 −0 book/setup.cfg
  6. +2 −2 docs/conf.py
  7. 0 docs/{main → deprecated}/ManualDatabaseMigration.rst
  8. 0 docs/{main → deprecated}/SimpleWidgetForm.rst
  9. 0 docs/{main → deprecated}/ToscaWidgets/Cookbook.rst
  10. 0 docs/{main → deprecated}/ToscaWidgets/Cookbook/ActiveForm.rst
  11. 0 docs/{main → deprecated}/ToscaWidgets/Cookbook/AutoComplete.rst
  12. 0 docs/{main → deprecated}/ToscaWidgets/Cookbook/DynamicSelect.rst
  13. 0 docs/{main → deprecated}/ToscaWidgets/Cookbook/ExtItemSelector.rst
  14. 0 docs/{main → deprecated}/ToscaWidgets/Cookbook/ExtSingleSelectCombo.rst
  15. 0 docs/{main → deprecated}/ToscaWidgets/Cookbook/ExtTreeView.rst
  16. 0 docs/{main → deprecated}/ToscaWidgets/Cookbook/FlexiGrid.rst
  17. 0 docs/{main → deprecated}/ToscaWidgets/Cookbook/Flot.rst
  18. 0 docs/{main → deprecated}/ToscaWidgets/Cookbook/JQueryAjaxForm.rst
  19. 0 docs/{main → deprecated}/ToscaWidgets/Cookbook/JQueryTreeView.rst
  20. 0 docs/{main → deprecated}/ToscaWidgets/Cookbook/JSUnit.rst
  21. 0 docs/{main → deprecated}/ToscaWidgets/Cookbook/OpenLayersMap.rst
  22. 0 docs/{main → deprecated}/ToscaWidgets/Cookbook/PasswordValidation.rst
  23. 0 docs/{main → deprecated}/ToscaWidgets/Cookbook/ReCaptcha.rst
  24. 0 docs/{main → deprecated}/ToscaWidgets/Creation.rst
  25. 0 docs/{main → deprecated}/ToscaWidgets/ExistingLibraries.rst
  26. 0 docs/{main → deprecated}/ToscaWidgets/FAQ.rst
  27. 0 docs/{main → deprecated}/ToscaWidgets/Future.rst
  28. 0 docs/{main → deprecated}/ToscaWidgets/Library.rst
  29. 0 docs/{main → deprecated}/ToscaWidgets/ToscaWidgets.rst
  30. 0 docs/{main → deprecated}/ToscaWidgets/Using.rst
  31. 0 docs/{main → deprecated}/ToscaWidgets/forms.rst
  32. BIN docs/{main → deprecated}/ToscaWidgets/images/ajaxform1.png
  33. BIN docs/{main → deprecated}/ToscaWidgets/images/ajaxform2.png
  34. 0 docs/{main → deprecated}/ToscaWidgets/images/altitemselector1.png
  35. BIN docs/{main → deprecated}/ToscaWidgets/images/autocomplete1.png
  36. BIN docs/{main → deprecated}/ToscaWidgets/images/autocomplete3.png
  37. BIN docs/{main → deprecated}/ToscaWidgets/images/autocomplete_small.png
  38. BIN docs/{main → deprecated}/ToscaWidgets/images/flexigrid.png
  39. BIN docs/{main → deprecated}/ToscaWidgets/images/flot1.png
  40. BIN docs/{main → deprecated}/ToscaWidgets/images/flot2.png
  41. BIN docs/{main → deprecated}/ToscaWidgets/images/flot3.png
  42. BIN docs/{main → deprecated}/ToscaWidgets/images/itemselector1.png
  43. BIN docs/{main → deprecated}/ToscaWidgets/images/jsunit.png
  44. BIN docs/{main → deprecated}/ToscaWidgets/images/jsunit1.png
  45. BIN docs/{main → deprecated}/ToscaWidgets/images/movie_form_1.png
  46. BIN docs/{main → deprecated}/ToscaWidgets/images/movie_form_2.png
  47. BIN docs/{main → deprecated}/ToscaWidgets/images/movie_form_3.png
  48. BIN docs/{main → deprecated}/ToscaWidgets/images/movie_form_4.png
  49. BIN docs/{main → deprecated}/ToscaWidgets/images/movie_form_5.png
  50. BIN docs/{main → deprecated}/ToscaWidgets/images/movie_form_6.png
  51. BIN docs/{main → deprecated}/ToscaWidgets/images/movie_form_7.png
  52. BIN docs/{main → deprecated}/ToscaWidgets/images/openlayersmap.png
  53. BIN docs/{main → deprecated}/ToscaWidgets/images/passwordverify.png
  54. BIN docs/{main → deprecated}/ToscaWidgets/images/recaptcha_field.jpg
  55. BIN docs/{main → deprecated}/ToscaWidgets/images/simple_register.png
  56. BIN docs/{main → deprecated}/ToscaWidgets/images/singleselectcombo-small.png
  57. BIN docs/{main → deprecated}/ToscaWidgets/images/singleselectcombo.png
  58. BIN docs/{main → deprecated}/ToscaWidgets/images/stars.png
  59. BIN docs/{main → deprecated}/ToscaWidgets/images/stars_avg.png
  60. BIN docs/{main → deprecated}/ToscaWidgets/images/treeview.png
  61. 0 docs/{main → deprecated}/Wiki20/JSONMochiKit.rst
  62. 0 docs/{main → deprecated}/Wiki20/NOTES.txt
  63. 0 docs/{main → deprecated}/Wiki20/wiki20.rst
  64. 0 docs/{main → deprecated}/master_html.rst
  65. +1 −1 docs/{main → deprecated}/movie_tutorial.rst
  66. +14 −7 docs/extensions.rst
  67. +0 −17 docs/gettingstarted.rst
  68. +3 −4 docs/gettingtoknow.rst
  69. +45 −14 docs/index.rst
  70. +1 −1 docs/main/AltInstall.rst
  71. +5 −4 docs/main/AuthorizeTutorial.rst
  72. +1 −0 docs/main/Caching.rst
  73. +2 −2 docs/main/CakePHPIntro.rst
  74. +151 −0 docs/main/Config/MasterSlave.rst
  75. +6 −6 docs/main/DataGrid/index.rst
  76. +1 −1 docs/main/Deployment/ModWSGI.rst
  77. +4 −4 docs/main/DownloadInstall.rst
  78. +11 −11 docs/main/Extensions/Admin/index.rst
  79. +2 −112 docs/main/Extensions/Crud/index.rst
  80. +51 −0 docs/main/Extensions/Pluggable/index.rst
  81. 0 docs/main/{ → Extensions}/Scheduling.rst
  82. +0 −64 docs/main/Extensions/index.rst
  83. +2 −2 docs/main/FormBasics.rst
  84. +53 −5 docs/main/Internationalization.rst
  85. +1 −0 docs/main/MultipleDatabases.rst
  86. +22 −8 docs/main/Pagination/index.rst
  87. +0 −30 docs/main/StaticFile.rst
  88. +0 −34 docs/main/TGandPylons.rst
  89. +0 −10 docs/main/Templates/ChameleonGenshi.rst
  90. +1 −1 docs/main/Templates/Genshi.rst
  91. +0 −1 docs/main/Templates/index.rst
  92. +214 −0 docs/main/TwForms.rst
  93. +82 −0 docs/main/WebFlash.rst
  94. +31 −23 docs/main/explorequickstart.rst
  95. +0 −137 docs/oldindex.rst
  96. +1 −1 docs/project_code/wiki_root/README.txt
  97. +22 −17 docs/recipesandfaq.rst
  98. +0 −14 docs/testimonials.rst
  99. +1 −1 docs/tgtheme/layout.html
  100. BIN docs/tgtheme/static/icons/beginner.png
  101. BIN docs/tgtheme/static/icons/extending.png
  102. BIN docs/tgtheme/static/icons/gears.png
  103. BIN docs/tgtheme/static/icons/recipes.png
  104. BIN docs/tgtheme/static/icons/reference.png
  105. BIN docs/tgtheme/static/icons/tutorials.png
  106. +7 −7 docs/tgtheme/static/tg.css_t
  107. +1 −1 docs/tgtheme/theme.conf
  108. +3 −20 docs/toc.rst
  109. +49 −15 docs/tutorials.rst
  110. +0 −9 docs/whitepapers/cardlist.rst
@@ -73,13 +73,13 @@ following steps:
`TG2.x Devtools`_, and `TG2.x Docs`_).
#. Enter the top level directory for your TG2.x Core clone, and run
- ``python setup.py develop``
+ ``python setup.py tgdevelop`` and ``python setup.py tgdeps``
#. Enter the top level directory for your TG2.x Devtools clone, and
- run ``python setup.py develop``
+ run ``python setup.py tgdevelop`` and ``python setup.py tgdeps``
#. Enter the ``book`` directory for your TG2.x Docs clone, and
- run ``python setup.py develop``
+ run ``python setup.py tgdevelop`` and ``python setup.py tgdeps``
After you've done all this, you have a working copy of the code
sitting in your system. You can explore the code and begin working
@@ -164,7 +164,8 @@ Installing Packages
-------------------
For both Python 2.4 and Python 2.6, create a new virtualenv and run
-``python setup.py develop`` for each of the repositories.
+``python setup.py tgdevelop`` and ``python setup.py tgdeps`` for each
+of the repositories.
Finding the Packages to Upgrade
-------------------------------
@@ -142,7 +142,7 @@ tg.devtools
After activating your virtualenv, you only need to run one command::
- $ easy_install -i http://tg.gy/current/index/ tg.devtools
+ $ easy_install -i http://tg.gy/current tg.devtools
That's it. Once it completes, you now have the TurboGears2 framework
and development tools installed.
@@ -161,7 +161,8 @@ for an application named "Tester". It is assumed to be created at *${HOME}/Teste
Would you prefer mako templates? (yes/[no]): no
Do you need authentication and authorization in this project? ([yes]/no): yes
$ cd Tester
- $ python setup.py develop
+ $ python setup.py testerdevelop
+ $ python setup.py testerdeps
$ paster setup-app development.ini
$ paster serve development.ini
@@ -185,13 +186,16 @@ authorization. This is required for proper SQLAlchemy support (and is
done this way so that Mongo/Cassandra/etc can be better supported
later).::
- $ python setup.py develop
+ $ python setup.py testerdevelop
+ $ python setup.py testerdeps
This installs the "tester" application into your virtualenv in a
-development mode. This means that you do not have to do a reinstall
-every time you make a change. Any changes in the current directory
-will be automatically reflected in your virtualenv without you doing
-any special steps.::
+development mode. It also restricts itself to using the TurboGears
+private index, ensuring you get the right versions of the
+packages. This means that you do not have to do a reinstall every time
+you make a change. Any changes in the current directory will be
+automatically reflected in your virtualenv without you doing any
+special steps.::
$ paster setup-app development.ini
@@ -218,10 +222,11 @@ To summarize the entire process::
$ virtualenv --no-site-packages ${HOME}/tg2env
$ source ${HOME}/tg2env/bin/activate
- $ easy_install -i http://tg.gy/current/index/ tg.devtools
+ $ easy_install -i http://tg.gy/current tg.devtools
$ paster quickstart
$ cd appname
- $ python setup.py develop
+ $ python setup.py tgdevelop
+ $ python setup.py testerdeps
$ paster setup-app development.ini
$ paster serve development.ini
Control-C
@@ -110,7 +110,7 @@ Once you have your development environment prepared (using the
instructions for making a virtualenv above), installing TurboGears2
itself is extremely easy. Run this command::
- $ easy_install -i http://tg.gy/current/index/ tg.devtools
+ $ easy_install -i http://tg.gy/current tg.devtools
Wait a few moments as the dependencies are installed and prepared for
you.
View
@@ -0,0 +1,9 @@
+[aliases]
+# A handy alias to make a release to pypi
+release = egg_info -RDb "" sdist bdist_egg register upload
+tgdevelop = develop -i http://tg.gy/current
+tgdeps = easy_install -i http://tg.gy/current AddOns BytecodeAssembler Chameleon coverage DecoratorTools Extremes Genshi Jinja2 Kajiki kid PEAK_Rules repoze.tm2 repoze.what repoze.what.plugins.sql repoze.what_pylons repoze.what_quickstart repoze.who repoze.who_friendlyform repoze.who.plugins.sa repoze.who_testutil simplegeneric sprox SQLAlchemy SymbolType tgext.admin tgext.crud ToscaWidgets transaction TurboJson TurboKid tw.forms zope.interface zope.sqlalchemy
+
+[egg_info]
+#tag_build = dev
+#tag_svn_revision = true
View
@@ -257,17 +257,17 @@
# Add Intersphinx crosslinks here
intersphinx_mapping = {
'paste': ('http://pythonpaste.org', None),
- 'pylons': ('http://docs.pylonsproject.org/projects/pylons_framework/dev/', None),
'python': ('http://docs.python.org', None),
'sprox': ('http://sprox.org', None),
'sqlalchemy': ('http://www.sqlalchemy.org/docs', None),
'rum': ('http://docs.python-rum.org', None),
'tw': ('http://toscawidgets.org/documentation/ToscaWidgets/', None),
'twdynforms': ('http://toscawidgets.org/documentation/tw.dynforms/', None),
+ 'tw2' : ('http://tw2core.readthedocs.org/en/latest/', None),
'twforms': ('http://toscawidgets.org/documentation/tw.forms/', None),
'twjquery': ('http://toscawidgets.org/documentation/tw.jquery/', None),
'webob': ('http://pythonpaste.org/webob/', None),
- 'webtest': ('http://pythonpaste.org/webtest/', None),
+ 'webtest': ('http://pythonpaste.org/webtest/', None)
}
# The maximum number of days to cache remote inventories.
File renamed without changes.
File renamed without changes.
@@ -28,7 +28,7 @@ On a Linux machine with virtualenv already installed, this is accomplished with:
virtualenv --no-site-packages movies
cd movies
source bin/activate
- easy_install -i http://tg.gy/current/index/ tg.devtools
+ easy_install -i http://tg.gy/current tg.devtools
Complete instructions for setting up TurboGears, VirtualEnv and the like
are available on the :ref:`Download and Install <DownloadInstall>` page.
View
@@ -1,19 +1,26 @@
.. _extensions-and-tools:
==========================
-Extending and Contributing
+Extensions and Tools
==========================
- .. toctree::
- :maxdepth: 2
+TG2 has some extensions which offer built-in functionality you can add
+to your application. This is somewhat different from installing a
+WSGI application in your stack because the extensions are intended to
+be more tightly integrated with the components that make up a
+TurboGears application.
- main/Extensions/index
+This is a list of core TurboGears extensions and tutorials that involve optional packages.
.. toctree::
:maxdepth: 1
- main/Caching
- main/LogSetup
- main/Scheduling
+ main/Extensions/Crud/index
+ main/Extensions/Admin/index
+ main/Extensions/Pluggable/index
+ main/Extensions/Command/index
+ main/Extensions/Scheduling
+ main/Extensions/Geo/index
+ main/AuthorizeTutorial
@@ -1,17 +0,0 @@
-.. _getting-started:
-
-===============
-Getting Started
-===============
-
-Most new users should follow the :ref:`downloadinstall` and then continue on
-to :ref:`quickstarting`, after which they should explore the :ref:`tutorials`
-
-.. toctree::
- :maxdepth: 1
-
- main/DownloadInstall
- main/AltInstall
- main/QuickStart
- main/explorequickstart
- main/DatabaseMigration
@@ -1,8 +1,8 @@
.. _getting-to-know:
-===================
-The Gears in Detail
-===================
+=============================
+About the TurboGears Project
+=============================
This document describes the internal workings of TurboGears, how
the system is constructed, how the pieces fit together, and how
@@ -36,7 +36,6 @@ General Project Information
main/Contributing
main/bitbucket_tutorial
main/License
- main/TGandPylons
building_docs
main/testing_core
View
@@ -5,27 +5,58 @@
.. toctree::
:hidden:
-
- gettingstarted
+
tutorials
extensions
gettingtoknow
recipesandfaq
- oldindex
toc
- main/ManualDatabaseMigration
-
The TurboGears documentation
============================
-+-------------------------------------------------+----------------------------------------------+------------------------------------------------------------+
-| .. container:: part-beginner | .. container:: part-tutorials | .. container:: part-extending |
-| | | |
-| :ref:`Getting Started <getting-started>` | :ref:`Advanced Tutorials <tutorials>` | :ref:`Extending and Contributing <extensions-and-tools>`|
-+-------------------------------------------------+----------------------------------------------+------------------------------------------------------------+
-| .. container:: part-gears | .. container:: part-recipes | .. container:: part-reference |
-| | | |
-| :ref:`The Gears in Detail <getting-to-know>` | :ref:`Tips and Recipes <recipes-and-faq>` | :ref:`Index and API Reference <genindex>` |
-+-------------------------------------------------+----------------------------------------------+------------------------------------------------------------+
++----------------------------------------------+-------------------------------------------------+------------------------------------------------------------+-------------------------------------------------+----------------------------------------------+
+| .. container:: part-tutorials | .. container:: part-recipes | .. container:: part-extending | .. container:: part-gears | .. container:: part-reference |
+| | | | | |
+| :ref:`Get Started <tutorials>` | :ref:`Recipes and Tips <recipes-and-faq>` | :ref:`Extensions and Tools <extensions-and-tools>` | :ref:`About TurboGears <getting-to-know>` | :ref:`Index and API Reference <genindex>` |
++----------------------------------------------+-------------------------------------------------+------------------------------------------------------------+-------------------------------------------------+----------------------------------------------+
+
+The TurboGears Web Framework
+==============================
+
+TurboGears is an :ref:`ObjectDispatch <writing_controllers>` based Python web development framework made for rapid projects development.
+
+.. code-block:: python
+
+ from tg import expose
+ from helloworld.lib.base import BaseController
+
+ class RootController(BaseController):
+ @expose()
+ def index(self):
+ return "<h1>Hello World</h1>"
+
+TurboGears is meant to run inside python virtualenv and provides its own private index to
+avoid messing with your system packages and to provide a reliable set of packages that will
+correctly work together.
+
+.. code-block:: bash
+
+ $ virtualenv --no-site-packages tg2env
+ $ source tg2env/bin/activate
+ (tg2env)$ easy_install -i http://tg.gy/current tg.devtools
+
+To try TurboGears feel free to *quickstart* a new TurboGears application and start
+playing around:
+
+.. code-block:: bash
+
+ (tg2env)$ paster quickstart -n -x example
+ (tg2env)$ cd example/
+ (tg2env)$ python setup.py develop
+ (tg2env)$ paster serve development.ini
+
+Visiting *http://localhost:8080/index* you will see a ready made sample application
+with a brief introduction to the framework itself.
+Explore the :ref:`TurboGears Tutorials <tutorials>` to get started with TurboGears!
@@ -52,7 +52,7 @@ so that you can run Python and easy_install from the command line.
c:\working>c:\Python26\Scripts\virtualenv.exe example
c:\working>cd example
c:\working\example>Scripts\activate.bat
- (example) C:\working\example>easy_install.exe -i http://tg.gy/current/index/ tg.devtools
+ (example) C:\working\example>easy_install.exe -i http://tg.gy/current tg.devtools
(example) C:\working\example>paster quickstart example
(example) C:\working\example>cd example
(example) C:\working\example\example>python setup.py develop
@@ -27,11 +27,11 @@ Defining The Validator
First we will need to define our ProcessCard() class which will be the
chained FancyValidator for processing the card::
- import tw.forms as twf
+ from formencode import FancyValidator, Invalid
from authorize import aim as aim_api
# FancyValidator to process the Credit Card using the authorize package
- class ProcessCard(twf.validators.FancyValidator):
+ class ProcessCard(FancyValidator):
def _to_python(self, value, state):
# Setup the aim Api object.
aim = aim_api.Api(AUTHNET_LOGIN, AUTHNET_KEY, is_test=False)
@@ -49,13 +49,14 @@ chained FancyValidator for processing the card::
return value
else:
# failure
- raise twf.validators.Invalid(result_dict['reason_text'], value, state)
+ raise Invalid(result_dict['reason_text'], value, state)
Defining The Form
-----------------
Next we'll define our form class that will end up being passed to the
-view::
+view. This example defines the form using ToscaWidgets1, but it should
+be fairly simple to adapt it to ToscaWidgets2 which is now the default::
from tw.api import WidgetsList
@@ -156,6 +156,7 @@ Another speed boost can be achieved by disabling template automatic reloading.
[app:main]
auto_reload_templates = false
+.. _prerendered-templates-cache:
Prerendered Templates Caches
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -46,7 +46,7 @@ easy to use forms creation & validation framework:
+-------------------------+-----------------------------+-------------------------------------------+
| Security Framework: | Security component | ``repoze.who`` & ``repoze.what`` |
+-------------------------+-----------------------------+-------------------------------------------+
-| Forms Framework: | Form helper | ``tw.forms`` & ``formencode`` |
+| Forms Framework: | Form helper | ``tw2.forms`` & ``formencode`` |
+-------------------------+-----------------------------+-------------------------------------------+
| Caching Framework: | Yes | ``beaker`` |
+-------------------------+-----------------------------+-------------------------------------------+
@@ -264,7 +264,7 @@ TurboGears equivalent that is typically used:
+------------------------+-------------------------------------------+
| Cache | ``beaker`` |
+------------------------+-------------------------------------------+
-| Form | ``tw.forms`` and/or ``sprox`` |
+| Form | ``tw2.forms`` and/or ``sprox`` |
+------------------------+-------------------------------------------+
| HTML | ``webhelpers.html`` |
+------------------------+-------------------------------------------+
Oops, something went wrong.

0 comments on commit 50fd1de

Please sign in to comment.