ProjectPyramid/Documentation/source/Plugin_Project_Pyramid.ProjectPyramid.Project.html

branch
eric7
changeset 148
dcbd3a96f03c
parent 147
eb28b4b6f7f5
child 157
ddbc0e38ea1b
--- a/ProjectPyramid/Documentation/source/Plugin_Project_Pyramid.ProjectPyramid.Project.html	Tue Jun 01 19:37:46 2021 +0200
+++ b/ProjectPyramid/Documentation/source/Plugin_Project_Pyramid.ProjectPyramid.Project.html	Sun Jun 06 16:30:37 2021 +0200
@@ -85,10 +85,18 @@
 <td>Private method to adjust the working directory in the arguments list.</td>
 </tr>
 <tr>
+<td><a href="#Project.__assemblePyramidCommand">__assemblePyramidCommand</a></td>
+<td>Private method to assemble the full pyramid command for a given virtual environment.</td>
+</tr>
+<tr>
 <td><a href="#Project.__buildDistribution">__buildDistribution</a></td>
 <td>Private slot to build a distribution file for the current Pyramid project.</td>
 </tr>
 <tr>
+<td><a href="#Project.__createMigration">__createMigration</a></td>
+<td>Private slot to create a new database migration.</td>
+</tr>
+<tr>
 <td><a href="#Project.__createProject">__createProject</a></td>
 <td>Private slot to create a new Pyramid project.</td>
 </tr>
@@ -117,6 +125,10 @@
 <td>Private method to get the path of the virtual environment.</td>
 </tr>
 <tr>
+<td><a href="#Project.__initDatabaseActions">__initDatabaseActions</a></td>
+<td>Private method to initialize the database related actions.</td>
+</tr>
+<tr>
 <td><a href="#Project.__initializeDatabase">__initializeDatabase</a></td>
 <td>Private slot to initialize the database of the Pyramid project.</td>
 </tr>
@@ -141,10 +153,6 @@
 <td>Private slot handling the addition of a new language.</td>
 </tr>
 <tr>
-<td><a href="#Project.__projectPath">__projectPath</a></td>
-<td>Private method to calculate the full path of the Pyramid project.</td>
-</tr>
-<tr>
 <td><a href="#Project.__pyramidInfo">__pyramidInfo</a></td>
 <td>Private slot to show some info about Pyramid.</td>
 </tr>
@@ -153,10 +161,6 @@
 <td>Private slot to start the default web browser with the server URL.</td>
 </tr>
 <tr>
-<td><a href="#Project.__runLoggingServer">__runLoggingServer</a></td>
-<td>Private slot to start the Pyramid Web server with logging.</td>
-</tr>
-<tr>
 <td><a href="#Project.__runPythonShell">__runPythonShell</a></td>
 <td>Private slot to start a Python console for a Pyramid project.</td>
 </tr>
@@ -177,10 +181,6 @@
 <td>Private slot to set the current project.</td>
 </tr>
 <tr>
-<td><a href="#Project.__setupDevelop">__setupDevelop</a></td>
-<td>Private slot to set up the development environment for the current project.</td>
-</tr>
-<tr>
 <td><a href="#Project.__showDocumentation">__showDocumentation</a></td>
 <td>Private slot to show the helpviewer with the Pyramid documentation.</td>
 </tr>
@@ -189,6 +189,14 @@
 <td>Private slot showing all views that would match a given URL.</td>
 </tr>
 <tr>
+<td><a href="#Project.__showMigrationsHistory">__showMigrationsHistory</a></td>
+<td>Private slot to show the full migrations history.</td>
+</tr>
+<tr>
+<td><a href="#Project.__showMigrationsSummary">__showMigrationsSummary</a></td>
+<td>Private slot to show a migrations history summary.</td>
+</tr>
+<tr>
 <td><a href="#Project.__showRoutes">__showRoutes</a></td>
 <td>Private slot showing all URL dispatch routes.</td>
 </tr>
@@ -205,10 +213,18 @@
 <td>Public method to update the message catalogs.</td>
 </tr>
 <tr>
+<td><a href="#Project.downgradeDatabase">downgradeDatabase</a></td>
+<td>Public slot to downgrade the database to the previous or a given version.</td>
+</tr>
+<tr>
 <td><a href="#Project.extractMessages">extractMessages</a></td>
 <td>Public method to extract the messages catalog template file.</td>
 </tr>
 <tr>
+<td><a href="#Project.getAlembicCommand">getAlembicCommand</a></td>
+<td>Public method to get the path to the alembic executable of the current Pyramid project.</td>
+</tr>
+<tr>
 <td><a href="#Project.getMenu">getMenu</a></td>
 <td>Public method to get a reference to the requested menu.</td>
 </tr>
@@ -217,6 +233,10 @@
 <td>Public method to get the names of all menus.</td>
 </tr>
 <tr>
+<td><a href="#Project.getProjectVirtualEnvironment">getProjectVirtualEnvironment</a></td>
+<td>Public method to generate the path of the project virtual environment.</td>
+</tr>
+<tr>
 <td><a href="#Project.getPyramidCommand">getPyramidCommand</a></td>
 <td>Public method to build a Pyramid command.</td>
 </tr>
@@ -245,6 +265,10 @@
 <td>Public method to check, if the given console is a spawning console.</td>
 </tr>
 <tr>
+<td><a href="#Project.migrationsPath">migrationsPath</a></td>
+<td>Public method to get the path to the migrations directory of the current Pyramid project.</td>
+</tr>
+<tr>
 <td><a href="#Project.newForm">newForm</a></td>
 <td>Public method to create a new form.</td>
 </tr>
@@ -265,6 +289,10 @@
 <td>Public method to add our hook methods.</td>
 </tr>
 <tr>
+<td><a href="#Project.projectPath">projectPath</a></td>
+<td>Public method to calculate the full path of the Pyramid project.</td>
+</tr>
+<tr>
 <td><a href="#Project.registerOpenHook">registerOpenHook</a></td>
 <td>Public method to register the open hook to open a translations file in a translations editor.</td>
 </tr>
@@ -280,6 +308,10 @@
 <td><a href="#Project.updateSelectedCatalogs">updateSelectedCatalogs</a></td>
 <td>Public method to update the message catalogs.</td>
 </tr>
+<tr>
+<td><a href="#Project.upgradeDatabase">upgradeDatabase</a></td>
+<td>Public slot to upgrade the database to the head or a given version.</td>
+</tr>
 </table>
 <h3>Static Methods</h3>
 
@@ -327,6 +359,37 @@
 working directory
 </dd>
 </dl>
+<a NAME="Project.__assemblePyramidCommand" ID="Project.__assemblePyramidCommand"></a>
+<h4>Project.__assemblePyramidCommand</h4>
+<b>__assemblePyramidCommand</b>(<i>cmd, virtualEnv</i>)
+
+<p>
+        Private method to assemble the full pyramid command for a given virtual
+        environment.
+</p>
+<dl>
+
+<dt><i>cmd</i> (str)</dt>
+<dd>
+command
+</dd>
+<dt><i>virtualEnv</i> (str)</dt>
+<dd>
+path of the project's Python virtual environment
+</dd>
+</dl>
+<dl>
+<dt>Return:</dt>
+<dd>
+assembled pyramid command
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+str
+</dd>
+</dl>
 <a NAME="Project.__buildDistribution" ID="Project.__buildDistribution"></a>
 <h4>Project.__buildDistribution</h4>
 <b>__buildDistribution</b>(<i></i>)
@@ -335,6 +398,13 @@
         Private slot to build a distribution file for the current Pyramid
         project.
 </p>
+<a NAME="Project.__createMigration" ID="Project.__createMigration"></a>
+<h4>Project.__createMigration</h4>
+<b>__createMigration</b>(<i></i>)
+
+<p>
+        Private slot to create a new database migration.
+</p>
 <a NAME="Project.__createProject" ID="Project.__createProject"></a>
 <h4>Project.__createProject</h4>
 <b>__createProject</b>(<i></i>)
@@ -490,6 +560,13 @@
 str
 </dd>
 </dl>
+<a NAME="Project.__initDatabaseActions" ID="Project.__initDatabaseActions"></a>
+<h4>Project.__initDatabaseActions</h4>
+<b>__initDatabaseActions</b>(<i></i>)
+
+<p>
+        Private method to initialize the database related actions.
+</p>
 <a NAME="Project.__initializeDatabase" ID="Project.__initializeDatabase"></a>
 <h4>Project.__initializeDatabase</h4>
 <b>__initializeDatabase</b>(<i></i>)
@@ -621,33 +698,6 @@
 language code of the new language
 </dd>
 </dl>
-<a NAME="Project.__projectPath" ID="Project.__projectPath"></a>
-<h4>Project.__projectPath</h4>
-<b>__projectPath</b>(<i></i>)
-
-<p>
-        Private method to calculate the full path of the Pyramid project.
-</p>
-<dl>
-<dt>Return:</dt>
-<dd>
-path of the project
-</dd>
-</dl>
-<dl>
-<dt>Return Type:</dt>
-<dd>
-str
-</dd>
-</dl>
-<dl>
-
-<dt>Raises <b>PyramidNoProjectSelectedException</b>:</dt>
-<dd>
-raised, if no project is
-            selected
-</dd>
-</dl>
 <a NAME="Project.__pyramidInfo" ID="Project.__pyramidInfo"></a>
 <h4>Project.__pyramidInfo</h4>
 <b>__pyramidInfo</b>(<i></i>)
@@ -662,13 +712,6 @@
 <p>
         Private slot to start the default web browser with the server URL.
 </p>
-<a NAME="Project.__runLoggingServer" ID="Project.__runLoggingServer"></a>
-<h4>Project.__runLoggingServer</h4>
-<b>__runLoggingServer</b>(<i></i>)
-
-<p>
-        Private slot to start the Pyramid Web server with logging.
-</p>
 <a NAME="Project.__runPythonShell" ID="Project.__runPythonShell"></a>
 <h4>Project.__runPythonShell</h4>
 <b>__runPythonShell</b>(<i></i>)
@@ -678,18 +721,11 @@
 </p>
 <a NAME="Project.__runServer" ID="Project.__runServer"></a>
 <h4>Project.__runServer</h4>
-<b>__runServer</b>(<i>logging=False</i>)
+<b>__runServer</b>(<i></i>)
 
 <p>
         Private slot to start the Pyramid Web server.
 </p>
-<dl>
-
-<dt><i>logging</i> (bool)</dt>
-<dd>
-flag indicating to enable logging
-</dd>
-</dl>
 <a NAME="Project.__selectProject" ID="Project.__selectProject"></a>
 <h4>Project.__selectProject</h4>
 <b>__selectProject</b>(<i></i>)
@@ -718,14 +754,6 @@
 name of the project
 </dd>
 </dl>
-<a NAME="Project.__setupDevelop" ID="Project.__setupDevelop"></a>
-<h4>Project.__setupDevelop</h4>
-<b>__setupDevelop</b>(<i></i>)
-
-<p>
-        Private slot to set up the development environment for the current
-        project.
-</p>
 <a NAME="Project.__showDocumentation" ID="Project.__showDocumentation"></a>
 <h4>Project.__showDocumentation</h4>
 <b>__showDocumentation</b>(<i></i>)
@@ -740,6 +768,20 @@
 <p>
         Private slot showing all views that would match a given URL.
 </p>
+<a NAME="Project.__showMigrationsHistory" ID="Project.__showMigrationsHistory"></a>
+<h4>Project.__showMigrationsHistory</h4>
+<b>__showMigrationsHistory</b>(<i></i>)
+
+<p>
+        Private slot to show the full migrations history.
+</p>
+<a NAME="Project.__showMigrationsSummary" ID="Project.__showMigrationsSummary"></a>
+<h4>Project.__showMigrationsSummary</h4>
+<b>__showMigrationsSummary</b>(<i></i>)
+
+<p>
+        Private slot to show a migrations history summary.
+</p>
 <a NAME="Project.__showRoutes" ID="Project.__showRoutes"></a>
 <h4>Project.__showRoutes</h4>
 <b>__showRoutes</b>(<i></i>)
@@ -782,6 +824,21 @@
 list of file names
 </dd>
 </dl>
+<a NAME="Project.downgradeDatabase" ID="Project.downgradeDatabase"></a>
+<h4>Project.downgradeDatabase</h4>
+<b>downgradeDatabase</b>(<i>revision=None</i>)
+
+<p>
+        Public slot to downgrade the database to the previous or a given
+        version.
+</p>
+<dl>
+
+<dt><i>revision</i> (str)</dt>
+<dd>
+migration revision to downgrade to
+</dd>
+</dl>
 <a NAME="Project.extractMessages" ID="Project.extractMessages"></a>
 <h4>Project.extractMessages</h4>
 <b>extractMessages</b>(<i></i>)
@@ -789,6 +846,26 @@
 <p>
         Public method to extract the messages catalog template file.
 </p>
+<a NAME="Project.getAlembicCommand" ID="Project.getAlembicCommand"></a>
+<h4>Project.getAlembicCommand</h4>
+<b>getAlembicCommand</b>(<i></i>)
+
+<p>
+        Public method to get the path to the alembic executable of the current
+        Pyramid project.
+</p>
+<dl>
+<dt>Return:</dt>
+<dd>
+path to the alembic executable
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+str
+</dd>
+</dl>
 <a NAME="Project.getMenu" ID="Project.getMenu"></a>
 <h4>Project.getMenu</h4>
 <b>getMenu</b>(<i>name</i>)
@@ -835,9 +912,28 @@
 list of str
 </dd>
 </dl>
+<a NAME="Project.getProjectVirtualEnvironment" ID="Project.getProjectVirtualEnvironment"></a>
+<h4>Project.getProjectVirtualEnvironment</h4>
+<b>getProjectVirtualEnvironment</b>(<i></i>)
+
+<p>
+        Public method to generate the path of the project virtual environment.
+</p>
+<dl>
+<dt>Return:</dt>
+<dd>
+path of the Pyramid project virtual environment
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+str
+</dd>
+</dl>
 <a NAME="Project.getPyramidCommand" ID="Project.getPyramidCommand"></a>
 <h4>Project.getPyramidCommand</h4>
-<b>getPyramidCommand</b>(<i>cmd, language=""</i>)
+<b>getPyramidCommand</b>(<i>cmd, language="", virtualEnv=""</i>)
 
 <p>
         Public method to build a Pyramid command.
@@ -853,6 +949,10 @@
 Python variant to get the virtual environment
             for (one of '' or 'Python3')
 </dd>
+<dt><i>virtualEnv</i> (str)</dt>
+<dd>
+path of the project's Python virtual environment
+</dd>
 </dl>
 <dl>
 <dt>Return:</dt>
@@ -976,6 +1076,26 @@
 str
 </dd>
 </dl>
+<a NAME="Project.migrationsPath" ID="Project.migrationsPath"></a>
+<h4>Project.migrationsPath</h4>
+<b>migrationsPath</b>(<i></i>)
+
+<p>
+        Public method to get the path to the migrations directory of the
+        current Pyramid project.
+</p>
+<dl>
+<dt>Return:</dt>
+<dd>
+pathof the directory containing the migrations
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+str
+</dd>
+</dl>
 <a NAME="Project.newForm" ID="Project.newForm"></a>
 <h4>Project.newForm</h4>
 <b>newForm</b>(<i>path</i>)
@@ -1025,6 +1145,33 @@
 <p>
         Public method to add our hook methods.
 </p>
+<a NAME="Project.projectPath" ID="Project.projectPath"></a>
+<h4>Project.projectPath</h4>
+<b>projectPath</b>(<i></i>)
+
+<p>
+        Public method to calculate the full path of the Pyramid project.
+</p>
+<dl>
+<dt>Return:</dt>
+<dd>
+path of the project
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+str
+</dd>
+</dl>
+<dl>
+
+<dt>Raises <b>PyramidNoProjectSelectedException</b>:</dt>
+<dd>
+raised, if no project is
+            selected
+</dd>
+</dl>
 <a NAME="Project.registerOpenHook" ID="Project.registerOpenHook"></a>
 <h4>Project.registerOpenHook</h4>
 <b>registerOpenHook</b>(<i></i>)
@@ -1080,6 +1227,20 @@
 list of filenames
 </dd>
 </dl>
+<a NAME="Project.upgradeDatabase" ID="Project.upgradeDatabase"></a>
+<h4>Project.upgradeDatabase</h4>
+<b>upgradeDatabase</b>(<i>revision=None</i>)
+
+<p>
+        Public slot to upgrade the database to the head or a given version.
+</p>
+<dl>
+
+<dt><i>revision</i> (str)</dt>
+<dd>
+migration revision to upgrade to
+</dd>
+</dl>
 <div align="right"><a href="#top">Up</a></div>
 <hr />
 <hr />

eric ide

mercurial