ProjectFlask/FlaskMigrateExtension/MigrateProjectExtension.py

changeset 30
76c86fe13f36
parent 29
a8817ea36587
child 31
e614add95516
diff -r a8817ea36587 -r 76c86fe13f36 ProjectFlask/FlaskMigrateExtension/MigrateProjectExtension.py
--- a/ProjectFlask/FlaskMigrateExtension/MigrateProjectExtension.py	Tue Nov 24 19:23:28 2020 +0100
+++ b/ProjectFlask/FlaskMigrateExtension/MigrateProjectExtension.py	Tue Nov 24 19:37:56 2020 +0100
@@ -40,9 +40,6 @@
         
         self.__plugin = plugin
         self.__project = project
-        
-        # TODO: move virtual env stuff to Project
-        self.__virtualEnvManager = e5App().getObject("VirtualEnvManager")
     
     def initActions(self):
         """
@@ -149,9 +146,7 @@
         @return flag indicating the availability of 'flask-babel'
         @rtype bool
         """
-        venvName = self.__plugin.getPreferences("VirtualEnvironmentNamePy3")
-        interpreter = self.__virtualEnvManager.getVirtualenvInterpreter(
-            venvName)
+        interpreter = self.__project.getVirtualenvInterpreter()
         if interpreter and Utilities.isinpath(interpreter):
             detector = os.path.join(
                 os.path.dirname(__file__), "FlaskMigrateDetector.py")

eric ide

mercurial