--- a/PluginProjectDjango.py Sat May 23 11:14:54 2020 +0200 +++ b/PluginProjectDjango.py Mon Jun 22 19:32:12 2020 +0200 @@ -7,8 +7,6 @@ Module implementing the Django project plugin. """ -from __future__ import unicode_literals - import os import glob import fnmatch @@ -28,15 +26,15 @@ author = "Detlev Offenbach <detlev@die-offenbachs.de>" autoactivate = True deactivateable = True -version = "5.3.3" +version = "6.0.0" className = "ProjectDjangoPlugin" packageName = "ProjectDjango" shortDescription = "Project support for Django projects." -longDescription = \ +longDescription = ( """This plugin implements project support for Django projects.""" +) needsRestart = False pyqtApi = 2 -python2Compatible = True # End-of-Header error = "" @@ -51,9 +49,9 @@ @param language language to get APIs for (string) @return list of API filenames (list of string) """ - if language in ["Python3", "Python2"]: - apisDir = \ - os.path.join(os.path.dirname(__file__), "ProjectDjango", "APIs") + if language in ["Python3"]: + apisDir = os.path.join(os.path.dirname(__file__), + "ProjectDjango", "APIs") apis = glob.glob(os.path.join(apisDir, '*.api')) else: apis = [] @@ -131,14 +129,11 @@ self.__initialize() self.__defaults = { - "VirtualEnvironmentNamePy2": "", "VirtualEnvironmentNamePy3": "", # these are obsolete and kept for use with eric <18.07 - "VirtualEnvironmentPy2": "", "VirtualEnvironmentPy3": "", - "Python2ConsoleType": "ipython", "Python3ConsoleType": "ipython", "ServerAddress": "", @@ -223,8 +218,10 @@ binaryTranslationsCallback=self.binaryTranslationsCallback, progLanguages=self.__supportedVariants[:]) - from Project.ProjectBrowser import SourcesBrowserFlag, \ - FormsBrowserFlag, TranslationsBrowserFlag, OthersBrowserFlag + from Project.ProjectBrowser import ( + SourcesBrowserFlag, FormsBrowserFlag, TranslationsBrowserFlag, + OthersBrowserFlag + ) Preferences.setProjectBrowserFlagsDefault( "Django", SourcesBrowserFlag | FormsBrowserFlag | @@ -400,8 +397,8 @@ if key in ["RecentNumberApps", "RecentNumberTestData"]: return int(Preferences.Prefs.settings.value( self.PreferencesKey + "/" + key, self.__defaults[key])) - elif key in ["UsePlainPythonPy2", "UsePlainPythonPy3", "UseIPv6", - "UseThreading", "UseExternalBrowser", "CheckDeployMode", + elif key in ["UseIPv6", "UseThreading", + "UseExternalBrowser", "CheckDeployMode", "KeepTestDatabase", "FuzzyTranslations", ]: return Preferences.toBool(Preferences.Prefs.settings.value( self.PreferencesKey + "/" + key, self.__defaults[key])) @@ -419,8 +416,7 @@ Preferences.Prefs.settings.setValue( self.PreferencesKey + "/" + key, value) - if key in ["VirtualEnvironmentPy2", "VirtualEnvironmentPy3", - "VirtualEnvironmentNamePy2", "VirtualEnvironmentNamePy3"]: + if key in ["VirtualEnvironmentPy3", "VirtualEnvironmentNamePy3"]: self.__reregisterProjectType() elif key == "TranslationsEditor": if self.__object: