From 3e73b5d7d291b20858b18ba7492b7f92501e01c7 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 10 Mar 2011 09:34:24 -0600 Subject: Make it very easy to use the Django debug toolbar Add a config option DEBUG_TOOLBAR that defaults to False. If set to True in local_settings, add the relevant application and middleware to the settings to enable it. Signed-off-by: Dan McGee --- settings.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'settings.py') diff --git a/settings.py b/settings.py index 8e916e36..9565e6c4 100644 --- a/settings.py +++ b/settings.py @@ -4,6 +4,7 @@ import os ## Set the debug values DEBUG = False TEMPLATE_DEBUG = DEBUG +DEBUG_TOOLBAR = False ## Notification admins ADMINS = () @@ -121,4 +122,12 @@ if not TEMPLATE_DEBUG: ('django.template.loaders.cached.Loader', TEMPLATE_LOADERS), ) +# Enable the debug toolbar if requested +if DEBUG_TOOLBAR: + MIDDLEWARE_CLASSES = \ + [ 'debug_toolbar.middleware.DebugToolbarMiddleware' ] + \ + list(MIDDLEWARE_CLASSES) + + INSTALLED_APPS = list(INSTALLED_APPS) + [ 'debug_toolbar' ] + # vim: set ts=4 sw=4 et: -- cgit v1.2.3-2-g168b From c4a335d5da78ca4558cea8500ae78db9e3be74ff Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 10 Mar 2011 12:00:59 -0600 Subject: Remove duplicate TEMPLATE_LOADERS config Whoops. This has been there a while. Signed-off-by: Dan McGee --- settings.py | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) (limited to 'settings.py') diff --git a/settings.py b/settings.py index 9565e6c4..1d26d9eb 100644 --- a/settings.py +++ b/settings.py @@ -45,13 +45,6 @@ LOGIN_REDIRECT_URL = '/' # Set django's User stuff to use our profile model AUTH_PROFILE_MODULE = 'main.UserProfile' -# List of callables that know how to import templates from various sources. -TEMPLATE_LOADERS = ( - 'django.template.loaders.filesystem.load_template_source', - 'django.template.loaders.eggs.load_template_source', - 'django.template.loaders.app_directories.load_template_source', -) - # We add a processor to determine if the request is secure or not TEMPLATE_CONTEXT_PROCESSORS = ( 'django.contrib.auth.context_processors.auth', @@ -62,6 +55,18 @@ TEMPLATE_CONTEXT_PROCESSORS = ( 'main.context_processors.secure', ) +TEMPLATE_DIRS = ( + # Put strings here, like "/home/html/django_templates". + # Always use forward slashes, even on Windows. + '%s/templates' % DEPLOY_PATH, +) + +TEMPLATE_LOADERS = ( + 'django.template.loaders.filesystem.Loader', + 'django.template.loaders.eggs.Loader', + 'django.template.loaders.app_directories.Loader', +) + # This bug is a real bummer: # http://code.djangoproject.com/ticket/14105 MIDDLEWARE_CLASSES = ( @@ -78,18 +83,6 @@ MIDDLEWARE_CLASSES = ( ROOT_URLCONF = 'urls' -TEMPLATE_DIRS = ( - # Put strings here, like "/home/html/django_templates". - # Always use forward slashes, even on Windows. - '%s/templates' % DEPLOY_PATH, -) - -TEMPLATE_LOADERS = ( - 'django.template.loaders.filesystem.Loader', - 'django.template.loaders.eggs.Loader', - 'django.template.loaders.app_directories.Loader', -) - # Configure where sessions and messages should reside MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage' SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db' -- cgit v1.2.3-2-g168b From 1547c7c49a1852852ffbac0737d0ffdf54addda9 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Tue, 1 Mar 2011 18:47:03 +0100 Subject: isotests: entry and listing of release engineering tests Add a new project for entry and listing of testing results for our release ISOs. This will assist the release engineering team with determining a good ISO to make into the real deal. Signed-off-by: Dan McGee --- settings.py | 1 + 1 file changed, 1 insertion(+) (limited to 'settings.py') diff --git a/settings.py b/settings.py index 1d26d9eb..107baa17 100644 --- a/settings.py +++ b/settings.py @@ -104,6 +104,7 @@ INSTALLED_APPS = ( 'devel', 'public', 'south', # database migration support + 'isotests', ) ## Import local settings -- cgit v1.2.3-2-g168b From c5a28f88936fba06755aefec61a017c2ce94ba40 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Thu, 28 Apr 2011 12:43:01 -0500 Subject: isotests: modelines, imports, url and pass * Added vim modelines to files. * Rearranged import statements. * Moved the arch releng isos url to settings.py. * Fixed some issues that arose from forgetting to import the isotests urls package. * removed redundant str() calls. Signed-off-by: Dan McGee --- settings.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'settings.py') diff --git a/settings.py b/settings.py index 107baa17..d4d3d96b 100644 --- a/settings.py +++ b/settings.py @@ -124,4 +124,7 @@ if DEBUG_TOOLBAR: INSTALLED_APPS = list(INSTALLED_APPS) + [ 'debug_toolbar' ] +# rtf settings +ISOLISTURL = 'http://releng.archlinux.org/isos/' + # vim: set ts=4 sw=4 et: -- cgit v1.2.3-2-g168b From 6516220b17d7987900961863a0b6dec23ac14855 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 28 Apr 2011 13:59:53 -0500 Subject: isotests: update some syntax and ways of doing things To be more Django-like, Pythonic, or to fit better in the existing archweb project. Also add some created fields to the models, as storing dates for anything is almost always a good idea. Signed-off-by: Dan McGee --- settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'settings.py') diff --git a/settings.py b/settings.py index d4d3d96b..a21205d3 100644 --- a/settings.py +++ b/settings.py @@ -124,7 +124,7 @@ if DEBUG_TOOLBAR: INSTALLED_APPS = list(INSTALLED_APPS) + [ 'debug_toolbar' ] -# rtf settings -ISOLISTURL = 'http://releng.archlinux.org/isos/' +# URL to fetch a current list of available ISOs +ISO_LIST_URL = 'http://releng.archlinux.org/isos/' # vim: set ts=4 sw=4 et: -- cgit v1.2.3-2-g168b From bfe6afcd7ac5ae7b6f07caa7b02a33fec710ebda Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 28 Apr 2011 17:58:13 -0500 Subject: Rename isotests to releng Signed-off-by: Dan McGee --- settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'settings.py') diff --git a/settings.py b/settings.py index a21205d3..db1c93d3 100644 --- a/settings.py +++ b/settings.py @@ -104,7 +104,7 @@ INSTALLED_APPS = ( 'devel', 'public', 'south', # database migration support - 'isotests', + 'releng', ) ## Import local settings -- cgit v1.2.3-2-g168b From d8f82d9d72eec6042536797f75e06a9296f4cc71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Thu, 12 May 2011 15:52:47 -0300 Subject: More rebranding --- settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'settings.py') diff --git a/settings.py b/settings.py index 1d26d9eb..029739f2 100644 --- a/settings.py +++ b/settings.py @@ -13,7 +13,7 @@ ADMINS = () MANAGERS = ADMINS # Package out-of-date emails for orphans -NOTIFICATIONS = ['arch-notifications@archlinux.org'] +NOTIFICATIONS = ['packages@list.parabolagnulinux.org'] # Full path to the data directory DEPLOY_PATH = os.path.dirname(os.path.realpath(__file__)) -- cgit v1.2.3-2-g168b From 5897fba6d3242cc7188d05f8f3be7362a8383761 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Sat, 21 May 2011 02:28:51 -0300 Subject: More rebranding! --- settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'settings.py') diff --git a/settings.py b/settings.py index c9ea4178..e9285560 100644 --- a/settings.py +++ b/settings.py @@ -125,6 +125,6 @@ if DEBUG_TOOLBAR: INSTALLED_APPS = list(INSTALLED_APPS) + [ 'debug_toolbar' ] # URL to fetch a current list of available ISOs -ISO_LIST_URL = 'http://releng.archlinux.org/isos/' +ISO_LIST_URL = 'http://repo.parabolagnulinux.org/isos/' # vim: set ts=4 sw=4 et: -- cgit v1.2.3-2-g168b