Thu, 13 Feb 2014 20:05:54 +0100
Fixed a bug searching for the Django admin command in environments having the Python2 and Python3 Django variants.
ChangeLog | file | annotate | diff | comparison | revisions | |
PluginProjectDjango.py | file | annotate | diff | comparison | revisions | |
PluginProjectDjango.zip | file | annotate | diff | comparison | revisions | |
ProjectDjango/Project.py | file | annotate | diff | comparison | revisions |
--- a/ChangeLog Thu Feb 13 19:52:56 2014 +0100 +++ b/ChangeLog Thu Feb 13 20:05:54 2014 +0100 @@ -1,5 +1,11 @@ ChangeLog --------- +Version 3.3.2: +- bug fixes + +Version 3.3.1: +- bug fixes + Version 3.3.0: - extended the API to allow for plug-in extension by another plug-in
--- a/PluginProjectDjango.py Thu Feb 13 19:52:56 2014 +0100 +++ b/PluginProjectDjango.py Thu Feb 13 20:05:54 2014 +0100 @@ -28,7 +28,7 @@ author = "Detlev Offenbach <detlev@die-offenbachs.de>" autoactivate = True deactivateable = True -version = "3.3.1" +version = "3.3.2" className = "ProjectDjangoPlugin" packageName = "ProjectDjango" shortDescription = "Project support for Django projects."
--- a/ProjectDjango/Project.py Thu Feb 13 19:52:56 2014 +0100 +++ b/ProjectDjango/Project.py Thu Feb 13 20:05:54 2014 +0100 @@ -1122,6 +1122,9 @@ command for (string, one of '', 'Python2' or 'Python3') @return full django-admin.py command (string) """ + if not language: + language = self.__e5project.getProjectLanguage() + virtualEnv = self.__getVirtualEnvironment(language) if virtualEnv: if isWindowsPlatform(): @@ -1144,13 +1147,18 @@ debugEnv = self.__getDebugEnvironment(language) cmd = os.path.join(debugEnv, "Scripts", "django-admin.py") else: - if Utilities.isinpath("django-admin.py"): - cmd = "django-admin.py" - elif Utilities.isinpath("django-admin"): - cmd = "django-admin" + if language == "Python2": + cmds = ["django-admin2.py", "django-admin2"] + elif language == "Python3": + cmds = ["django-admin3.py", "django-admin3"] else: - # fall back - cmd = "django-admin.py" + cmds = [] + cmds.extend(["django-admin.py", "django-admin"]) + for cmd in cmds: + if Utilities.isinpath(cmd): + break + else: + cmd = "" return cmd