paulb@118 | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
paulb@118 | 2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
paulb@118 | 3 | <head> |
paulb@118 | 4 | <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type" /> |
paulb@118 | 5 | <title>Creating Applications: Create a Directory</title> |
paulb@118 | 6 | <meta name="generator" |
paulb@118 | 7 | content="amaya 8.1a, see http://www.w3.org/Amaya/" /> |
paulb@118 | 8 | <link href="styles.css" rel="stylesheet" type="text/css" /> |
paulb@118 | 9 | </head> |
paulb@118 | 10 | <body> |
paulb@118 | 11 | <h1>Creating Applications: Create a Directory</h1> |
paulb@118 | 12 | <p>The recommended directory structure of an XSLForms application is as |
paulb@118 | 13 | follows:</p> |
paulb@118 | 14 | <ul> |
paulb@118 | 15 | <li>A top-level directory corresponding to a Python package, |
paulb@118 | 16 | containing...<br /> |
paulb@118 | 17 | <ul> |
paulb@118 | 18 | <li>An <code>__init__.py</code> file and other source files, |
paulb@118 | 19 | containing the <a href="Web-resource.html">Web resources</a> and other |
paulb@118 | 20 | application logic.</li> |
paulb@118 | 21 | <li>A subdirectory containing non-code resources for the |
paulb@118 | 22 | application.</li> |
paulb@118 | 23 | <li>Other package directories, if necessary.</li> |
paulb@118 | 24 | </ul> |
paulb@118 | 25 | </li> |
paulb@118 | 26 | </ul> |
paulb@118 | 27 | <p>For example, we might create a directory structure like this:</p> |
paulb@118 | 28 | <ul> |
paulb@118 | 29 | <li>A top-level directory called <code>Configurator</code>, |
paulb@118 | 30 | containing...<br /> |
paulb@118 | 31 | <ul> |
paulb@118 | 32 | <li>An <code>__init__.py</code> file containing the Web |
paulb@118 | 33 | resources and other application logic.</li> |
paulb@118 | 34 | <li>A subdirectory called <code>Resources</code> containing |
paulb@118 | 35 | non-code resources.</li> |
paulb@118 | 36 | </ul> |
paulb@118 | 37 | </li> |
paulb@118 | 38 | </ul> |
paulb@118 | 39 | <p>In UNIX-style commands, this would be done as follows:</p> |
paulb@118 | 40 | <pre>mkdir Configurator<br />mkdir Configurator/Resources<br />touch Configurator/__init__.py</pre> |
paulb@118 | 41 | <p>It is in the <code>Resources</code> subdirectory that we will save |
paulb@118 | 42 | our template files when <a href="design.html">designing</a> them as |
paulb@118 | 43 | part of the next activity in the application development <a |
paulb@118 | 44 | href="overview.html">process</a>.</p> |
paulb@118 | 45 | </body> |
paulb@118 | 46 | </html> |