Browse files

Minor changes which will be needed to support configurable admin command

  • Loading branch information...
1 parent 7839687 commit 5560151d876d4332f3f4bb5e9bab8a163f8d3855 @MicahCarrick MicahCarrick committed Jul 26, 2012
Showing with 9 additions and 5 deletions.
  1. +1 −1 djangoproject/output.py
  2. +8 −4 djangoproject/plugin.py
View
2 djangoproject/output.py
@@ -5,7 +5,7 @@
from gi.repository import GObject, Gtk, GLib, Pango
logging.basicConfig()
-LOG_LEVEL = logging.DEBUG
+LOG_LEVEL = logging.ERROR
logger = logging.getLogger(__name__)
logger.setLevel(LOG_LEVEL)
View
12 djangoproject/plugin.py
@@ -8,7 +8,7 @@
from appselector import AppSelector
logging.basicConfig()
-LOG_LEVEL = logging.DEBUG
+LOG_LEVEL = logging.ERROR
logger = logging.getLogger(__name__)
logger.setLevel(LOG_LEVEL)
SETTINGS_SCHEMA = "org.gnome.gedit.plugins.djangoproject"
@@ -29,8 +29,12 @@ def __init__(self):
self._shell = None
self._dbshell = None
self._install_stock_icons()
- # TODO: move to configuration settings
- self._admin_cmd = "django-admin" # django-admin.py on some systems
+ # TODO: The admin and manage commands should configurable so that they
+ # could be changed to various virtual environments. Even better would
+ # be able to specify the commands on a per-project basis.
+ #self._admin_cmd = "/home/micah/.virtual-environments/django-1.4/bin/django-admin.py"
+ #self._manage_cmd = "/home/micah/.virtual-environments/django-1.4/bin/python manage.py"
+ self._admin_cmd = "django-admin.py"
self._manage_cmd = "python manage.py"
self._font = "monospace 10"
@@ -523,7 +527,7 @@ def _remove_ui(self):
manager.remove_action_group(self._project_actions)
manager.ensure_update()
- def run_admin_command(self, command, path):
+ def run_admin_command(self, command, path=None):
""" Run a django-admin.py command in the output panel. """
self.window.get_bottom_panel().activate_item(self._output)
full_command = "%s %s" % (self._admin_cmd, command)

0 comments on commit 5560151

Please sign in to comment.