ProjectDjango/Documentation/source/Plugin_Project_Django.ProjectDjango.DjangoMigrationsListDialog.html

Sat, 29 May 2021 18:33:03 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 29 May 2021 18:33:03 +0200
branch
eric7
changeset 172
ea7980ded4f3
parent 169
b8f263e05c39
child 176
1395e0583f4e
permissions
-rw-r--r--

Ported the plug-in to PyQt6 for eric7.

<!DOCTYPE html>
<html><head>
<title>Plugin_Project_Django.ProjectDjango.DjangoMigrationsListDialog</title>
<meta charset="UTF-8">
<style>
body {
    background: #EDECE6;
    margin: 0em 1em 10em 1em;
    color: black;
}

h1 { color: white; background: #85774A; }
h2 { color: white; background: #85774A; }
h3 { color: white; background: #9D936E; }
h4 { color: white; background: #9D936E; }
    
a { color: #BA6D36; }

</style>
</head>
<body>
<a NAME="top" ID="top"></a>
<h1>Plugin_Project_Django.ProjectDjango.DjangoMigrationsListDialog</h1>

<p>
Module implementing a dialog show a list of all available migrations.
</p>
<h3>Global Attributes</h3>

<table>
<tr><td>None</td></tr>
</table>
<h3>Classes</h3>

<table>

<tr>
<td><a href="#DjangoMigrationsListDialog">DjangoMigrationsListDialog</a></td>
<td>Class implementing a dialog show a list of all available migrations.</td>
</tr>
</table>
<h3>Functions</h3>

<table>
<tr><td>None</td></tr>
</table>
<hr />
<hr />
<a NAME="DjangoMigrationsListDialog" ID="DjangoMigrationsListDialog"></a>
<h2>DjangoMigrationsListDialog</h2>

<p>
    Class implementing a dialog show a list of all available migrations.
</p>
<h3>Derived from</h3>
QDialog, Ui_DjangoMigrationsListDialog
<h3>Class Attributes</h3>

<table>
<tr><td>MigrationsListMode</td></tr><tr><td>MigrationsPlanMode</td></tr>
</table>
<h3>Class Methods</h3>

<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>

<table>

<tr>
<td><a href="#DjangoMigrationsListDialog.__init__">DjangoMigrationsListDialog</a></td>
<td>Constructor</td>
</tr>
<tr>
<td><a href="#DjangoMigrationsListDialog.__applyAllMigrations">__applyAllMigrations</a></td>
<td>Private slot to apply all migrations.</td>
</tr>
<tr>
<td><a href="#DjangoMigrationsListDialog.__applyMigration">__applyMigration</a></td>
<td>Private slot to apply the selected migrations.</td>
</tr>
<tr>
<td><a href="#DjangoMigrationsListDialog.__createListItem">__createListItem</a></td>
<td>Private method to create an item for list mode.</td>
</tr>
<tr>
<td><a href="#DjangoMigrationsListDialog.__createPlanItem">__createPlanItem</a></td>
<td>Private method to create an item for plan mode.</td>
</tr>
<tr>
<td><a href="#DjangoMigrationsListDialog.__finish">__finish</a></td>
<td>Private slot called when the process finished or the user pressed the button.</td>
</tr>
<tr>
<td><a href="#DjangoMigrationsListDialog.__makeMigrations">__makeMigrations</a></td>
<td>Private slot to make migrations for the selected apps.</td>
</tr>
<tr>
<td><a href="#DjangoMigrationsListDialog.__procFinished">__procFinished</a></td>
<td>Private slot connected to the finished signal.</td>
</tr>
<tr>
<td><a href="#DjangoMigrationsListDialog.__readStderr">__readStderr</a></td>
<td>Private slot to handle the readyReadStderr signal.</td>
</tr>
<tr>
<td><a href="#DjangoMigrationsListDialog.__readStdout">__readStdout</a></td>
<td>Private slot to handle the readyReadStdout signal.</td>
</tr>
<tr>
<td><a href="#DjangoMigrationsListDialog.__resizeColumns">__resizeColumns</a></td>
<td>Private method to resize the list columns.</td>
</tr>
<tr>
<td><a href="#DjangoMigrationsListDialog.__unapplyMigration">__unapplyMigration</a></td>
<td>Private slot to unapply the selected migrations.</td>
</tr>
<tr>
<td><a href="#DjangoMigrationsListDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td>
<td>Private slot called by a button of the button box clicked.</td>
</tr>
<tr>
<td><a href="#DjangoMigrationsListDialog.on_migrationsList_customContextMenuRequested">on_migrationsList_customContextMenuRequested</a></td>
<td>Private slot to show the context menu.</td>
</tr>
<tr>
<td><a href="#DjangoMigrationsListDialog.on_refreshButton_clicked">on_refreshButton_clicked</a></td>
<td>Private slot to refresh the log.</td>
</tr>
<tr>
<td><a href="#DjangoMigrationsListDialog.start">start</a></td>
<td>Public slot used to start the process.</td>
</tr>
</table>
<h3>Static Methods</h3>

<table>
<tr><td>None</td></tr>
</table>

<a NAME="DjangoMigrationsListDialog.__init__" ID="DjangoMigrationsListDialog.__init__"></a>
<h4>DjangoMigrationsListDialog (Constructor)</h4>
<b>DjangoMigrationsListDialog</b>(<i>mode, django, parent=None</i>)

<p>
        Constructor
</p>
<dl>

<dt><i>mode</i> (str)</dt>
<dd>
mode of the dialog
</dd>
<dt><i>django</i> (Project)</dt>
<dd>
reference to the Django project object
</dd>
<dt><i>parent</i> (QWidget)</dt>
<dd>
reference to the parent widget
</dd>
</dl>
<a NAME="DjangoMigrationsListDialog.__applyAllMigrations" ID="DjangoMigrationsListDialog.__applyAllMigrations"></a>
<h4>DjangoMigrationsListDialog.__applyAllMigrations</h4>
<b>__applyAllMigrations</b>(<i></i>)

<p>
        Private slot to apply all migrations.
</p>
<a NAME="DjangoMigrationsListDialog.__applyMigration" ID="DjangoMigrationsListDialog.__applyMigration"></a>
<h4>DjangoMigrationsListDialog.__applyMigration</h4>
<b>__applyMigration</b>(<i></i>)

<p>
        Private slot to apply the selected migrations.
</p>
<a NAME="DjangoMigrationsListDialog.__createListItem" ID="DjangoMigrationsListDialog.__createListItem"></a>
<h4>DjangoMigrationsListDialog.__createListItem</h4>
<b>__createListItem</b>(<i>line</i>)

<p>
        Private method to create an item for list mode.
</p>
<dl>

<dt><i>line</i> (str)</dt>
<dd>
line of text
</dd>
</dl>
<a NAME="DjangoMigrationsListDialog.__createPlanItem" ID="DjangoMigrationsListDialog.__createPlanItem"></a>
<h4>DjangoMigrationsListDialog.__createPlanItem</h4>
<b>__createPlanItem</b>(<i>line</i>)

<p>
        Private method to create an item for plan mode.
</p>
<dl>

<dt><i>line</i> (str)</dt>
<dd>
line of text
</dd>
</dl>
<a NAME="DjangoMigrationsListDialog.__finish" ID="DjangoMigrationsListDialog.__finish"></a>
<h4>DjangoMigrationsListDialog.__finish</h4>
<b>__finish</b>(<i></i>)

<p>
        Private slot called when the process finished or the user pressed the
        button.
</p>
<a NAME="DjangoMigrationsListDialog.__makeMigrations" ID="DjangoMigrationsListDialog.__makeMigrations"></a>
<h4>DjangoMigrationsListDialog.__makeMigrations</h4>
<b>__makeMigrations</b>(<i>dryRun=False, empty=False</i>)

<p>
        Private slot to make migrations for the selected apps.
</p>
<dl>

<dt><i>dryRun</i> (bool)</dt>
<dd>
flag indicating a dry-run
</dd>
<dt><i>empty</i> (bool)</dt>
<dd>
flag indicating an empty migration
</dd>
</dl>
<a NAME="DjangoMigrationsListDialog.__procFinished" ID="DjangoMigrationsListDialog.__procFinished"></a>
<h4>DjangoMigrationsListDialog.__procFinished</h4>
<b>__procFinished</b>(<i>exitCode, exitStatus</i>)

<p>
        Private slot connected to the finished signal.
</p>
<dl>

<dt><i>exitCode</i> (int)</dt>
<dd>
exit code of the process
</dd>
<dt><i>exitStatus</i> (QProcess.ExitStatus)</dt>
<dd>
exit status of the process
</dd>
</dl>
<a NAME="DjangoMigrationsListDialog.__readStderr" ID="DjangoMigrationsListDialog.__readStderr"></a>
<h4>DjangoMigrationsListDialog.__readStderr</h4>
<b>__readStderr</b>(<i></i>)

<p>
        Private slot to handle the readyReadStderr signal.
</p>
<p>
        It reads the error output of the process and inserts it into the
        error pane.
</p>
<a NAME="DjangoMigrationsListDialog.__readStdout" ID="DjangoMigrationsListDialog.__readStdout"></a>
<h4>DjangoMigrationsListDialog.__readStdout</h4>
<b>__readStdout</b>(<i></i>)

<p>
        Private slot to handle the readyReadStdout signal.
</p>
<p>
        It reads the output of the process, formats it and inserts it into
        the contents pane.
</p>
<a NAME="DjangoMigrationsListDialog.__resizeColumns" ID="DjangoMigrationsListDialog.__resizeColumns"></a>
<h4>DjangoMigrationsListDialog.__resizeColumns</h4>
<b>__resizeColumns</b>(<i></i>)

<p>
        Private method to resize the list columns.
</p>
<a NAME="DjangoMigrationsListDialog.__unapplyMigration" ID="DjangoMigrationsListDialog.__unapplyMigration"></a>
<h4>DjangoMigrationsListDialog.__unapplyMigration</h4>
<b>__unapplyMigration</b>(<i></i>)

<p>
        Private slot to unapply the selected migrations.
</p>
<a NAME="DjangoMigrationsListDialog.on_buttonBox_clicked" ID="DjangoMigrationsListDialog.on_buttonBox_clicked"></a>
<h4>DjangoMigrationsListDialog.on_buttonBox_clicked</h4>
<b>on_buttonBox_clicked</b>(<i>button</i>)

<p>
        Private slot called by a button of the button box clicked.
</p>
<dl>

<dt><i>button</i> (QAbstractButton)</dt>
<dd>
button that was clicked
</dd>
</dl>
<a NAME="DjangoMigrationsListDialog.on_migrationsList_customContextMenuRequested" ID="DjangoMigrationsListDialog.on_migrationsList_customContextMenuRequested"></a>
<h4>DjangoMigrationsListDialog.on_migrationsList_customContextMenuRequested</h4>
<b>on_migrationsList_customContextMenuRequested</b>(<i>pos</i>)

<p>
        Private slot to show the context menu.
</p>
<dl>

<dt><i>pos</i> (QPoint)</dt>
<dd>
position the context menu was requested at
</dd>
</dl>
<a NAME="DjangoMigrationsListDialog.on_refreshButton_clicked" ID="DjangoMigrationsListDialog.on_refreshButton_clicked"></a>
<h4>DjangoMigrationsListDialog.on_refreshButton_clicked</h4>
<b>on_refreshButton_clicked</b>(<i></i>)

<p>
        Private slot to refresh the log.
</p>
<a NAME="DjangoMigrationsListDialog.start" ID="DjangoMigrationsListDialog.start"></a>
<h4>DjangoMigrationsListDialog.start</h4>
<b>start</b>(<i>pythonExecutable, sitePath, databaseName</i>)

<p>
        Public slot used to start the process.
</p>
<dl>

<dt><i>pythonExecutable</i> (str)</dt>
<dd>
Python executable to be used
</dd>
<dt><i>sitePath</i> (str)</dt>
<dd>
path of the site
</dd>
<dt><i>databaseName</i> (str)</dt>
<dd>
name of the database to be used
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
flag indicating a successful start of the process
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
bool
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
</body></html>

eric ide

mercurial