Mercurial > p > roundup > code
comparison doc/customizing.txt @ 1151:7e0024954954
making it easier to add new actions, and more docco
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 16 Sep 2002 05:32:09 +0000 |
| parents | 22c78fb54af4 |
| children | e0142ee233e8 |
comparison
equal
deleted
inserted
replaced
| 1150:22c78fb54af4 | 1151:7e0024954954 |
|---|---|
| 1 =================== | 1 =================== |
| 2 Customising Roundup | 2 Customising Roundup |
| 3 =================== | 3 =================== |
| 4 | 4 |
| 5 :Version: $Revision: 1.39 $ | 5 :Version: $Revision: 1.40 $ |
| 6 | 6 |
| 7 .. This document borrows from the ZopeBook section on ZPT. The original is at: | 7 .. This document borrows from the ZopeBook section on ZPT. The original is at: |
| 8 http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx | 8 http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx |
| 9 | 9 |
| 10 .. contents:: | 10 .. contents:: |
| 1870 | 1870 |
| 1871 So now, if the edit attempts to set the assignedto to a user that doesn't have | 1871 So now, if the edit attempts to set the assignedto to a user that doesn't have |
| 1872 the "Fixer" Permission, the error will be raised. | 1872 the "Fixer" Permission, the error will be raised. |
| 1873 | 1873 |
| 1874 | 1874 |
| 1875 Setting up a "wizard" (or "druid") for controlled adding of issues | |
| 1876 ------------------------------------------------------------------ | |
| 1877 | |
| 1878 1. set up the page templates you wish to use for data input | |
| 1879 2. determine what actions need to be taken between the pages - these are | |
| 1880 usually to validate user choices and determine what page is next | |
| 1881 3. encode those actions in methods on the interfaces Client class and insert | |
| 1882 hooks to those actions in the "actions" attribute on that class, like so:: | |
| 1883 | |
| 1884 actions = client.Class.actions + ( | |
| 1885 ('page1_submit', page1SubmitAction), | |
| 1886 ... | |
| 1887 ) | |
| 1888 | |
| 1889 def page1SubmitAction(self): | |
| 1890 # do the page 1 submit stuff, redirecting the user to the appropriate | |
| 1891 # next page if necessary | |
| 1892 | |
| 1893 | |
| 1875 ------------------- | 1894 ------------------- |
| 1876 | 1895 |
| 1877 Back to `Table of Contents`_ | 1896 Back to `Table of Contents`_ |
| 1878 | 1897 |
| 1879 .. _`Table of Contents`: index.html | 1898 .. _`Table of Contents`: index.html |
