From 3f30d8752eb37094522368feb9e9c42448439bae Mon Sep 17 00:00:00 2001 From: Ricky Rosario Date: Fri, 24 May 2013 12:17:38 -0400 Subject: [PATCH] [bug 872516] Create kitsune python module. --- .gitignore | 5 ++--- .gitmodules | 6 +++--- {templates => apps/sumo/templates}/admin/change_list.html | 0 {templates => apps/sumo/templates}/base.html | 0 {templates => apps/sumo/templates}/email/base.html | 0 .../sumo/templates}/includes/common_macros.html | 0 {templates => apps/sumo/templates}/includes/lang_form.html | 0 .../sumo/templates}/includes/mobile/common_macros.html | 0 .../sumo/templates}/includes/mobile/paginator.html | 0 .../sumo/templates}/includes/quick_paginator.html | 0 .../sumo/templates}/includes/simple_paginator.html | 0 .../sumo/templates}/includes/unsubscribe_text.ltxt | 0 {templates => apps/sumo/templates}/layout/breadcrumbs.html | 0 {templates => apps/sumo/templates}/layout/errorlist.html | 0 {templates => apps/sumo/templates}/layout/paginator.html | 0 {templates => apps/sumo/templates}/mobile/base.html | 0 {templates => apps/sumo/templates}/tests/qunit.html | 0 apps/wiki/tests/test_admin.py | 3 +-- __init__.py => kitsune/__init__.py | 0 bundles.py => kitsune/bundles.py | 0 {configs => kitsune/configs}/username-blacklist.txt | 0 log_settings.py => kitsune/log_settings.py | 0 settings.py => kitsune/settings.py | 4 ++-- settings_test.py => kitsune/settings_test.py | 0 urls.py => kitsune/urls.py | 0 manage.py | 6 +++--- scripts/build.sh | 2 +- scripts/run_jstests.sh | 2 +- scripts/update/deploy.py | 2 +- 29 files changed, 14 insertions(+), 16 deletions(-) rename {templates => apps/sumo/templates}/admin/change_list.html (100%) rename {templates => apps/sumo/templates}/base.html (100%) rename {templates => apps/sumo/templates}/email/base.html (100%) rename {templates => apps/sumo/templates}/includes/common_macros.html (100%) rename {templates => apps/sumo/templates}/includes/lang_form.html (100%) rename {templates => apps/sumo/templates}/includes/mobile/common_macros.html (100%) rename {templates => apps/sumo/templates}/includes/mobile/paginator.html (100%) rename {templates => apps/sumo/templates}/includes/quick_paginator.html (100%) rename {templates => apps/sumo/templates}/includes/simple_paginator.html (100%) rename {templates => apps/sumo/templates}/includes/unsubscribe_text.ltxt (100%) rename {templates => apps/sumo/templates}/layout/breadcrumbs.html (100%) rename {templates => apps/sumo/templates}/layout/errorlist.html (100%) rename {templates => apps/sumo/templates}/layout/paginator.html (100%) rename {templates => apps/sumo/templates}/mobile/base.html (100%) rename {templates => apps/sumo/templates}/tests/qunit.html (100%) rename __init__.py => kitsune/__init__.py (100%) rename bundles.py => kitsune/bundles.py (100%) rename {configs => kitsune/configs}/username-blacklist.txt (100%) rename log_settings.py => kitsune/log_settings.py (100%) rename settings.py => kitsune/settings.py (99%) rename settings_test.py => kitsune/settings_test.py (100%) rename urls.py => kitsune/urls.py (100%) diff --git a/.gitignore b/.gitignore index 5f9d9d1c3..4b37d87d8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,10 @@ *.pyc *.pyo -settings_local.py +kitsune/settings_local.py pip-log.txt .coverage coverage.xml -build.py +kitsune/build.py **-all.css **-min.css **-all.js @@ -14,7 +14,6 @@ node_modules tmp locale docs/_build -highstock.src.js /static *.less.css .DS_Store diff --git a/.gitmodules b/.gitmodules index 78b241eac..77158e03e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -124,9 +124,6 @@ [submodule "vendor/src/django-eadred"] path = vendor/src/django-eadred url = git://github.com/willkg/django-eadred.git -[submodule "media/js/libs/ace"] - path = media/js/libs/ace - url = git://github.com/ajaxorg/ace-builds.git [submodule "vendor/src/raven-python"] path = vendor/src/raven-python url = git://github.com/getsentry/raven-python.git @@ -142,3 +139,6 @@ [submodule "vendor/src/premailer"] path = vendor/src/premailer url = git://github.com/peterbe/premailer.git +[submodule "media/js/libs/ace"] + path = media/js/libs/ace + url = git://github.com/ajaxorg/ace-builds.git diff --git a/templates/admin/change_list.html b/apps/sumo/templates/admin/change_list.html similarity index 100% rename from templates/admin/change_list.html rename to apps/sumo/templates/admin/change_list.html diff --git a/templates/base.html b/apps/sumo/templates/base.html similarity index 100% rename from templates/base.html rename to apps/sumo/templates/base.html diff --git a/templates/email/base.html b/apps/sumo/templates/email/base.html similarity index 100% rename from templates/email/base.html rename to apps/sumo/templates/email/base.html diff --git a/templates/includes/common_macros.html b/apps/sumo/templates/includes/common_macros.html similarity index 100% rename from templates/includes/common_macros.html rename to apps/sumo/templates/includes/common_macros.html diff --git a/templates/includes/lang_form.html b/apps/sumo/templates/includes/lang_form.html similarity index 100% rename from templates/includes/lang_form.html rename to apps/sumo/templates/includes/lang_form.html diff --git a/templates/includes/mobile/common_macros.html b/apps/sumo/templates/includes/mobile/common_macros.html similarity index 100% rename from templates/includes/mobile/common_macros.html rename to apps/sumo/templates/includes/mobile/common_macros.html diff --git a/templates/includes/mobile/paginator.html b/apps/sumo/templates/includes/mobile/paginator.html similarity index 100% rename from templates/includes/mobile/paginator.html rename to apps/sumo/templates/includes/mobile/paginator.html diff --git a/templates/includes/quick_paginator.html b/apps/sumo/templates/includes/quick_paginator.html similarity index 100% rename from templates/includes/quick_paginator.html rename to apps/sumo/templates/includes/quick_paginator.html diff --git a/templates/includes/simple_paginator.html b/apps/sumo/templates/includes/simple_paginator.html similarity index 100% rename from templates/includes/simple_paginator.html rename to apps/sumo/templates/includes/simple_paginator.html diff --git a/templates/includes/unsubscribe_text.ltxt b/apps/sumo/templates/includes/unsubscribe_text.ltxt similarity index 100% rename from templates/includes/unsubscribe_text.ltxt rename to apps/sumo/templates/includes/unsubscribe_text.ltxt diff --git a/templates/layout/breadcrumbs.html b/apps/sumo/templates/layout/breadcrumbs.html similarity index 100% rename from templates/layout/breadcrumbs.html rename to apps/sumo/templates/layout/breadcrumbs.html diff --git a/templates/layout/errorlist.html b/apps/sumo/templates/layout/errorlist.html similarity index 100% rename from templates/layout/errorlist.html rename to apps/sumo/templates/layout/errorlist.html diff --git a/templates/layout/paginator.html b/apps/sumo/templates/layout/paginator.html similarity index 100% rename from templates/layout/paginator.html rename to apps/sumo/templates/layout/paginator.html diff --git a/templates/mobile/base.html b/apps/sumo/templates/mobile/base.html similarity index 100% rename from templates/mobile/base.html rename to apps/sumo/templates/mobile/base.html diff --git a/templates/tests/qunit.html b/apps/sumo/templates/tests/qunit.html similarity index 100% rename from templates/tests/qunit.html rename to apps/sumo/templates/tests/qunit.html diff --git a/apps/wiki/tests/test_admin.py b/apps/wiki/tests/test_admin.py index 03ae58fbd..d6f37d867 100644 --- a/apps/wiki/tests/test_admin.py +++ b/apps/wiki/tests/test_admin.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- -import urls - from nose.tools import eq_ +from kitsune import urls from sumo.tests import TestCase from wiki.admin import DocumentAdmin from wiki.models import Document diff --git a/__init__.py b/kitsune/__init__.py similarity index 100% rename from __init__.py rename to kitsune/__init__.py diff --git a/bundles.py b/kitsune/bundles.py similarity index 100% rename from bundles.py rename to kitsune/bundles.py diff --git a/configs/username-blacklist.txt b/kitsune/configs/username-blacklist.txt similarity index 100% rename from configs/username-blacklist.txt rename to kitsune/configs/username-blacklist.txt diff --git a/log_settings.py b/kitsune/log_settings.py similarity index 100% rename from log_settings.py rename to kitsune/log_settings.py diff --git a/settings.py b/kitsune/settings.py similarity index 99% rename from settings.py rename to kitsune/settings.py index a9484a364..3cce8275b 100644 --- a/settings.py +++ b/kitsune/settings.py @@ -241,14 +241,14 @@ ENGAGE_ROBOTS = False # Absolute path to the directory that holds media. # Example: "/home/media/media.lawrence.com/" -MEDIA_ROOT = path('media') +MEDIA_ROOT = path('../media') # URL that handles the media served from MEDIA_ROOT. Make sure to use a # trailing slash if there is a path component (optional in other cases). # Examples: "http://media.lawrence.com", "http://example.com/media/" MEDIA_URL = '/media/' -STATIC_ROOT = path('static') +STATIC_ROOT = path('../static') STATIC_URL = '/static/' # Paths that don't require a locale prefix. diff --git a/settings_test.py b/kitsune/settings_test.py similarity index 100% rename from settings_test.py rename to kitsune/settings_test.py diff --git a/urls.py b/kitsune/urls.py similarity index 100% rename from urls.py rename to kitsune/urls.py diff --git a/manage.py b/manage.py index 57314a631..532ef6635 100755 --- a/manage.py +++ b/manage.py @@ -26,10 +26,10 @@ sys.path[:0] = new_sys_path from django.core.management import execute_manager, setup_environ try: - import settings_local as settings + from kitsune import settings_local as settings except ImportError: try: - import settings # Assumed to be in the same directory. + from kitsune import settings # Assumed to be in the same directory. except ImportError: sys.stderr.write( "Error: Tried importing 'settings_local.py' and 'settings.py' " @@ -42,7 +42,7 @@ except ImportError: setup_environ(settings) # Import for side-effect: configures our logging handlers. -import log_settings +from kitsune import log_settings if __name__ == "__main__": diff --git a/scripts/build.sh b/scripts/build.sh index c40f29618..d4a3a187a 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -45,7 +45,7 @@ git submodule update --init --recursive python manage.py update_product_details -cat > settings_local.py < kitsune/settings_local.py < settings_local.py < kitsune/settings_local.py <