PluginProjectDjango.py

changeset 125
d280acf98fb5
parent 122
eb1311184f6f
child 128
0010054d5f56
equal deleted inserted replaced
124:5c925935cbb9 125:d280acf98fb5
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.14" 31 version = "5.1.0"
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."""
101 Class implementing the Django project plugin. 101 Class implementing the Django project plugin.
102 """ 102 """
103 PreferencesKey = "Django" 103 PreferencesKey = "Django"
104 104
105 lexerAssociations = { 105 lexerAssociations = {
106 "*.htm": "Pygments|HTML+Django/Jinja",
106 "*.html": "Pygments|HTML+Django/Jinja", 107 "*.html": "Pygments|HTML+Django/Jinja",
107 "*.htm": "Pygments|HTML+Django/Jinja",
108 } 108 }
109 109
110 def __init__(self, ui): 110 def __init__(self, ui):
111 """ 111 """
112 Constructor 112 Constructor
119 119
120 self.__defaults = { 120 self.__defaults = {
121 "VirtualEnvironmentPy2": "", 121 "VirtualEnvironmentPy2": "",
122 "VirtualEnvironmentPy3": "", 122 "VirtualEnvironmentPy3": "",
123 123
124 "UsePlainPythonPy2": False, 124 "Python2ConsoleType": "ipython",
125 "UsePlainPythonPy3": False, 125 "Python3ConsoleType": "ipython",
126 126
127 "ServerAddress": "", 127 "ServerAddress": "",
128 128
129 "RecentNumberApps": 10, 129 "RecentNumberApps": 10,
130 "UseIPv6": False, 130 "UseIPv6": False,
131 "UseThreading": True,
131 132
132 "TranslationsEditor": "", 133 "TranslationsEditor": "",
134 "FuzzyTranslations": False,
133 135
134 "UseExternalBrowser": False, 136 "UseExternalBrowser": False,
135 137
136 "CheckDeployMode": False, 138 "CheckDeployMode": False,
137 139
138 "RecentNumberTestData": 10, 140 "RecentNumberTestData": 10,
139 "KeepTestDatabase": False, 141 "KeepTestDatabase": False,
142
143 "RecentNumberDatabaseNames": 10,
140 } 144 }
141 if isWindowsPlatform(): 145 if isWindowsPlatform():
142 self.__defaults["ConsoleCommandNoClose"] = "cmd.exe /k" 146 self.__defaults["ConsoleCommandNoClose"] = "cmd.exe /k"
143 self.__defaults["ConsoleCommand"] = "cmd.exe /c" 147 self.__defaults["ConsoleCommand"] = "cmd.exe /c"
144 elif isMacPlatform(): 148 elif isMacPlatform():
350 """ 354 """
351 if key in ["RecentNumberApps", "RecentNumberTestData"]: 355 if key in ["RecentNumberApps", "RecentNumberTestData"]:
352 return int(Preferences.Prefs.settings.value( 356 return int(Preferences.Prefs.settings.value(
353 self.PreferencesKey + "/" + key, self.__defaults[key])) 357 self.PreferencesKey + "/" + key, self.__defaults[key]))
354 elif key in ["UsePlainPythonPy2", "UsePlainPythonPy3", "UseIPv6", 358 elif key in ["UsePlainPythonPy2", "UsePlainPythonPy3", "UseIPv6",
355 "UseExternalBrowser", "CheckDeployMode", 359 "UseThreading", "UseExternalBrowser", "CheckDeployMode",
356 "KeepTestDatabase"]: 360 "KeepTestDatabase", "FuzzyTranslations", ]:
357 return Preferences.toBool(Preferences.Prefs.settings.value( 361 return Preferences.toBool(Preferences.Prefs.settings.value(
358 self.PreferencesKey + "/" + key, self.__defaults[key])) 362 self.PreferencesKey + "/" + key, self.__defaults[key]))
359 else: 363 else:
360 return Preferences.Prefs.settings.value( 364 return Preferences.Prefs.settings.value(
361 self.PreferencesKey + "/" + key, self.__defaults[key]) 365 self.PreferencesKey + "/" + key, self.__defaults[key])

eric ide

mercurial