Wed, 20 Dec 2017 14:22:33 +0100
Added capability to save the last state of the "Keep Test Database" flag.
diff -r 794125bde05d -r 5c6209f8abf0 ChangeLog --- a/ChangeLog Sat Dec 09 14:59:39 2017 +0100 +++ b/ChangeLog Wed Dec 20 14:22:33 2017 +0100 @@ -1,5 +1,8 @@ ChangeLog --------- +Version 5.0.13: +- added capability to save the last state of the "Keep Test Database" flag + Version 5.0.12: - updated Spanish translations
diff -r 794125bde05d -r 5c6209f8abf0 PluginProjectDjango.py --- a/PluginProjectDjango.py Sat Dec 09 14:59:39 2017 +0100 +++ b/PluginProjectDjango.py Wed Dec 20 14:22:33 2017 +0100 @@ -28,7 +28,7 @@ author = "Detlev Offenbach <detlev@die-offenbachs.de>" autoactivate = True deactivateable = True -version = "5.0.12" +version = "5.0.13" className = "ProjectDjangoPlugin" packageName = "ProjectDjango" shortDescription = "Project support for Django projects." @@ -136,6 +136,7 @@ "CheckDeployMode": False, "RecentNumberTestData": 10, + "KeepTestDatabase": False, } if isWindowsPlatform(): self.__defaults["ConsoleCommandNoClose"] = "cmd.exe /k" @@ -351,7 +352,8 @@ return int(Preferences.Prefs.settings.value( self.PreferencesKey + "/" + key, self.__defaults[key])) elif key in ["UsePlainPythonPy2", "UsePlainPythonPy3", "UseIPv6", - "UseExternalBrowser", "CheckDeployMode"]: + "UseExternalBrowser", "CheckDeployMode", + "KeepTestDatabase"]: return Preferences.toBool(Preferences.Prefs.settings.value( self.PreferencesKey + "/" + key, self.__defaults[key])) else:
diff -r 794125bde05d -r 5c6209f8abf0 PluginProjectDjango.zip Binary file PluginProjectDjango.zip has changed
diff -r 794125bde05d -r 5c6209f8abf0 ProjectDjango/DjangoTestDataDialog.py --- a/ProjectDjango/DjangoTestDataDialog.py Sat Dec 09 14:59:39 2017 +0100 +++ b/ProjectDjango/DjangoTestDataDialog.py Wed Dec 20 14:22:33 2017 +0100 @@ -16,12 +16,15 @@ """ Class implementing a dialog to enter some data for running tests. """ - def __init__(self, project, parent=None): + def __init__(self, project, keepDatabases, parent=None): """ Constructor @param project reference to the Django project object @type Project + @param keepDatabases flag indicating to set the keep databases + check box + @type bool @param parent reference to the parent widget @type QWidget """ @@ -41,6 +44,8 @@ self.tagsComboBox.setEnabled(False) self.excludeTagsComboBox.setEnabled(False) + self.keepCheckBox.setChecked(keepDatabases) + msh = self.minimumSizeHint() self.resize(max(self.width(), msh.width()), msh.height())
diff -r 794125bde05d -r 5c6209f8abf0 ProjectDjango/Documentation/source/Plugin_Project_Django.ProjectDjango.DjangoTestDataDialog.html --- a/ProjectDjango/Documentation/source/Plugin_Project_Django.ProjectDjango.DjangoTestDataDialog.html Sat Dec 09 14:59:39 2017 +0100 +++ b/ProjectDjango/Documentation/source/Plugin_Project_Django.ProjectDjango.DjangoTestDataDialog.html Wed Dec 20 14:22:33 2017 +0100 @@ -70,13 +70,17 @@ </table> <a NAME="DjangoTestDataDialog.__init__" ID="DjangoTestDataDialog.__init__"></a> <h4>DjangoTestDataDialog (Constructor)</h4> -<b>DjangoTestDataDialog</b>(<i>project, parent=None</i>) +<b>DjangoTestDataDialog</b>(<i>project, keepDatabases, parent=None</i>) <p> Constructor </p><dl> <dt><i>project</i> (Project)</dt> <dd> reference to the Django project object +</dd><dt><i>keepDatabases</i> (bool)</dt> +<dd> +flag indicating to set the keep databases + check box </dd><dt><i>parent</i> (QWidget)</dt> <dd> reference to the parent widget
diff -r 794125bde05d -r 5c6209f8abf0 ProjectDjango/Project.py --- a/ProjectDjango/Project.py Sat Dec 09 14:59:39 2017 +0100 +++ b/ProjectDjango/Project.py Wed Dec 20 14:22:33 2017 +0100 @@ -2777,11 +2777,15 @@ return from .DjangoTestDataDialog import DjangoTestDataDialog - dlg = DjangoTestDataDialog(self, self.__ui) + dlg = DjangoTestDataDialog( + self, self.__plugin.getPreferences("KeepTestDatabase"), + self.__ui) if dlg.exec_() == QDialog.Accepted: labels, pattern, tags, excludeTags, keep, reverse = \ dlg.getData() + self.__plugin.setPreferences("KeepTestDatabase", keep) + args = Utilities.parseOptionString(consoleCmd) args[0] = Utilities.getExecutablePath(args[0]) args.append(self.__getPythonExecutable())