PluginProjectDjango.py

changeset 98
1db4d12fda93
parent 96
8ecf7b5a134a
child 100
6de07bdc8f13
equal deleted inserted replaced
97:44e0911dff44 98:1db4d12fda93
26 # Start-of-Header 26 # Start-of-Header
27 name = "Django Project Plugin" 27 name = "Django Project Plugin"
28 author = "Detlev Offenbach <detlev@die-offenbachs.de>" 28 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
29 autoactivate = True 29 autoactivate = True
30 deactivateable = True 30 deactivateable = True
31 version = "5.0.3" 31 version = "5.0.4"
32 className = "ProjectDjangoPlugin" 32 className = "ProjectDjangoPlugin"
33 packageName = "ProjectDjango" 33 packageName = "ProjectDjango"
34 shortDescription = "Project support for Django projects." 34 shortDescription = "Project support for Django projects."
35 longDescription = \ 35 longDescription = \
36 """This plugin implements project support for Django projects.""" 36 """This plugin implements project support for Django projects."""
162 162
163 self.__e5project = e5App().getObject("Project") 163 self.__e5project = e5App().getObject("Project")
164 164
165 self.__supportedVariants = [] 165 self.__supportedVariants = []
166 166
167 def __checkVersions(self):
168 """
169 Private function to check that the eric6 version is ok.
170
171 @return flag indicating version is ok (boolean)
172 """
173 global error
174
175 if self.__ui.versionIsNewer('5.99.99', '20140701'):
176 error = ""
177 else:
178 error = self.tr("eric6 version is too old, {0}, {1} or newer"
179 " needed.").format("6.0.0", "20140701")
180 return False
181
182 return True
183
184 def activate(self): 167 def activate(self):
185 """ 168 """
186 Public method to activate this plugin. 169 Public method to activate this plugin.
187 170
188 @return tuple of None and activation status (boolean) 171 @return tuple of None and activation status (boolean)
189 """ 172 """
190 if not self.__checkVersions():
191 return None, False
192
193 global djangoPluginObject 173 global djangoPluginObject
194 djangoPluginObject = self 174 djangoPluginObject = self
195 175
196 self.__object = Project(self, self.__ui) 176 self.__object = Project(self, self.__ui)
197 self.__object.initActions() 177 self.__object.initActions()

eric ide

mercurial