ProjectDjango/DjangoLoaddataDataDialog.py

changeset 125
d280acf98fb5
parent 121
2346aa3fffcc
child 142
ecadd7fd0963
diff -r 5c925935cbb9 -r d280acf98fb5 ProjectDjango/DjangoLoaddataDataDialog.py
--- a/ProjectDjango/DjangoLoaddataDataDialog.py	Sat Jan 27 11:46:33 2018 +0100
+++ b/ProjectDjango/DjangoLoaddataDataDialog.py	Sat Mar 24 19:11:39 2018 +0100
@@ -38,6 +38,9 @@
         
         self.__project = project
         
+        if project.getDjangoVersion() < (1, 11, 0):
+            self.excludeBox.setEnabled(False)
+        
         self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False)
         
         msh = self.minimumSizeHint()
@@ -79,9 +82,16 @@
         """
         Public method to get the data entered into the dialog.
         
-        @return list of fixtures (list of strings)
+        @return tuple containing the list of fixtures, list of apps to exclude,
+            application to search in and a flag indicating to ignore
+            non-existing fields and models
+        @rtype tuple of (list of str, list of str, str, bool)
         """
         fixturesStr = self.fixturesEdit.text()
         fixtures = fixturesStr.split()
         
-        return fixtures
+        excludeStr = self.excludeEdit.text()
+        excludes = excludeStr.split()
+        
+        return (fixtures, excludes, self.appEdit.text(),
+                self.ignoreCheckBox.isChecked())

eric ide

mercurial