914 |
914 |
915 def __pyramidInfo(self): |
915 def __pyramidInfo(self): |
916 """ |
916 """ |
917 Private slot to show some info about Pyramid. |
917 Private slot to show some info about Pyramid. |
918 """ |
918 """ |
919 version = self.getPyramidVersionString() |
919 try: |
|
920 version = self.getPyramidVersionString() |
|
921 except PyramidNoProjectSelectedException: |
|
922 version = self.tr("not available") |
920 url = "http://www.pylonsproject.org/projects/pyramid/about" |
923 url = "http://www.pylonsproject.org/projects/pyramid/about" |
921 |
924 |
922 msgBox = EricMessageBox.EricMessageBox( |
925 msgBox = EricMessageBox.EricMessageBox( |
923 EricMessageBox.Question, |
926 EricMessageBox.Question, |
924 self.tr("About Pyramid"), |
927 self.tr("About Pyramid"), |
1037 args += ["--checkout", version] |
1040 args += ["--checkout", version] |
1038 args.append(template) |
1041 args.append(template) |
1039 for context, data in contextData.items(): |
1042 for context, data in contextData.items(): |
1040 args.append("{0}={1}".format(context, data)) |
1043 args.append("{0}={1}".format(context, data)) |
1041 dlg = PyramidDialog(self.tr("Create Pyramid Project"), |
1044 dlg = PyramidDialog(self.tr("Create Pyramid Project"), |
1042 linewrap=False, parent=self.__ui) |
1045 parent=self.__ui) |
1043 if dlg.startProcess( |
1046 if dlg.startProcess( |
1044 cmd, args, self.__ericProject.getProjectPath() |
1047 cmd, args, self.__ericProject.getProjectPath() |
1045 ): |
1048 ): |
1046 dlg.exec() |
1049 dlg.exec() |
1047 if dlg.normalExit() and "repo_name" in contextData: |
1050 if dlg.normalExit() and "repo_name" in contextData: |
1094 argsLists.append([alembic, "-c", "development.ini", |
1097 argsLists.append([alembic, "-c", "development.ini", |
1095 "upgrade", "head"]) |
1098 "upgrade", "head"]) |
1096 |
1099 |
1097 dlg = PyramidDialog( |
1100 dlg = PyramidDialog( |
1098 self.tr("Initializing Pyramid Project"), |
1101 self.tr("Initializing Pyramid Project"), |
1099 linewrap=False, combinedOutput=combinedOutput, |
1102 combinedOutput=combinedOutput, |
1100 parent=self.__ui) |
1103 parent=self.__ui) |
1101 if dlg.startBatchProcesses(argsLists, |
1104 if dlg.startBatchProcesses(argsLists, |
1102 workingDir=projectPath): |
1105 workingDir=projectPath): |
1103 dlg.exec() |
1106 dlg.exec() |
1104 |
1107 |
1231 |
1234 |
1232 alembicDir = os.path.join( |
1235 alembicDir = os.path.join( |
1233 self.projectPath(), self.__currentProject, |
1236 self.projectPath(), self.__currentProject, |
1234 "alembic", "versions") |
1237 "alembic", "versions") |
1235 self.__menus["database"].setEnabled(os.path.exists(alembicDir)) |
1238 self.__menus["database"].setEnabled(os.path.exists(alembicDir)) |
|
1239 |
|
1240 self.runServerAct.setEnabled(project is not None) |
|
1241 self.runBrowserAct.setEnabled(project is not None) |
|
1242 self.runPythonShellAct.setEnabled(project is not None) |
|
1243 self.showViewsAct.setEnabled(project is not None) |
|
1244 self.showRoutesAct.setEnabled(project is not None) |
|
1245 self.showTweensAct.setEnabled(project is not None) |
|
1246 self.buildDistroAct.setEnabled(project is not None) |
1236 |
1247 |
1237 def __project(self): |
1248 def __project(self): |
1238 """ |
1249 """ |
1239 Private method to get the name of the current Pyramid project. |
1250 Private method to get the name of the current Pyramid project. |
1240 |
1251 |