ProjectDjango/DjangoLoaddataDataDialog.py

changeset 125
d280acf98fb5
parent 121
2346aa3fffcc
child 142
ecadd7fd0963
equal deleted inserted replaced
124:5c925935cbb9 125:d280acf98fb5
35 self.setupUi(self) 35 self.setupUi(self)
36 36
37 self.fixtureFileButton.setIcon(UI.PixmapCache.getIcon("open.png")) 37 self.fixtureFileButton.setIcon(UI.PixmapCache.getIcon("open.png"))
38 38
39 self.__project = project 39 self.__project = project
40
41 if project.getDjangoVersion() < (1, 11, 0):
42 self.excludeBox.setEnabled(False)
40 43
41 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) 44 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False)
42 45
43 msh = self.minimumSizeHint() 46 msh = self.minimumSizeHint()
44 self.resize(max(self.width(), msh.width()), msh.height()) 47 self.resize(max(self.width(), msh.width()), msh.height())
77 80
78 def getData(self): 81 def getData(self):
79 """ 82 """
80 Public method to get the data entered into the dialog. 83 Public method to get the data entered into the dialog.
81 84
82 @return list of fixtures (list of strings) 85 @return tuple containing the list of fixtures, list of apps to exclude,
86 application to search in and a flag indicating to ignore
87 non-existing fields and models
88 @rtype tuple of (list of str, list of str, str, bool)
83 """ 89 """
84 fixturesStr = self.fixturesEdit.text() 90 fixturesStr = self.fixturesEdit.text()
85 fixtures = fixturesStr.split() 91 fixtures = fixturesStr.split()
86 92
87 return fixtures 93 excludeStr = self.excludeEdit.text()
94 excludes = excludeStr.split()
95
96 return (fixtures, excludes, self.appEdit.text(),
97 self.ignoreCheckBox.isChecked())

eric ide

mercurial