Fixed some stupid bugs introduced by the last extension. release-5.0.11

Sat, 18 Nov 2017 13:07:26 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 18 Nov 2017 13:07:26 +0100
changeset 113
9b7adb12b409
parent 112
ecb1aefcc4e1
child 114
eca3e8221306

Fixed some stupid bugs introduced by the last extension.

ChangeLog file | annotate | diff | comparison | revisions
PluginProjectDjango.py file | annotate | diff | comparison | revisions
PluginProjectDjango.zip file | annotate | diff | comparison | revisions
ProjectDjango/DjangoTestDataDialog.py file | annotate | diff | comparison | revisions
ProjectDjango/Project.py file | annotate | diff | comparison | revisions
--- a/ChangeLog	Sat Nov 18 12:40:04 2017 +0100
+++ b/ChangeLog	Sat Nov 18 13:07:26 2017 +0100
@@ -1,5 +1,8 @@
 ChangeLog
 ---------
+Version 5.0.11:
+- bug fix
+
 Version 5.0.10:
 - added a dialog to enter data for running Django unit tests
 
--- a/PluginProjectDjango.py	Sat Nov 18 12:40:04 2017 +0100
+++ b/PluginProjectDjango.py	Sat Nov 18 13:07:26 2017 +0100
@@ -28,7 +28,7 @@
 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
 autoactivate = True
 deactivateable = True
-version = "5.0.10"
+version = "5.0.11"
 className = "ProjectDjangoPlugin"
 packageName = "ProjectDjango"
 shortDescription = "Project support for Django projects."
Binary file PluginProjectDjango.zip has changed
--- a/ProjectDjango/DjangoTestDataDialog.py	Sat Nov 18 12:40:04 2017 +0100
+++ b/ProjectDjango/DjangoTestDataDialog.py	Sat Nov 18 13:07:26 2017 +0100
@@ -56,23 +56,23 @@
             (list of str, str, list of str, list of str, bool, bool)
         """
         labelsStr = self.labelsComboBox.currentText()
+        self.__project.setMostRecentTestData("RecentTestLabels", labelsStr)
         if labelsStr:
-            self.__project.setMostRecentTestData("RecentTestLabels", labelsStr)
             labels = labelsStr.split()
         else:
             labels = []
         
-        tagsStr = self.labelsComboBox.currentText()
+        tagsStr = self.tagsComboBox.currentText()
+        self.__project.setMostRecentTestData("RecentTestTags", tagsStr)
         if tagsStr:
-            self.__project.setMostRecentTestData("RecentTestTags", tagsStr)
             tags = tagsStr.split()
         else:
             tags = []
         
-        excludeTagsStr = self.labelsComboBox.currentText()
+        excludeTagsStr = self.excludeTagsComboBox.currentText()
+        self.__project.setMostRecentTestData("RecentTestExcludeTags",
+                                             excludeTagsStr)
         if excludeTagsStr:
-            self.__project.setMostRecentTestData("RecentTestExcludeTags",
-                                                 excludeTagsStr)
             excludeTags = excludeTagsStr.split()
         else:
             excludeTags = []
--- a/ProjectDjango/Project.py	Sat Nov 18 12:40:04 2017 +0100
+++ b/ProjectDjango/Project.py	Sat Nov 18 13:07:26 2017 +0100
@@ -97,9 +97,6 @@
     Class implementing the Django project support.
     """
     RecentApplicationsKey = "Django/RecentApplications"
-##    RecentTestLabelsKey = "Django/RecentTestLabels"
-##    RecentTestTagsKey = "Django/RecentTestTags"
-##    RecentTestExcludeTagsKey = "Django/RecentTestExcludeTags"
     
     def __init__(self, plugin, parent=None):
         """
@@ -2763,35 +2760,32 @@
                 labels, pattern, tags, excludeTags, keep, reverse = \
                     dlg.getData()
                 
-            args = Utilities.parseOptionString(consoleCmd)
-            args[0] = Utilities.getExecutablePath(args[0])
-            args.append(self.__getPythonExecutable())
-            if deprecation:
-                args.append("-Wall")
-            args.append("manage.py")
-            args.append("test")
-            if pattern:
-                args.append("--pattern")
-                args.append(pattern)
-            for tag in tags:
-                args.append("--tag")
-                args.append(tag)
-            for tag in excludeTags:
-                args.append("--exclude-tag")
-                args.append(tag)
-            if keep:
-                args.append("--keepdb")
-            if reverse:
-                args.append("--reverse")
-            args.extend(labels)
-            
-            self.__adjustWorkingDirectory(args, wd)
-            started, pid = QProcess.startDetached(args[0], args[1:], wd)
-            if not started:
-                E5MessageBox.critical(
-                    None,
-                    self.tr('Process Generation Error'),
-                    self.tr('The Django process could not be started.'))
+                args = Utilities.parseOptionString(consoleCmd)
+                args[0] = Utilities.getExecutablePath(args[0])
+                args.append(self.__getPythonExecutable())
+                if deprecation:
+                    args.append("-Wall")
+                args.append("manage.py")
+                args.append("test")
+                if pattern:
+                    args.append("--pattern=" + pattern)
+                for tag in tags:
+                    args.append("--tag=" + tag)
+                for tag in excludeTags:
+                    args.append("--exclude-tag=" + tag)
+                if keep:
+                    args.append("--keepdb")
+                if reverse:
+                    args.append("--reverse")
+                args.extend(labels)
+                
+                self.__adjustWorkingDirectory(args, wd)
+                started, pid = QProcess.startDetached(args[0], args[1:], wd)
+                if not started:
+                    E5MessageBox.critical(
+                        None,
+                        self.tr('Process Generation Error'),
+                        self.tr('The Django process could not be started.'))
     
     def __runTestServer(self):
         """

eric ide

mercurial