diff --git a/.gitmodules b/.gitmodules index d51bfd04e91..5c4a15dd392 100644 --- a/.gitmodules +++ b/.gitmodules @@ -139,6 +139,6 @@ [submodule "vendor/src/premailer"] path = vendor/src/premailer url = git://github.com/peterbe/premailer.git -[submodule "apps/sumo/static/js/libs/ace"] - path = apps/sumo/static/js/libs/ace +[submodule "kitsune/sumo/static/js/libs/ace"] + path = kitsune/sumo/static/js/libs/ace url = git://github.com/ajaxorg/ace-builds.git diff --git a/apps/groups/tests/__init__.py b/apps/groups/tests/__init__.py deleted file mode 100644 index f6b8d41aaab..00000000000 --- a/apps/groups/tests/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -from groups.models import GroupProfile -from sumo.tests import with_save - - -@with_save -def group_profile(**kwargs): - return GroupProfile(**kwargs) diff --git a/apps/sumo/static/js/libs/ace b/apps/sumo/static/js/libs/ace deleted file mode 160000 index 6149ca6b148..00000000000 --- a/apps/sumo/static/js/libs/ace +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6149ca6b148e878d4c1341d4675ca3597d78dbdd diff --git a/docs/localization.rst b/docs/localization.rst index a7590f26513..2d8fe0af147 100644 --- a/docs/localization.rst +++ b/docs/localization.rst @@ -301,7 +301,7 @@ Then, all you need to do is run the ``extract_db`` management command:: *Be sure to have a recent database from production when running the command.* -By default, this will write all the strings to `apps/sumo/db_strings.py` +By default, this will write all the strings to `kitsune/sumo/db_strings.py` and they will get picked up during the normal string extraction (see below). diff --git a/docs/searchchapter.rst b/docs/searchchapter.rst index 354b63b8b6f..351871278b2 100644 --- a/docs/searchchapter.rst +++ b/docs/searchchapter.rst @@ -251,7 +251,7 @@ Kitsune uses `elasticutils `_ and `pyelasticsearch `_. -Most of our code is in the ``search`` app in ``apps/search/``. +Most of our code is in the ``search`` app in ``kitsune/search/``. Models in Kitsune that are indexable use ``SearchMixin`` defined in ``models.py``. @@ -355,4 +355,4 @@ Link to the Elastic Search code Here's a link to the search view in the master branch: -https://github.com/mozilla/kitsune/blob/master/apps/search/views.py +https://github.com/mozilla/kitsune/blob/master/kitsune/search/views.py diff --git a/docs/sop.rst b/docs/sop.rst index 77db537ff97..28aacd76da8 100644 --- a/docs/sop.rst +++ b/docs/sop.rst @@ -9,7 +9,7 @@ Occasionally, the localized strings cause the site to break. For example, this causes the site to break:: - #: apps/questions/templates/questions/includes/answer.html:19 + #: kitsune/questions/templates/questions/includes/answer.html:19 msgid "{num} answers" msgstr "{0} antwoorden" diff --git a/apps/access/__init__.py b/kitsune/access/__init__.py similarity index 100% rename from apps/access/__init__.py rename to kitsune/access/__init__.py diff --git a/apps/access/decorators.py b/kitsune/access/decorators.py similarity index 98% rename from apps/access/decorators.py rename to kitsune/access/decorators.py index a0768c98f18..059a7a763bb 100644 --- a/apps/access/decorators.py +++ b/kitsune/access/decorators.py @@ -8,8 +8,8 @@ from django.utils.decorators import available_attrs from django.utils.http import urlquote -import access -from sumo.urlresolvers import reverse +from kitsune import access +from kitsune.sumo.urlresolvers import reverse def user_access_decorator(redirect_func, redirect_url_func, deny_func=None, diff --git a/apps/access/helpers.py b/kitsune/access/helpers.py similarity index 96% rename from apps/access/helpers.py rename to kitsune/access/helpers.py index 9d1796cabc7..e875b8ceecc 100644 --- a/apps/access/helpers.py +++ b/kitsune/access/helpers.py @@ -1,7 +1,7 @@ import jinja2 from jingo import register -import access +from kitsune import access @register.function diff --git a/apps/access/tests/__init__.py b/kitsune/access/tests/__init__.py similarity index 93% rename from apps/access/tests/__init__.py rename to kitsune/access/tests/__init__.py index 57fe7d3d19d..c0546c01daa 100644 --- a/apps/access/tests/__init__.py +++ b/kitsune/access/tests/__init__.py @@ -1,13 +1,13 @@ from django.contrib.auth.models import User -from nose.tools import eq_ import test_utils - -import access from authority.models import Permission -from forums.models import Forum, Thread -from sumo.tests import TestCase, with_save -from sumo.urlresolvers import reverse +from nose.tools import eq_ + +from kitsune import access +from kitsune.forums.models import Forum, Thread +from kitsune.sumo.tests import TestCase, with_save +from kitsune.sumo.urlresolvers import reverse @with_save diff --git a/apps/access/tests/test_decorators.py b/kitsune/access/tests/test_decorators.py similarity index 97% rename from apps/access/tests/test_decorators.py rename to kitsune/access/tests/test_decorators.py index 582a3148026..38cff75cb23 100644 --- a/apps/access/tests/test_decorators.py +++ b/kitsune/access/tests/test_decorators.py @@ -1,12 +1,12 @@ from django.contrib.auth.models import User, AnonymousUser from django.http import HttpResponse -from nose.tools import eq_ import test_utils +from nose.tools import eq_ -from access.decorators import (logout_required, login_required, - permission_required) -from sumo.tests import TestCase +from kitsune.access.decorators import ( + logout_required, login_required, permission_required) +from kitsune.sumo.tests import TestCase def simple_view(request): diff --git a/apps/activity/README.rst b/kitsune/activity/README.rst similarity index 100% rename from apps/activity/README.rst rename to kitsune/activity/README.rst diff --git a/apps/activity/__init__.py b/kitsune/activity/__init__.py similarity index 100% rename from apps/activity/__init__.py rename to kitsune/activity/__init__.py diff --git a/apps/activity/models.py b/kitsune/activity/models.py similarity index 97% rename from apps/activity/models.py rename to kitsune/activity/models.py index 3261e9afb0b..0070efb96b8 100644 --- a/apps/activity/models.py +++ b/kitsune/activity/models.py @@ -5,7 +5,7 @@ from django.contrib.contenttypes.models import ContentType from django.db import models -from sumo.models import ModelBase +from kitsune.sumo.models import ModelBase class Action(ModelBase): diff --git a/apps/__init__.py b/kitsune/announcements/__init__.py similarity index 100% rename from apps/__init__.py rename to kitsune/announcements/__init__.py diff --git a/apps/announcements/admin.py b/kitsune/announcements/admin.py similarity index 93% rename from apps/announcements/admin.py rename to kitsune/announcements/admin.py index f63e3ff1acf..965a51b2a62 100644 --- a/apps/announcements/admin.py +++ b/kitsune/announcements/admin.py @@ -1,6 +1,6 @@ from django.contrib import admin -from announcements.models import Announcement +from kitsune.announcements.models import Announcement class AnnouncementAdmin(admin.ModelAdmin): diff --git a/apps/announcements/forms.py b/kitsune/announcements/forms.py similarity index 100% rename from apps/announcements/forms.py rename to kitsune/announcements/forms.py diff --git a/apps/announcements/models.py b/kitsune/announcements/models.py similarity index 94% rename from apps/announcements/models.py rename to kitsune/announcements/models.py index 35af2b067fd..6b0b40c4546 100644 --- a/apps/announcements/models.py +++ b/kitsune/announcements/models.py @@ -5,9 +5,9 @@ from django.db.models import Q from django.db.models.signals import post_save -from sumo.models import ModelBase -from wiki.models import Locale -from sumo.helpers import wiki_to_html +from kitsune.sumo.helpers import wiki_to_html +from kitsune.sumo.models import ModelBase +from kitsune.wiki.models import Locale class Announcement(ModelBase): @@ -75,7 +75,7 @@ def _visible_query(cls, **query_kwargs): def connector(sender, instance, created, **kw): # Only email new announcements in a group. We don't want to email everyone. if created and instance.group: - from announcements.tasks import send_group_email + from kitsune.announcements.tasks import send_group_email now = datetime.now() if instance.is_visible(): send_group_email.delay(instance.pk) diff --git a/apps/announcements/tasks.py b/kitsune/announcements/tasks.py similarity index 91% rename from apps/announcements/tasks.py rename to kitsune/announcements/tasks.py index e033a9e5874..7a642754c6d 100644 --- a/apps/announcements/tasks.py +++ b/kitsune/announcements/tasks.py @@ -7,9 +7,9 @@ from celery.task import task from tower import ugettext as _ -from announcements.models import Announcement -from sumo.email_utils import (make_mail, render_email, safe_translation, - send_messages) +from kitsune.announcements.models import Announcement +from kitsune.sumo.email_utils import ( + make_mail, render_email, safe_translation, send_messages) @task diff --git a/apps/announcements/templates/announcements/email/announcement.html b/kitsune/announcements/templates/announcements/email/announcement.html similarity index 100% rename from apps/announcements/templates/announcements/email/announcement.html rename to kitsune/announcements/templates/announcements/email/announcement.html diff --git a/apps/announcements/templates/announcements/email/announcement.ltxt b/kitsune/announcements/templates/announcements/email/announcement.ltxt similarity index 100% rename from apps/announcements/templates/announcements/email/announcement.ltxt rename to kitsune/announcements/templates/announcements/email/announcement.ltxt diff --git a/apps/announcements/tests/__init__.py b/kitsune/announcements/tests/__init__.py similarity index 83% rename from apps/announcements/tests/__init__.py rename to kitsune/announcements/tests/__init__.py index b64b2b6720a..a570ed1258d 100644 --- a/apps/announcements/tests/__init__.py +++ b/kitsune/announcements/tests/__init__.py @@ -1,8 +1,8 @@ from datetime import datetime, timedelta -from announcements.models import Announcement -from sumo.tests import with_save -from users.tests import user +from kitsune.announcements.models import Announcement +from kitsune.sumo.tests import with_save +from kitsune.users.tests import user @with_save diff --git a/apps/announcements/tests/test_models.py b/kitsune/announcements/tests/test_models.py similarity index 89% rename from apps/announcements/tests/test_models.py rename to kitsune/announcements/tests/test_models.py index 91dada63c57..ab280561664 100644 --- a/apps/announcements/tests/test_models.py +++ b/kitsune/announcements/tests/test_models.py @@ -2,11 +2,11 @@ from nose.tools import eq_ -from announcements.models import Announcement -from announcements.tests import announcement -from sumo.tests import TestCase -from users.tests import user, group, profile -from wiki.tests import locale +from kitsune.announcements.models import Announcement +from kitsune.announcements.tests import announcement +from kitsune.sumo.tests import TestCase +from kitsune.users.tests import user, group, profile +from kitsune.wiki.tests import locale class AnnouncementModelTests(TestCase): diff --git a/apps/announcements/tests/test_tasks.py b/kitsune/announcements/tests/test_tasks.py similarity index 89% rename from apps/announcements/tests/test_tasks.py rename to kitsune/announcements/tests/test_tasks.py index 4f79d731589..fb0aef8b2eb 100644 --- a/apps/announcements/tests/test_tasks.py +++ b/kitsune/announcements/tests/test_tasks.py @@ -4,10 +4,10 @@ import mock from nose.tools import eq_ -from announcements.tasks import send_group_email -from announcements.tests import announcement -from sumo.tests import TestCase -from users.tests import user, group, profile +from kitsune.announcements.tasks import send_group_email +from kitsune.announcements.tests import announcement +from kitsune.sumo.tests import TestCase +from kitsune.users.tests import user, group, profile class AnnouncementSaveTests(TestCase): diff --git a/apps/announcements/tests/test_views.py b/kitsune/announcements/tests/test_views.py similarity index 91% rename from apps/announcements/tests/test_views.py rename to kitsune/announcements/tests/test_views.py index 2af2c8fd63e..44d40e9e2ac 100644 --- a/apps/announcements/tests/test_views.py +++ b/kitsune/announcements/tests/test_views.py @@ -2,12 +2,12 @@ from nose.tools import eq_ -from announcements.models import Announcement -from announcements.tests import announcement -from sumo.tests import TestCase -from sumo.urlresolvers import reverse -from users.tests import user, add_permission -from wiki.tests import locale +from kitsune.announcements.models import Announcement +from kitsune.announcements.tests import announcement +from kitsune.sumo.tests import TestCase +from kitsune.sumo.urlresolvers import reverse +from kitsune.users.tests import user, add_permission +from kitsune.wiki.tests import locale class TestCreateLocaleAnnouncement(TestCase): diff --git a/apps/announcements/urls.py b/kitsune/announcements/urls.py similarity index 81% rename from apps/announcements/urls.py rename to kitsune/announcements/urls.py index 221dbafb8ac..3b394e26a67 100644 --- a/apps/announcements/urls.py +++ b/kitsune/announcements/urls.py @@ -1,7 +1,7 @@ from django.conf.urls import patterns, url -urlpatterns = patterns('announcements.views', +urlpatterns = patterns('kitsune.announcements.views', url(r'^/create/locale$', 'create_for_locale', name='announcements.create_for_locale'), url(r'^/(?P\d+)/delete$', 'delete', diff --git a/apps/announcements/views.py b/kitsune/announcements/views.py similarity index 87% rename from apps/announcements/views.py rename to kitsune/announcements/views.py index f4d245518bc..c57e04da0f2 100644 --- a/apps/announcements/views.py +++ b/kitsune/announcements/views.py @@ -3,11 +3,11 @@ from django.http import HttpResponse, HttpResponseForbidden from django.shortcuts import get_object_or_404 from django.views.decorators.http import require_POST -from access.decorators import login_required -from announcements.forms import AnnouncementForm -from announcements.models import Announcement -from wiki.models import Locale +from kitsune.access.decorators import login_required +from kitsune.announcements.forms import AnnouncementForm +from kitsune.announcements.models import Announcement +from kitsune.wiki.models import Locale @require_POST diff --git a/apps/announcements/__init__.py b/kitsune/customercare/__init__.py similarity index 100% rename from apps/announcements/__init__.py rename to kitsune/customercare/__init__.py diff --git a/apps/customercare/admin.py b/kitsune/customercare/admin.py similarity index 92% rename from apps/customercare/admin.py rename to kitsune/customercare/admin.py index c0cd7d616dd..9342f98d488 100644 --- a/apps/customercare/admin.py +++ b/kitsune/customercare/admin.py @@ -1,6 +1,6 @@ from django.contrib import admin -from customercare.models import Tweet, Reply +from kitsune.customercare.models import Tweet, Reply class TweetAdmin(admin.ModelAdmin): diff --git a/apps/customercare/cron.py b/kitsune/customercare/cron.py similarity index 98% rename from apps/customercare/cron.py rename to kitsune/customercare/cron.py index c16ddc6dbcd..744450ba2de 100644 --- a/apps/customercare/cron.py +++ b/kitsune/customercare/cron.py @@ -9,13 +9,13 @@ from django.db.utils import IntegrityError import cronjobs -from multidb.pinning import pin_this_thread import tweepy -from tweepy.parsers import RawParser -from sumo.redis_utils import redis_client, RedisError +from multidb.pinning import pin_this_thread from statsd import statsd +from tweepy.parsers import RawParser -from customercare.models import Tweet, Reply +from kitsune.customercare.models import Tweet, Reply +from kitsune.sumo.redis_utils import redis_client, RedisError LINK_REGEX = re.compile('https?\:', re.IGNORECASE) diff --git a/apps/customercare/fixtures/tweets.json b/kitsune/customercare/fixtures/tweets.json similarity index 100% rename from apps/customercare/fixtures/tweets.json rename to kitsune/customercare/fixtures/tweets.json diff --git a/apps/customercare/helpers.py b/kitsune/customercare/helpers.py similarity index 94% rename from apps/customercare/helpers.py rename to kitsune/customercare/helpers.py index 94feca0fe32..cdfc6bd64f5 100644 --- a/apps/customercare/helpers.py +++ b/kitsune/customercare/helpers.py @@ -2,10 +2,10 @@ from django.conf import settings -from jingo import register import pytz +from jingo import register -from sumo.helpers import timesince +from kitsune.sumo.helpers import timesince @register.filter diff --git a/apps/customercare/models.py b/kitsune/customercare/models.py similarity index 97% rename from apps/customercare/models.py rename to kitsune/customercare/models.py index 7dc75bbd2f8..0cb9d3246ac 100644 --- a/apps/customercare/models.py +++ b/kitsune/customercare/models.py @@ -4,7 +4,7 @@ from django.contrib.auth.models import User from django.db import models -from sumo.models import ModelBase +from kitsune.sumo.models import ModelBase class Tweet(ModelBase): diff --git a/apps/customercare/replies.py b/kitsune/customercare/replies.py similarity index 98% rename from apps/customercare/replies.py rename to kitsune/customercare/replies.py index 646e2ef75c0..9a4d2fb9858 100644 --- a/apps/customercare/replies.py +++ b/kitsune/customercare/replies.py @@ -2,7 +2,7 @@ from pyquery import PyQuery -from wiki.models import Document +from kitsune.wiki.models import Document REPLIES_DOCUMENT_SLUG = 'army-of-awesome-common-replies' diff --git a/apps/customercare/templates/customercare/base.html b/kitsune/customercare/templates/customercare/base.html similarity index 100% rename from apps/customercare/templates/customercare/base.html rename to kitsune/customercare/templates/customercare/base.html diff --git a/apps/customercare/templates/customercare/includes/aoa_macros.html b/kitsune/customercare/templates/customercare/includes/aoa_macros.html similarity index 100% rename from apps/customercare/templates/customercare/includes/aoa_macros.html rename to kitsune/customercare/templates/customercare/includes/aoa_macros.html diff --git a/apps/customercare/templates/customercare/landing.html b/kitsune/customercare/templates/customercare/landing.html similarity index 100% rename from apps/customercare/templates/customercare/landing.html rename to kitsune/customercare/templates/customercare/landing.html diff --git a/apps/customercare/templates/customercare/reply_modal.html b/kitsune/customercare/templates/customercare/reply_modal.html similarity index 100% rename from apps/customercare/templates/customercare/reply_modal.html rename to kitsune/customercare/templates/customercare/reply_modal.html diff --git a/apps/customercare/templates/customercare/tweets.html b/kitsune/customercare/templates/customercare/tweets.html similarity index 100% rename from apps/customercare/templates/customercare/tweets.html rename to kitsune/customercare/templates/customercare/tweets.html diff --git a/apps/customercare/templates/customercare/twitter_modal.html b/kitsune/customercare/templates/customercare/twitter_modal.html similarity index 100% rename from apps/customercare/templates/customercare/twitter_modal.html rename to kitsune/customercare/templates/customercare/twitter_modal.html diff --git a/apps/customercare/tests/__init__.py b/kitsune/customercare/tests/__init__.py similarity index 96% rename from apps/customercare/tests/__init__.py rename to kitsune/customercare/tests/__init__.py index 31b0ec46e30..27cd1a4f2f1 100644 --- a/apps/customercare/tests/__init__.py +++ b/kitsune/customercare/tests/__init__.py @@ -1,8 +1,8 @@ import json from datetime import datetime -from customercare.models import Tweet, Reply -from sumo.tests import with_save +from kitsune.customercare.models import Tweet, Reply +from kitsune.sumo.tests import with_save next_tweet_id = 1 diff --git a/apps/customercare/tests/stats.json b/kitsune/customercare/tests/stats.json similarity index 100% rename from apps/customercare/tests/stats.json rename to kitsune/customercare/tests/stats.json diff --git a/apps/customercare/tests/test_cron.py b/kitsune/customercare/tests/test_cron.py similarity index 96% rename from apps/customercare/tests/test_cron.py rename to kitsune/customercare/tests/test_cron.py index 52e45fd5f67..5eeba8e5c74 100644 --- a/apps/customercare/tests/test_cron.py +++ b/kitsune/customercare/tests/test_cron.py @@ -10,12 +10,13 @@ from nose import SkipTest from nose.tools import eq_ -from customercare.tests import tweet, reply -from customercare.cron import (_filter_tweet, _get_oldest_tweet, purge_tweets, - get_customercare_stats) -from customercare.models import Tweet, Reply -from sumo.tests import TestCase -from sumo.redis_utils import redis_client, RedisError +from kitsune.customercare.cron import ( + _filter_tweet, _get_oldest_tweet, purge_tweets, get_customercare_stats) +from kitsune.customercare.models import Tweet, Reply +from kitsune.customercare.tests import tweet, reply +from kitsune.sumo.redis_utils import redis_client, RedisError +from kitsune.sumo.tests import TestCase + class TwitterCronTestCase(TestCase): diff --git a/apps/customercare/tests/test_helpers.py b/kitsune/customercare/tests/test_helpers.py similarity index 91% rename from apps/customercare/tests/test_helpers.py rename to kitsune/customercare/tests/test_helpers.py index febc64d61d7..10683031cf6 100644 --- a/apps/customercare/tests/test_helpers.py +++ b/kitsune/customercare/tests/test_helpers.py @@ -2,8 +2,8 @@ from nose.tools import eq_ -from customercare.helpers import isotime, round_percent, utctimesince -from sumo.tests import TestCase +from kitsune.customercare.helpers import isotime, round_percent, utctimesince +from kitsune.sumo.tests import TestCase def test_isotime(): diff --git a/apps/customercare/tests/test_models.py b/kitsune/customercare/tests/test_models.py similarity index 79% rename from apps/customercare/tests/test_models.py rename to kitsune/customercare/tests/test_models.py index 17e8d3d5150..9a11fd1622a 100644 --- a/apps/customercare/tests/test_models.py +++ b/kitsune/customercare/tests/test_models.py @@ -1,8 +1,8 @@ from nose.tools import eq_, raises -from customercare.models import Tweet -from customercare.tests import tweet -from sumo.tests import TestCase +from kitsune.customercare.models import Tweet +from kitsune.customercare.tests import tweet +from kitsune.sumo.tests import TestCase class TweetTests(TestCase): diff --git a/apps/customercare/tests/test_templates.py b/kitsune/customercare/tests/test_templates.py similarity index 93% rename from apps/customercare/tests/test_templates.py rename to kitsune/customercare/tests/test_templates.py index 8299e1625d3..46440e678ce 100644 --- a/apps/customercare/tests/test_templates.py +++ b/kitsune/customercare/tests/test_templates.py @@ -6,10 +6,10 @@ from nose.tools import eq_ from pyquery import PyQuery as pq -from customercare.replies import REPLIES_DOCUMENT_SLUG -from sumo.urlresolvers import reverse -from sumo.tests import TestCase -from wiki.tests import document, revision +from kitsune.customercare.replies import REPLIES_DOCUMENT_SLUG +from kitsune.sumo.tests import TestCase +from kitsune.sumo.urlresolvers import reverse +from kitsune.wiki.tests import document, revision CANNED_RESPONSES_WIKI = """ @@ -133,7 +133,7 @@ class StatsTests(TestCase): def test_contributors(self): """Only contributors stats are set.""" - with open('apps/customercare/tests/stats.json') as f: + with open('kitsune/customercare/tests/stats.json') as f: json_data = json.load(f) cache.set(settings.CC_TOP_CONTRIB_CACHE_KEY, diff --git a/apps/customercare/tests/test_views.py b/kitsune/customercare/tests/test_views.py similarity index 96% rename from apps/customercare/tests/test_views.py rename to kitsune/customercare/tests/test_views.py index a1e48e61e5c..fc0bb8bded2 100644 --- a/apps/customercare/tests/test_views.py +++ b/kitsune/customercare/tests/test_views.py @@ -7,12 +7,12 @@ from nose.tools import eq_ from test_utils import RequestFactory -from customercare.tests import tweet, reply -from customercare.models import Tweet, Reply -from customercare.views import _get_tweets, _count_answered_tweets -from customercare.views import twitter_post -from sumo.tests import TestCase, LocalizingClient -from sumo.urlresolvers import reverse +from kitsune.customercare.models import Tweet, Reply +from kitsune.customercare.tests import tweet, reply +from kitsune.customercare.views import _get_tweets, _count_answered_tweets +from kitsune.customercare.views import twitter_post +from kitsune.sumo.tests import TestCase, LocalizingClient +from kitsune.sumo.urlresolvers import reverse class TweetListTests(TestCase): diff --git a/apps/customercare/urls.py b/kitsune/customercare/urls.py similarity index 85% rename from apps/customercare/urls.py rename to kitsune/customercare/urls.py index 54b0997ee67..f63a09a0501 100644 --- a/apps/customercare/urls.py +++ b/kitsune/customercare/urls.py @@ -1,6 +1,7 @@ from django.conf.urls import patterns, url -urlpatterns = patterns('customercare.views', + +urlpatterns = patterns('kitsune.customercare.views', url(r'^/more_tweets$', 'more_tweets', name="customercare.more_tweets"), url(r'^/twitter_post$', 'twitter_post', name="customercare.twitter_post"), url(r'^/hide_tweet$', 'hide_tweet', name="customercare.hide_tweet"), diff --git a/apps/customercare/views.py b/kitsune/customercare/views.py similarity index 97% rename from apps/customercare/views.py rename to kitsune/customercare/views.py index 128848ef4f1..ee214ac0967 100644 --- a/apps/customercare/views.py +++ b/kitsune/customercare/views.py @@ -1,26 +1,26 @@ import calendar -from datetime import datetime, timedelta -from email.utils import parsedate, formatdate import json import logging +from datetime import datetime, timedelta +from email.utils import parsedate, formatdate from django.conf import settings from django.http import (HttpResponse, HttpResponseBadRequest, HttpResponseNotFound, HttpResponseServerError) from django.shortcuts import render -from django.views.decorators.http import require_POST, require_GET from django.utils.datastructures import SortedDict +from django.views.decorators.http import require_POST, require_GET import bleach +import tweepy from session_csrf import anonymous_csrf from statsd import statsd from tower import ugettext as _, ugettext_lazy as _lazy -import tweepy -from customercare.models import Tweet, Reply -from customercare.replies import get_common_replies -from sumo.redis_utils import redis_client, RedisError -import twitter +from kitsune import twitter +from kitsune.customercare.models import Tweet, Reply +from kitsune.customercare.replies import get_common_replies +from kitsune.sumo.redis_utils import redis_client, RedisError log = logging.getLogger('k.customercare') diff --git a/apps/dashboards/__init__.py b/kitsune/dashboards/__init__.py similarity index 100% rename from apps/dashboards/__init__.py rename to kitsune/dashboards/__init__.py diff --git a/apps/dashboards/admin.py b/kitsune/dashboards/admin.py similarity index 85% rename from apps/dashboards/admin.py rename to kitsune/dashboards/admin.py index 134bb451c93..bb4fd57c85e 100644 --- a/apps/dashboards/admin.py +++ b/kitsune/dashboards/admin.py @@ -1,7 +1,7 @@ from django.contrib import admin from django.contrib.admin import ModelAdmin -from dashboards.models import GroupDashboard +from kitsune.dashboards.models import GroupDashboard class GroupDashboardAdmin(ModelAdmin): diff --git a/apps/dashboards/cron.py b/kitsune/dashboards/cron.py similarity index 97% rename from apps/dashboards/cron.py rename to kitsune/dashboards/cron.py index ccf3c94dadd..e71e567c891 100644 --- a/apps/dashboards/cron.py +++ b/kitsune/dashboards/cron.py @@ -3,9 +3,9 @@ import cronjobs -from dashboards.models import PERIODS, WikiDocumentVisits -from sumo.redis_utils import redis_client -from wiki.models import Document +from kitsune.dashboards.models import PERIODS, WikiDocumentVisits +from kitsune.sumo.redis_utils import redis_client +from kitsune.wiki.models import Document @cronjobs.register diff --git a/apps/dashboards/helpers.py b/kitsune/dashboards/helpers.py similarity index 88% rename from apps/dashboards/helpers.py rename to kitsune/dashboards/helpers.py index 1a79b80bbff..65109c907d2 100644 --- a/apps/dashboards/helpers.py +++ b/kitsune/dashboards/helpers.py @@ -1,7 +1,7 @@ from jingo import register, env import jinja2 -from dashboards.personal import personal_dashboards +from kitsune.dashboards.personal import personal_dashboards @register.function diff --git a/apps/dashboards/models.py b/kitsune/dashboards/models.py similarity index 89% rename from apps/dashboards/models.py rename to kitsune/dashboards/models.py index 5f3640e8151..1598590cef1 100644 --- a/apps/dashboards/models.py +++ b/kitsune/dashboards/models.py @@ -7,13 +7,13 @@ from tower import ugettext_lazy as _lazy -from dashboards import (LAST_7_DAYS, LAST_30_DAYS, LAST_90_DAYS, ALL_TIME, - PERIODS) -from dashboards.personal import GROUP_DASHBOARDS -from sumo.models import ModelBase -from sumo import googleanalytics -from sumo.urlresolvers import reverse -from wiki.models import Document +from kitsune.dashboards import (LAST_7_DAYS, LAST_30_DAYS, LAST_90_DAYS, + ALL_TIME, PERIODS) +from kitsune.dashboards.personal import GROUP_DASHBOARDS +from kitsune.sumo.models import ModelBase +from kitsune.sumo import googleanalytics +from kitsune.sumo.urlresolvers import reverse +from kitsune.wiki.models import Document log = logging.getLogger('k.dashboards') diff --git a/apps/dashboards/personal.py b/kitsune/dashboards/personal.py similarity index 90% rename from apps/dashboards/personal.py rename to kitsune/dashboards/personal.py index c7bd2299e1f..04cd1170419 100644 --- a/apps/dashboards/personal.py +++ b/kitsune/dashboards/personal.py @@ -5,11 +5,11 @@ from django.shortcuts import render from django.utils.datastructures import SortedDict -from announcements.models import Announcement -from dashboards.readouts import ( +from kitsune.announcements.models import Announcement +from kitsune.dashboards.readouts import ( overview_rows, GROUP_CONTRIBUTOR_READOUTS, GROUP_L10N_READOUTS) -from dashboards.utils import model_actions, render_readouts -from questions.models import Answer +from kitsune.dashboards.utils import model_actions, render_readouts +from kitsune.questions.models import Answer class Dashboard(object): @@ -75,7 +75,7 @@ def personal_dashboards(request): We might decide based on the user, the locale, etc. """ - from dashboards.models import GroupDashboard + from kitsune.dashboards.models import GroupDashboard # Gather dashboards the user has access to: # Must fall back to [] because __in= fails. diff --git a/apps/dashboards/readouts.py b/kitsune/dashboards/readouts.py similarity index 99% rename from apps/dashboards/readouts.py rename to kitsune/dashboards/readouts.py index 03ecb834753..96d3bb03b5a 100644 --- a/apps/dashboards/readouts.py +++ b/kitsune/dashboards/readouts.py @@ -15,15 +15,16 @@ from jinja2 import Markup from tower import ugettext as _, ugettext_lazy as _lazy -from dashboards import LAST_30_DAYS, PERIODS -from sumo.helpers import urlparams -from sumo.urlresolvers import reverse -from sumo.redis_utils import redis_client, RedisError -from wiki.models import Document -from wiki.config import (MEDIUM_SIGNIFICANCE, MAJOR_SIGNIFICANCE, - TYPO_SIGNIFICANCE, REDIRECT_HTML, - HOW_TO_CONTRIBUTE_CATEGORY, ADMINISTRATION_CATEGORY, - CANNED_RESPONSES_CATEGORY) +from kitsune.dashboards import LAST_30_DAYS, PERIODS +from kitsune.sumo.helpers import urlparams +from kitsune.sumo.redis_utils import redis_client, RedisError +from kitsune.sumo.urlresolvers import reverse +from kitsune.wiki.models import Document +from kitsune.wiki.config import ( + MEDIUM_SIGNIFICANCE, MAJOR_SIGNIFICANCE, + TYPO_SIGNIFICANCE, REDIRECT_HTML, + HOW_TO_CONTRIBUTE_CATEGORY, ADMINISTRATION_CATEGORY, + CANNED_RESPONSES_CATEGORY) log = logging.getLogger('k.dashboards.readouts') diff --git a/apps/dashboards/templates/dashboards/base.html b/kitsune/dashboards/templates/dashboards/base.html similarity index 100% rename from apps/dashboards/templates/dashboards/base.html rename to kitsune/dashboards/templates/dashboards/base.html diff --git a/apps/dashboards/templates/dashboards/contributors.html b/kitsune/dashboards/templates/dashboards/contributors.html similarity index 100% rename from apps/dashboards/templates/dashboards/contributors.html rename to kitsune/dashboards/templates/dashboards/contributors.html diff --git a/apps/dashboards/templates/dashboards/group_locale.html b/kitsune/dashboards/templates/dashboards/group_locale.html similarity index 100% rename from apps/dashboards/templates/dashboards/group_locale.html rename to kitsune/dashboards/templates/dashboards/group_locale.html diff --git a/apps/dashboards/templates/dashboards/includes/action_list.html b/kitsune/dashboards/templates/dashboards/includes/action_list.html similarity index 100% rename from apps/dashboards/templates/dashboards/includes/action_list.html rename to kitsune/dashboards/templates/dashboards/includes/action_list.html diff --git a/apps/dashboards/templates/dashboards/includes/announcement_list.html b/kitsune/dashboards/templates/dashboards/includes/announcement_list.html similarity index 100% rename from apps/dashboards/templates/dashboards/includes/announcement_list.html rename to kitsune/dashboards/templates/dashboards/includes/announcement_list.html diff --git a/apps/dashboards/templates/dashboards/includes/kb_readout.html b/kitsune/dashboards/templates/dashboards/includes/kb_readout.html similarity index 100% rename from apps/dashboards/templates/dashboards/includes/kb_readout.html rename to kitsune/dashboards/templates/dashboards/includes/kb_readout.html diff --git a/apps/dashboards/templates/dashboards/includes/macros.html b/kitsune/dashboards/templates/dashboards/includes/macros.html similarity index 100% rename from apps/dashboards/templates/dashboards/includes/macros.html rename to kitsune/dashboards/templates/dashboards/includes/macros.html diff --git a/apps/dashboards/templates/dashboards/includes/personal_tabs.html b/kitsune/dashboards/templates/dashboards/includes/personal_tabs.html similarity index 100% rename from apps/dashboards/templates/dashboards/includes/personal_tabs.html rename to kitsune/dashboards/templates/dashboards/includes/personal_tabs.html diff --git a/apps/dashboards/templates/dashboards/kb_detail.html b/kitsune/dashboards/templates/dashboards/kb_detail.html similarity index 100% rename from apps/dashboards/templates/dashboards/kb_detail.html rename to kitsune/dashboards/templates/dashboards/kb_detail.html diff --git a/apps/dashboards/templates/dashboards/localization.html b/kitsune/dashboards/templates/dashboards/localization.html similarity index 100% rename from apps/dashboards/templates/dashboards/localization.html rename to kitsune/dashboards/templates/dashboards/localization.html diff --git a/apps/dashboards/templates/dashboards/questions.html b/kitsune/dashboards/templates/dashboards/questions.html similarity index 100% rename from apps/dashboards/templates/dashboards/questions.html rename to kitsune/dashboards/templates/dashboards/questions.html diff --git a/apps/dashboards/tests/__init__.py b/kitsune/dashboards/tests/__init__.py similarity index 81% rename from apps/dashboards/tests/__init__.py rename to kitsune/dashboards/tests/__init__.py index 286a330187b..5d56ced4b4a 100644 --- a/apps/dashboards/tests/__init__.py +++ b/kitsune/dashboards/tests/__init__.py @@ -1,7 +1,7 @@ from django.contrib.auth.models import Group -from dashboards.models import GroupDashboard -from dashboards.personal import LocaleDashboard +from kitsune.dashboards.models import GroupDashboard +from kitsune.dashboards.personal import LocaleDashboard def group_dashboard(save=False, **kwargs): diff --git a/apps/dashboards/tests/test_cron.py b/kitsune/dashboards/tests/test_cron.py similarity index 95% rename from apps/dashboards/tests/test_cron.py rename to kitsune/dashboards/tests/test_cron.py index 4b5f8198779..c1902e7ea9c 100644 --- a/apps/dashboards/tests/test_cron.py +++ b/kitsune/dashboards/tests/test_cron.py @@ -6,12 +6,13 @@ from nose import SkipTest from nose.tools import eq_ -from dashboards.cron import (cache_most_unhelpful_kb_articles, - _get_old_unhelpful, _get_current_unhelpful) -from sumo.tests import TestCase -from sumo.redis_utils import redis_client, RedisError -from wiki.models import HelpfulVote -from wiki.tests import revision +from kitsune.dashboards.cron import ( + cache_most_unhelpful_kb_articles, _get_old_unhelpful, + _get_current_unhelpful) +from kitsune.sumo.redis_utils import redis_client, RedisError +from kitsune.sumo.tests import TestCase +from kitsune.wiki.models import HelpfulVote +from kitsune.wiki.tests import revision def _add_vote_in_past(rev, vote, days_back): diff --git a/apps/dashboards/tests/test_models.py b/kitsune/dashboards/tests/test_models.py similarity index 94% rename from apps/dashboards/tests/test_models.py rename to kitsune/dashboards/tests/test_models.py index 8fdbba093d4..ed822a35c84 100644 --- a/apps/dashboards/tests/test_models.py +++ b/kitsune/dashboards/tests/test_models.py @@ -2,9 +2,10 @@ from mock import patch from nose.tools import eq_ -from dashboards.models import WikiDocumentVisits, LAST_7_DAYS, googleanalytics -from sumo.tests import TestCase -from wiki.tests import document, revision +from kitsune.dashboards.models import ( + WikiDocumentVisits, LAST_7_DAYS, googleanalytics) +from kitsune.sumo.tests import TestCase +from kitsune.wiki.tests import document, revision class DocumentVisitsTests(TestCase): diff --git a/apps/dashboards/tests/test_personal.py b/kitsune/dashboards/tests/test_personal.py similarity index 77% rename from apps/dashboards/tests/test_personal.py rename to kitsune/dashboards/tests/test_personal.py index e2e43e1c42f..1921842eeff 100644 --- a/apps/dashboards/tests/test_personal.py +++ b/kitsune/dashboards/tests/test_personal.py @@ -1,11 +1,11 @@ import mock from nose.tools import eq_ -from dashboards.models import GroupDashboard -import dashboards.personal -from dashboards.personal import Dashboard, personal_dashboards -from sumo.tests import TestCase -from users.tests import user, group +import kitsune.dashboards.personal +from kitsune.dashboards.models import GroupDashboard +from kitsune.dashboards.personal import Dashboard, personal_dashboards +from kitsune.sumo.tests import TestCase +from kitsune.users.tests import user, group class ATestDashboard(Dashboard): @@ -15,7 +15,7 @@ class ATestDashboard(Dashboard): class DashboardsTests(TestCase): """Tests for the personal_dashboards() function""" - @mock.patch.object(dashboards.personal, + @mock.patch.object(kitsune.dashboards.personal, 'GROUP_DASHBOARDS', {ATestDashboard.slug: ATestDashboard}) def test_personal_dashboards(self): diff --git a/apps/dashboards/tests/test_readouts.py b/kitsune/dashboards/tests/test_readouts.py similarity index 97% rename from apps/dashboards/tests/test_readouts.py rename to kitsune/dashboards/tests/test_readouts.py index b36a39059f6..79e05830335 100644 --- a/apps/dashboards/tests/test_readouts.py +++ b/kitsune/dashboards/tests/test_readouts.py @@ -4,23 +4,25 @@ from nose.tools import eq_ -from dashboards.readouts import (UnreviewedReadout, OutOfDateReadout, - TemplateTranslationsReadout, overview_rows, - MostVisitedDefaultLanguageReadout, - MostVisitedTranslationsReadout, - UnreadyForLocalizationReadout, - NeedsChangesReadout, - NavigationTranslationsReadout, - UntranslatedReadout, - TemplateReadout, - HowToContributeReadout, - AdministrationReadout, CannedResponsesReadout) -from sumo.tests import TestCase -from products.tests import product -from wiki.config import (MAJOR_SIGNIFICANCE, MEDIUM_SIGNIFICANCE, - TYPO_SIGNIFICANCE, HOW_TO_CONTRIBUTE_CATEGORY, - ADMINISTRATION_CATEGORY, CANNED_RESPONSES_CATEGORY) -from wiki.tests import revision, translated_revision, document +from kitsune.dashboards.readouts import ( + UnreviewedReadout, OutOfDateReadout, + TemplateTranslationsReadout, overview_rows, + MostVisitedDefaultLanguageReadout, + MostVisitedTranslationsReadout, + UnreadyForLocalizationReadout, + NeedsChangesReadout, + NavigationTranslationsReadout, + UntranslatedReadout, + TemplateReadout, + HowToContributeReadout, + AdministrationReadout, CannedResponsesReadout) +from kitsune.products.tests import product +from kitsune.sumo.tests import TestCase +from kitsune.wiki.config import ( + MAJOR_SIGNIFICANCE, MEDIUM_SIGNIFICANCE, + TYPO_SIGNIFICANCE, HOW_TO_CONTRIBUTE_CATEGORY, + ADMINISTRATION_CATEGORY, CANNED_RESPONSES_CATEGORY) +from kitsune.wiki.tests import revision, translated_revision, document class MockRequest(object): diff --git a/apps/dashboards/tests/test_templates.py b/kitsune/dashboards/tests/test_templates.py similarity index 94% rename from apps/dashboards/tests/test_templates.py rename to kitsune/dashboards/tests/test_templates.py index 404c5b6292a..1a0f728b443 100644 --- a/apps/dashboards/tests/test_templates.py +++ b/kitsune/dashboards/tests/test_templates.py @@ -4,13 +4,13 @@ from django.contrib.sites.models import Site -from announcements.tests import announcement -from dashboards.tests import group_dashboard -from sumo.tests import TestCase -from sumo.urlresolvers import reverse -from users.tests import user, group, profile -from wiki.config import MAJOR_SIGNIFICANCE, MEDIUM_SIGNIFICANCE -from wiki.tests import revision, translated_revision +from kitsune.announcements.tests import announcement +from kitsune.dashboards.tests import group_dashboard +from kitsune.sumo.tests import TestCase +from kitsune.sumo.urlresolvers import reverse +from kitsune.users.tests import user, group, profile +from kitsune.wiki.config import MAJOR_SIGNIFICANCE, MEDIUM_SIGNIFICANCE +from kitsune.wiki.tests import revision, translated_revision class LocalizationDashTests(TestCase): diff --git a/apps/dashboards/tests/test_views.py b/kitsune/dashboards/tests/test_views.py similarity index 89% rename from apps/dashboards/tests/test_views.py rename to kitsune/dashboards/tests/test_views.py index f43cc5dca37..ece84f87497 100644 --- a/apps/dashboards/tests/test_views.py +++ b/kitsune/dashboards/tests/test_views.py @@ -2,13 +2,13 @@ from nose.tools import eq_ -from announcements.tests import announcement -from dashboards.readouts import CONTRIBUTOR_READOUTS -from sumo.tests import TestCase -from sumo.urlresolvers import reverse -from users.tests import user -from wiki.models import HelpfulVote -from wiki.tests import locale +from kitsune.announcements.tests import announcement +from kitsune.dashboards.readouts import CONTRIBUTOR_READOUTS +from kitsune.sumo.tests import TestCase +from kitsune.sumo.urlresolvers import reverse +from kitsune.users.tests import user +from kitsune.wiki.models import HelpfulVote +from kitsune.wiki.tests import locale class LocalizationDashTests(TestCase): diff --git a/apps/dashboards/urls.py b/kitsune/dashboards/urls.py similarity index 93% rename from apps/dashboards/urls.py rename to kitsune/dashboards/urls.py index 6e39ac45b99..1b6b64a04d5 100644 --- a/apps/dashboards/urls.py +++ b/kitsune/dashboards/urls.py @@ -1,7 +1,7 @@ from django.conf.urls import patterns, url -urlpatterns = patterns('dashboards.views', +urlpatterns = patterns('kitsune.dashboards.views', url(r'^dashboard$', 'default_dashboard', name='dashboards.default'), url(r'^dashboard/(?P\d+)$', 'group_dashboard', name='dashboards.group'), diff --git a/apps/dashboards/utils.py b/kitsune/dashboards/utils.py similarity index 87% rename from apps/dashboards/utils.py rename to kitsune/dashboards/utils.py index 92bd3374cde..e526591a7ca 100644 --- a/apps/dashboards/utils.py +++ b/kitsune/dashboards/utils.py @@ -3,14 +3,15 @@ from django.shortcuts import render from django.utils.datastructures import SortedDict -from announcements.models import Announcement -from announcements.forms import AnnouncementForm -from dashboards import ACTIONS_PER_PAGE -from products.models import Product -from sumo_locales import LOCALES -from sumo.utils import paginate -from wiki.events import (ApproveRevisionInLocaleEvent, ReadyRevisionEvent, - ReviewableRevisionInLocaleEvent) +from kitsune.announcements.models import Announcement +from kitsune.announcements.forms import AnnouncementForm +from kitsune.dashboards import ACTIONS_PER_PAGE +from kitsune.lib.sumo_locales import LOCALES +from kitsune.products.models import Product +from kitsune.sumo.utils import paginate +from kitsune.wiki.events import ( + ApproveRevisionInLocaleEvent, ReadyRevisionEvent, + ReviewableRevisionInLocaleEvent) def model_actions(model_class, request): diff --git a/apps/dashboards/views.py b/kitsune/dashboards/views.py similarity index 88% rename from apps/dashboards/views.py rename to kitsune/dashboards/views.py index 154cd525c01..c142e9b059f 100644 --- a/apps/dashboards/views.py +++ b/kitsune/dashboards/views.py @@ -11,17 +11,17 @@ from tower import ugettext as _ -from access.decorators import login_required -from announcements.views import user_can_announce -from dashboards.personal import GROUP_DASHBOARDS, personal_dashboards -from dashboards.readouts import (overview_rows, READOUTS, L10N_READOUTS, - CONTRIBUTOR_READOUTS) -from dashboards.utils import render_readouts -from products.models import Product -from sumo.urlresolvers import reverse -from sumo.utils import smart_int -from users.helpers import profile_url -from wiki.models import Locale +from kitsune.access.decorators import login_required +from kitsune.announcements.views import user_can_announce +from kitsune.dashboards.personal import GROUP_DASHBOARDS, personal_dashboards +from kitsune.dashboards.readouts import ( + overview_rows, READOUTS, L10N_READOUTS, CONTRIBUTOR_READOUTS) +from kitsune.dashboards.utils import render_readouts +from kitsune.products.models import Product +from kitsune.sumo.urlresolvers import reverse +from kitsune.sumo.utils import smart_int +from kitsune.users.helpers import profile_url +from kitsune.wiki.models import Locale log = logging.getLogger('k.dashboards') diff --git a/apps/customercare/__init__.py b/kitsune/flagit/__init__.py similarity index 100% rename from apps/customercare/__init__.py rename to kitsune/flagit/__init__.py diff --git a/apps/flagit/models.py b/kitsune/flagit/models.py similarity index 97% rename from apps/flagit/models.py rename to kitsune/flagit/models.py index 5802838f837..c55263f0365 100644 --- a/apps/flagit/models.py +++ b/kitsune/flagit/models.py @@ -7,7 +7,7 @@ from tower import ugettext_lazy as _lazy -from sumo.models import ModelBase, ManagerBase +from kitsune.sumo.models import ModelBase, ManagerBase class FlaggedObjectManager(ManagerBase): diff --git a/apps/flagit/templates/flagit/includes/flagged_answer.html b/kitsune/flagit/templates/flagit/includes/flagged_answer.html similarity index 100% rename from apps/flagit/templates/flagit/includes/flagged_answer.html rename to kitsune/flagit/templates/flagit/includes/flagged_answer.html diff --git a/apps/flagit/templates/flagit/includes/flagged_post.html b/kitsune/flagit/templates/flagit/includes/flagged_post.html similarity index 100% rename from apps/flagit/templates/flagit/includes/flagged_post.html rename to kitsune/flagit/templates/flagit/includes/flagged_post.html diff --git a/apps/flagit/templates/flagit/includes/flagged_profile.html b/kitsune/flagit/templates/flagit/includes/flagged_profile.html similarity index 100% rename from apps/flagit/templates/flagit/includes/flagged_profile.html rename to kitsune/flagit/templates/flagit/includes/flagged_profile.html diff --git a/apps/flagit/templates/flagit/includes/flagged_question.html b/kitsune/flagit/templates/flagit/includes/flagged_question.html similarity index 100% rename from apps/flagit/templates/flagit/includes/flagged_question.html rename to kitsune/flagit/templates/flagit/includes/flagged_question.html diff --git a/apps/flagit/templates/flagit/includes/macros.html b/kitsune/flagit/templates/flagit/includes/macros.html similarity index 100% rename from apps/flagit/templates/flagit/includes/macros.html rename to kitsune/flagit/templates/flagit/includes/macros.html diff --git a/apps/flagit/templates/flagit/queue.html b/kitsune/flagit/templates/flagit/queue.html similarity index 100% rename from apps/flagit/templates/flagit/queue.html rename to kitsune/flagit/templates/flagit/queue.html diff --git a/apps/flagit/tests/__init__.py b/kitsune/flagit/tests/__init__.py similarity index 81% rename from apps/flagit/tests/__init__.py rename to kitsune/flagit/tests/__init__.py index d79b58d74f6..3ed31beadf3 100644 --- a/apps/flagit/tests/__init__.py +++ b/kitsune/flagit/tests/__init__.py @@ -3,9 +3,9 @@ from django.conf import settings from django.template.defaultfilters import slugify -from questions.tests import question -from sumo.tests import LocalizingClient, TestCase -from users.tests import user +from kitsune.questions.tests import question +from kitsune.sumo.tests import LocalizingClient, TestCase +from kitsune.users.tests import user class TestCaseBase(TestCase): diff --git a/apps/flagit/tests/test_permissions.py b/kitsune/flagit/tests/test_permissions.py similarity index 78% rename from apps/flagit/tests/test_permissions.py rename to kitsune/flagit/tests/test_permissions.py index 921446cc384..522afbc902c 100644 --- a/apps/flagit/tests/test_permissions.py +++ b/kitsune/flagit/tests/test_permissions.py @@ -1,9 +1,9 @@ from nose.tools import eq_ -from flagit.models import FlaggedObject -from flagit.tests import TestCaseBase -from sumo.urlresolvers import reverse -from users.tests import user, add_permission +from kitsune.flagit.models import FlaggedObject +from kitsune.flagit.tests import TestCaseBase +from kitsune.sumo.urlresolvers import reverse +from kitsune.users.tests import user, add_permission class FlagitTestPermissions(TestCaseBase): diff --git a/apps/flagit/tests/test_templates.py b/kitsune/flagit/tests/test_templates.py similarity index 83% rename from apps/flagit/tests/test_templates.py rename to kitsune/flagit/tests/test_templates.py index 9f3731517e6..a22f1c91b7f 100644 --- a/apps/flagit/tests/test_templates.py +++ b/kitsune/flagit/tests/test_templates.py @@ -1,12 +1,12 @@ from nose.tools import eq_ from pyquery import PyQuery as pq -from flagit.models import FlaggedObject -from flagit.tests import TestCaseBase -from questions.models import Answer -from questions.tests import question, answer -from sumo.tests import post, get -from users.tests import user,add_permission +from kitsune.flagit.models import FlaggedObject +from kitsune.flagit.tests import TestCaseBase +from kitsune.questions.models import Answer +from kitsune.questions.tests import question, answer +from kitsune.sumo.tests import post, get +from kitsune.users.tests import user,add_permission class FlaggedQueueTestCase(TestCaseBase): diff --git a/apps/flagit/tests/test_views.py b/kitsune/flagit/tests/test_views.py similarity index 79% rename from apps/flagit/tests/test_views.py rename to kitsune/flagit/tests/test_views.py index e63b4ba0a4d..122e80f4d1d 100644 --- a/apps/flagit/tests/test_views.py +++ b/kitsune/flagit/tests/test_views.py @@ -2,12 +2,12 @@ from nose.tools import eq_ -from flagit.tests import TestCaseBase -from flagit.models import FlaggedObject -from questions.models import Question -from questions.tests import question -from sumo.tests import post -from users.tests import user +from kitsune.flagit.tests import TestCaseBase +from kitsune.flagit.models import FlaggedObject +from kitsune.questions.models import Question +from kitsune.questions.tests import question +from kitsune.sumo.tests import post +from kitsune.users.tests import user class FlagTestCase(TestCaseBase): diff --git a/apps/flagit/urls.py b/kitsune/flagit/urls.py similarity index 83% rename from apps/flagit/urls.py rename to kitsune/flagit/urls.py index ada1067ae8f..8af003619f3 100644 --- a/apps/flagit/urls.py +++ b/kitsune/flagit/urls.py @@ -1,6 +1,6 @@ from django.conf.urls import patterns, url -urlpatterns = patterns('flagit.views', +urlpatterns = patterns('kitsune.flagit.views', url(r'^$', 'queue', name='flagit.queue'), url(r'^/flag$', 'flag', name='flagit.flag'), url(r'^/update/(?P\d+)$', 'update', diff --git a/apps/flagit/views.py b/kitsune/flagit/views.py similarity index 93% rename from apps/flagit/views.py rename to kitsune/flagit/views.py index 41a822092f4..397e398b02c 100644 --- a/apps/flagit/views.py +++ b/kitsune/flagit/views.py @@ -8,9 +8,9 @@ from tower import ugettext as _ -from access.decorators import permission_required, login_required -from flagit.models import FlaggedObject -from sumo.urlresolvers import reverse +from kitsune.access.decorators import permission_required, login_required +from kitsune.flagit.models import FlaggedObject +from kitsune.sumo.urlresolvers import reverse @require_POST diff --git a/apps/forums/README.rst b/kitsune/forums/README.rst similarity index 100% rename from apps/forums/README.rst rename to kitsune/forums/README.rst diff --git a/apps/forums/__init__.py b/kitsune/forums/__init__.py similarity index 100% rename from apps/forums/__init__.py rename to kitsune/forums/__init__.py diff --git a/apps/forums/admin.py b/kitsune/forums/admin.py similarity index 90% rename from apps/forums/admin.py rename to kitsune/forums/admin.py index 00f044bb82c..b19419b0235 100644 --- a/apps/forums/admin.py +++ b/kitsune/forums/admin.py @@ -1,5 +1,6 @@ from django.contrib import admin -from forums.models import Forum + +from kitsune.forums.models import Forum class ForumAdmin(admin.ModelAdmin): diff --git a/apps/forums/events.py b/kitsune/forums/events.py similarity index 95% rename from apps/forums/events.py rename to kitsune/forums/events.py index 1d3bbf40767..db2af3ec793 100644 --- a/apps/forums/events.py +++ b/kitsune/forums/events.py @@ -3,8 +3,8 @@ from tidings.events import InstanceEvent, EventUnion from tower import ugettext_lazy as _lazy -from forums.models import Thread, Forum -from sumo.email_utils import emails_with_users_and_watches +from kitsune.forums.models import Thread, Forum +from kitsune.sumo.email_utils import emails_with_users_and_watches class NewPostEvent(InstanceEvent): diff --git a/apps/forums/feeds.py b/kitsune/forums/feeds.py similarity index 95% rename from apps/forums/feeds.py rename to kitsune/forums/feeds.py index 258309fed22..8dabc455e0a 100644 --- a/apps/forums/feeds.py +++ b/kitsune/forums/feeds.py @@ -6,8 +6,8 @@ from tower import ugettext as _ -from forums.models import Forum, Thread -import forums as constants +from kitsune import forums as constants +from kitsune.forums.models import Forum, Thread class ThreadsFeed(Feed): diff --git a/apps/forums/fixtures/forums_permissions.json b/kitsune/forums/fixtures/forums_permissions.json similarity index 100% rename from apps/forums/fixtures/forums_permissions.json rename to kitsune/forums/fixtures/forums_permissions.json diff --git a/apps/forums/fixtures/posts.json b/kitsune/forums/fixtures/posts.json similarity index 100% rename from apps/forums/fixtures/posts.json rename to kitsune/forums/fixtures/posts.json diff --git a/apps/forums/formatters.py b/kitsune/forums/formatters.py similarity index 88% rename from apps/forums/formatters.py rename to kitsune/forums/formatters.py index 62deb230d83..d6adf64e7fd 100644 --- a/apps/forums/formatters.py +++ b/kitsune/forums/formatters.py @@ -2,8 +2,8 @@ from jingo.helpers import fe from tower import ugettext as _ -from activity import ActionFormatter -from users.helpers import display_name, profile_url +from kitsune.activity import ActionFormatter +from kitsune.users.helpers import display_name, profile_url class ForumReplyFormatter(ActionFormatter): diff --git a/apps/forums/forms.py b/kitsune/forums/forms.py similarity index 96% rename from apps/forums/forms.py rename to kitsune/forums/forms.py index 33a6b9d1bff..615f2bb3d20 100644 --- a/apps/forums/forms.py +++ b/kitsune/forums/forms.py @@ -2,8 +2,8 @@ from tower import ugettext_lazy as _lazy -from sumo.form_fields import StrippedCharField -from forums.models import Thread, Post +from kitsune.forums.models import Thread, Post +from kitsune.sumo.form_fields import StrippedCharField MSG_TITLE_REQUIRED = _lazy(u'Please provide a title.') diff --git a/apps/forums/models.py b/kitsune/forums/models.py similarity index 96% rename from apps/forums/models.py rename to kitsune/forums/models.py index 784c479fd81..61801564d04 100644 --- a/apps/forums/models.py +++ b/kitsune/forums/models.py @@ -6,14 +6,15 @@ from tidings.models import NotificationsMixin -from access import has_perm, perm_is_defined_on -from activity.models import ActionMixin -import forums -from sumo.helpers import urlparams, wiki_to_html -from sumo.urlresolvers import reverse -from sumo.models import ModelBase -from search.models import (SearchMappingType, SearchMixin, - register_for_indexing, register_mapping_type) +from kitsune import forums +from kitsune.access import has_perm, perm_is_defined_on +from kitsune.activity.models import ActionMixin +from kitsune.sumo.helpers import urlparams, wiki_to_html +from kitsune.sumo.urlresolvers import reverse +from kitsune.sumo.models import ModelBase +from kitsune.search.models import ( + SearchMappingType, SearchMixin, register_for_indexing, + register_mapping_type) def _last_post_from(posts, exclude_post=None): diff --git a/apps/forums/permissions.py b/kitsune/forums/permissions.py similarity index 91% rename from apps/forums/permissions.py rename to kitsune/forums/permissions.py index 2a7626a40b2..8b01545454e 100644 --- a/apps/forums/permissions.py +++ b/kitsune/forums/permissions.py @@ -1,7 +1,7 @@ -from forums.models import Forum - import authority +from kitsune.forums.models import Forum + class ForumPermission(authority.permissions.BasePermission): label = 'forums_forum' diff --git a/apps/forums/tasks.py b/kitsune/forums/tasks.py similarity index 92% rename from apps/forums/tasks.py rename to kitsune/forums/tasks.py index 509a19579c2..beeac0faef2 100644 --- a/apps/forums/tasks.py +++ b/kitsune/forums/tasks.py @@ -6,8 +6,8 @@ from celery.task import task from multidb.pinning import pin_this_thread, unpin_this_thread -from activity.models import Action -from forums.models import Post +from kitsune.activity.models import Action +from kitsune.forums.models import Post log = logging.getLogger('k.task') diff --git a/apps/forums/templates/forums/base.html b/kitsune/forums/templates/forums/base.html similarity index 100% rename from apps/forums/templates/forums/base.html rename to kitsune/forums/templates/forums/base.html diff --git a/apps/forums/templates/forums/confirm_post_delete.html b/kitsune/forums/templates/forums/confirm_post_delete.html similarity index 100% rename from apps/forums/templates/forums/confirm_post_delete.html rename to kitsune/forums/templates/forums/confirm_post_delete.html diff --git a/apps/forums/templates/forums/confirm_thread_delete.html b/kitsune/forums/templates/forums/confirm_thread_delete.html similarity index 100% rename from apps/forums/templates/forums/confirm_thread_delete.html rename to kitsune/forums/templates/forums/confirm_thread_delete.html diff --git a/apps/forums/templates/forums/edit_post.html b/kitsune/forums/templates/forums/edit_post.html similarity index 100% rename from apps/forums/templates/forums/edit_post.html rename to kitsune/forums/templates/forums/edit_post.html diff --git a/apps/forums/templates/forums/edit_thread.html b/kitsune/forums/templates/forums/edit_thread.html similarity index 100% rename from apps/forums/templates/forums/edit_thread.html rename to kitsune/forums/templates/forums/edit_thread.html diff --git a/apps/forums/templates/forums/email/new_post.html b/kitsune/forums/templates/forums/email/new_post.html similarity index 100% rename from apps/forums/templates/forums/email/new_post.html rename to kitsune/forums/templates/forums/email/new_post.html diff --git a/apps/forums/templates/forums/email/new_post.ltxt b/kitsune/forums/templates/forums/email/new_post.ltxt similarity index 100% rename from apps/forums/templates/forums/email/new_post.ltxt rename to kitsune/forums/templates/forums/email/new_post.ltxt diff --git a/apps/forums/templates/forums/email/new_thread.html b/kitsune/forums/templates/forums/email/new_thread.html similarity index 100% rename from apps/forums/templates/forums/email/new_thread.html rename to kitsune/forums/templates/forums/email/new_thread.html diff --git a/apps/forums/templates/forums/email/new_thread.ltxt b/kitsune/forums/templates/forums/email/new_thread.ltxt similarity index 100% rename from apps/forums/templates/forums/email/new_thread.ltxt rename to kitsune/forums/templates/forums/email/new_thread.ltxt diff --git a/apps/forums/templates/forums/forums.html b/kitsune/forums/templates/forums/forums.html similarity index 100% rename from apps/forums/templates/forums/forums.html rename to kitsune/forums/templates/forums/forums.html diff --git a/apps/forums/templates/forums/includes/forum_macros.html b/kitsune/forums/templates/forums/includes/forum_macros.html similarity index 100% rename from apps/forums/templates/forums/includes/forum_macros.html rename to kitsune/forums/templates/forums/includes/forum_macros.html diff --git a/apps/forums/templates/forums/includes/post-new.html b/kitsune/forums/templates/forums/includes/post-new.html similarity index 100% rename from apps/forums/templates/forums/includes/post-new.html rename to kitsune/forums/templates/forums/includes/post-new.html diff --git a/apps/forums/templates/forums/includes/post.html b/kitsune/forums/templates/forums/includes/post.html similarity index 100% rename from apps/forums/templates/forums/includes/post.html rename to kitsune/forums/templates/forums/includes/post.html diff --git a/apps/forums/templates/forums/includes/post_preview.html b/kitsune/forums/templates/forums/includes/post_preview.html similarity index 100% rename from apps/forums/templates/forums/includes/post_preview.html rename to kitsune/forums/templates/forums/includes/post_preview.html diff --git a/apps/forums/templates/forums/new_thread.html b/kitsune/forums/templates/forums/new_thread.html similarity index 100% rename from apps/forums/templates/forums/new_thread.html rename to kitsune/forums/templates/forums/new_thread.html diff --git a/apps/forums/templates/forums/posts.html b/kitsune/forums/templates/forums/posts.html similarity index 100% rename from apps/forums/templates/forums/posts.html rename to kitsune/forums/templates/forums/posts.html diff --git a/apps/forums/templates/forums/threads.html b/kitsune/forums/templates/forums/threads.html similarity index 100% rename from apps/forums/templates/forums/threads.html rename to kitsune/forums/templates/forums/threads.html diff --git a/apps/forums/tests/__init__.py b/kitsune/forums/tests/__init__.py similarity index 89% rename from apps/forums/tests/__init__.py rename to kitsune/forums/tests/__init__.py index f8db619569d..67947e39418 100644 --- a/apps/forums/tests/__init__.py +++ b/kitsune/forums/tests/__init__.py @@ -3,9 +3,9 @@ from django.template.defaultfilters import slugify -from forums.models import Forum, Thread, Post -from users.tests import user -from sumo.tests import LocalizingClient, TestCase, with_save +from kitsune.forums.models import Forum, Thread, Post +from kitsune.users.tests import user +from kitsune.sumo.tests import LocalizingClient, TestCase, with_save class ForumTestCase(TestCase): diff --git a/apps/forums/tests/test_activity.py b/kitsune/forums/tests/test_activity.py similarity index 83% rename from apps/forums/tests/test_activity.py rename to kitsune/forums/tests/test_activity.py index cb9f31c14fb..66846257da0 100644 --- a/apps/forums/tests/test_activity.py +++ b/kitsune/forums/tests/test_activity.py @@ -1,9 +1,9 @@ from nose.tools import eq_ -from activity.models import Action -from forums.tests import ForumTestCase, thread, post as forum_post -from sumo.tests import post -from users.tests import user +from kitsune.activity.models import Action +from kitsune.forums.tests import ForumTestCase, thread, post as forum_post +from kitsune.sumo.tests import post +from kitsune.users.tests import user class ReplyLoggingTests(ForumTestCase): diff --git a/apps/forums/tests/test_es.py b/kitsune/forums/tests/test_es.py similarity index 90% rename from apps/forums/tests/test_es.py rename to kitsune/forums/tests/test_es.py index ee36dd19aeb..32e1ac993c2 100644 --- a/apps/forums/tests/test_es.py +++ b/kitsune/forums/tests/test_es.py @@ -1,8 +1,8 @@ from nose.tools import eq_ -from forums.models import ThreadMappingType -from forums.tests import thread, post -from search.tests.test_es import ElasticTestCase +from kitsune.forums.models import ThreadMappingType +from kitsune.forums.tests import thread, post +from kitsune.search.tests.test_es import ElasticTestCase class TestPostUpdate(ElasticTestCase): diff --git a/apps/forums/tests/test_feeds.py b/kitsune/forums/tests/test_feeds.py similarity index 90% rename from apps/forums/tests/test_feeds.py rename to kitsune/forums/tests/test_feeds.py index 46402431522..ffc9a35dcec 100644 --- a/apps/forums/tests/test_feeds.py +++ b/kitsune/forums/tests/test_feeds.py @@ -2,9 +2,9 @@ from nose.tools import eq_ from pyquery import PyQuery as pq -from forums.feeds import ThreadsFeed, PostsFeed -from forums.tests import ForumTestCase, forum, thread, post -from sumo.tests import get +from kitsune.forums.feeds import ThreadsFeed, PostsFeed +from kitsune.forums.tests import ForumTestCase, forum, thread, post +from kitsune.sumo.tests import get YESTERDAY = datetime.now() - timedelta(days=1) diff --git a/apps/forums/tests/test_models.py b/kitsune/forums/tests/test_models.py similarity index 96% rename from apps/forums/tests/test_models.py rename to kitsune/forums/tests/test_models.py index 777bf1e5cad..8f86f2dad87 100644 --- a/apps/forums/tests/test_models.py +++ b/kitsune/forums/tests/test_models.py @@ -4,14 +4,14 @@ from nose.tools import eq_ -from access.tests import permission -from forums import POSTS_PER_PAGE -from forums.events import NewPostEvent, NewThreadEvent -from forums.models import Forum, Thread, Post -from forums.tests import ForumTestCase, forum, thread, post -from sumo.helpers import urlparams -from sumo.urlresolvers import reverse -from users.tests import user +from kitsune.access.tests import permission +from kitsune.forums import POSTS_PER_PAGE +from kitsune.forums.events import NewPostEvent, NewThreadEvent +from kitsune.forums.models import Forum, Thread, Post +from kitsune.forums.tests import ForumTestCase, forum, thread, post +from kitsune.sumo.helpers import urlparams +from kitsune.sumo.urlresolvers import reverse +from kitsune.users.tests import user YESTERDAY = datetime.now() - timedelta(days=1) diff --git a/apps/forums/tests/test_notifications.py b/kitsune/forums/tests/test_notifications.py similarity index 97% rename from apps/forums/tests/test_notifications.py rename to kitsune/forums/tests/test_notifications.py index 75374bb431f..4a95e1f24dc 100644 --- a/apps/forums/tests/test_notifications.py +++ b/kitsune/forums/tests/test_notifications.py @@ -8,13 +8,14 @@ from nose.tools import eq_ import test_utils -from forums.events import NewPostEvent, NewThreadEvent -from forums.models import Thread, Post -from forums.tests import ForumTestCase, thread, forum, post as forum_post -from sumo.urlresolvers import reverse -from sumo.tests import post, attrs_eq, starts_with -from users.models import Setting -from users.tests import user +from kitsune.forums.events import NewPostEvent, NewThreadEvent +from kitsune.forums.models import Thread, Post +from kitsune.forums.tests import ( + ForumTestCase, thread, forum, post as forum_post) +from kitsune.sumo.urlresolvers import reverse +from kitsune.sumo.tests import post, attrs_eq, starts_with +from kitsune.users.models import Setting +from kitsune.users.tests import user # Some of these contain a locale prefix on included links, while diff --git a/apps/forums/tests/test_permissions.py b/kitsune/forums/tests/test_permissions.py similarity index 95% rename from apps/forums/tests/test_permissions.py rename to kitsune/forums/tests/test_permissions.py index 6082eb57a73..9b6808b3686 100644 --- a/apps/forums/tests/test_permissions.py +++ b/kitsune/forums/tests/test_permissions.py @@ -2,11 +2,11 @@ import test_utils -from access.helpers import has_perm, has_perm_or_owns -from access.tests import permission -from forums.tests import ForumTestCase, forum, thread -from sumo.urlresolvers import reverse -from users.tests import user, group +from kitsune.access.helpers import has_perm, has_perm_or_owns +from kitsune.access.tests import permission +from kitsune.forums.tests import ForumTestCase, forum, thread +from kitsune.sumo.urlresolvers import reverse +from kitsune.users.tests import user, group class ForumTestPermissions(ForumTestCase): diff --git a/apps/forums/tests/test_posts.py b/kitsune/forums/tests/test_posts.py similarity index 96% rename from apps/forums/tests/test_posts.py rename to kitsune/forums/tests/test_posts.py index 31900375648..39d17c6d0fc 100644 --- a/apps/forums/tests/test_posts.py +++ b/kitsune/forums/tests/test_posts.py @@ -4,11 +4,11 @@ from nose.tools import eq_ -from forums.models import Thread, Forum, ThreadLockedError -from forums.tests import ForumTestCase, thread, post -from forums.views import sort_threads -from sumo.tests import get -from users.tests import user +from kitsune.forums.models import Thread, Forum, ThreadLockedError +from kitsune.forums.tests import ForumTestCase, thread, post +from kitsune.forums.views import sort_threads +from kitsune.sumo.tests import get +from kitsune.users.tests import user class PostTestCase(ForumTestCase): diff --git a/apps/forums/tests/test_templates.py b/kitsune/forums/tests/test_templates.py similarity index 98% rename from apps/forums/tests/test_templates.py rename to kitsune/forums/tests/test_templates.py index 5a56e835d60..713aeaacdd1 100644 --- a/apps/forums/tests/test_templates.py +++ b/kitsune/forums/tests/test_templates.py @@ -3,11 +3,12 @@ from nose.tools import eq_ from pyquery import PyQuery as pq -from access.tests import permission -from forums.models import Post -from forums.tests import ForumTestCase, forum, thread, post as forum_post -from sumo.tests import get, post -from users.tests import user, group +from kitsune.access.tests import permission +from kitsune.forums.models import Post +from kitsune.forums.tests import ( + ForumTestCase, forum, thread, post as forum_post) +from kitsune.sumo.tests import get, post +from kitsune.users.tests import user, group class PostsTemplateTests(ForumTestCase): diff --git a/apps/forums/tests/test_urls.py b/kitsune/forums/tests/test_urls.py similarity index 96% rename from apps/forums/tests/test_urls.py rename to kitsune/forums/tests/test_urls.py index 4a3d3d5319b..dcabc957016 100644 --- a/apps/forums/tests/test_urls.py +++ b/kitsune/forums/tests/test_urls.py @@ -2,10 +2,11 @@ from nose.tools import eq_ -from access.tests import permission -from forums.tests import ForumTestCase, forum, thread, post as forum_post -from sumo.tests import get, post -from users.tests import user, group +from kitsune.access.tests import permission +from kitsune.forums.tests import ( + ForumTestCase, forum, thread, post as forum_post) +from kitsune.sumo.tests import get, post +from kitsune.users.tests import user, group class BelongsTestCase(ForumTestCase): diff --git a/apps/forums/tests/test_views.py b/kitsune/forums/tests/test_views.py similarity index 97% rename from apps/forums/tests/test_views.py rename to kitsune/forums/tests/test_views.py index f0ef9711e35..6ffcfa2e1b8 100644 --- a/apps/forums/tests/test_views.py +++ b/kitsune/forums/tests/test_views.py @@ -3,13 +3,14 @@ from django.contrib.contenttypes.models import ContentType -from access.tests import permission -from forums.events import NewThreadEvent, NewPostEvent -from forums.models import Forum, Thread -from forums.tests import ForumTestCase, forum, thread, post as forum_post -from sumo.tests import get, post -from sumo.urlresolvers import reverse -from users.tests import user, group +from kitsune.access.tests import permission +from kitsune.forums.events import NewThreadEvent, NewPostEvent +from kitsune.forums.models import Forum, Thread +from kitsune.forums.tests import ( + ForumTestCase, forum, thread, post as forum_post) +from kitsune.sumo.tests import get, post +from kitsune.sumo.urlresolvers import reverse +from kitsune.users.tests import user, group class PostPermissionsTests(ForumTestCase): diff --git a/apps/forums/urls.py b/kitsune/forums/urls.py similarity index 94% rename from apps/forums/urls.py rename to kitsune/forums/urls.py index 68bee2a30bb..91ad4a991f6 100644 --- a/apps/forums/urls.py +++ b/kitsune/forums/urls.py @@ -1,7 +1,9 @@ from django.conf.urls import patterns, url -from forums.feeds import ThreadsFeed, PostsFeed -urlpatterns = patterns('forums.views', +from kitsune.forums.feeds import ThreadsFeed, PostsFeed + + +urlpatterns = patterns('kitsune.forums.views', url(r'^$', 'forums', name='forums.forums'), url(r'^/post-preview-async$', 'post_preview_async', name='forums.post_preview_async'), diff --git a/apps/forums/views.py b/kitsune/forums/views.py similarity index 96% rename from apps/forums/views.py rename to kitsune/forums/views.py index d5ca57e5018..d54e74c4412 100644 --- a/apps/forums/views.py +++ b/kitsune/forums/views.py @@ -9,17 +9,17 @@ from authority.decorators import permission_required_or_403 from statsd import statsd -from access.decorators import has_perm_or_owns_or_403, login_required -from access import has_perm -import forums as constants -from forums.events import NewPostEvent, NewThreadEvent -from forums.feeds import ThreadsFeed, PostsFeed -from forums.forms import ReplyForm, NewThreadForm, EditThreadForm, EditPostForm -from forums.models import Forum, Thread, Post -from sumo.helpers import urlparams -from sumo.urlresolvers import reverse -from sumo.utils import paginate -from users.models import Setting +from kitsune import forums as constants +from kitsune.access.decorators import has_perm_or_owns_or_403, login_required +from kitsune.access import has_perm +from kitsune.forums.events import NewPostEvent, NewThreadEvent +from kitsune.forums.feeds import ThreadsFeed, PostsFeed +from kitsune.forums.forms import ReplyForm, NewThreadForm, EditThreadForm, EditPostForm +from kitsune.forums.models import Forum, Thread, Post +from kitsune.sumo.helpers import urlparams +from kitsune.sumo.urlresolvers import reverse +from kitsune.sumo.utils import paginate +from kitsune.users.models import Setting log = logging.getLogger('k.forums') diff --git a/apps/gallery/__init__.py b/kitsune/gallery/__init__.py similarity index 100% rename from apps/gallery/__init__.py rename to kitsune/gallery/__init__.py diff --git a/apps/gallery/forms.py b/kitsune/gallery/forms.py similarity index 97% rename from apps/gallery/forms.py rename to kitsune/gallery/forms.py index 7b171661f2e..da29d793b0a 100644 --- a/apps/gallery/forms.py +++ b/kitsune/gallery/forms.py @@ -4,10 +4,11 @@ from tower import ugettext_lazy as _lazy, ugettext as _ -from gallery.models import Image, Video -from sumo.form_fields import StrippedCharField -from sumo_locales import LOCALES -from upload.forms import clean_image_extension +from kitsune.gallery.models import Image, Video +from kitsune.lib.sumo_locales import LOCALES +from kitsune.sumo.form_fields import StrippedCharField +from kitsune.upload.forms import clean_image_extension + # Error messages MSG_TITLE_REQUIRED = _lazy(u'Please provide a title.') diff --git a/apps/gallery/models.py b/kitsune/gallery/models.py similarity index 94% rename from apps/gallery/models.py rename to kitsune/gallery/models.py index 51b41716f6b..4fcbcca983a 100644 --- a/apps/gallery/models.py +++ b/kitsune/gallery/models.py @@ -4,9 +4,9 @@ from django.contrib.auth.models import User from django.db import models -from sumo.models import ModelBase, LocaleField -from sumo.urlresolvers import reverse -from sumo.utils import auto_delete_files +from kitsune.sumo.models import ModelBase, LocaleField +from kitsune.sumo.urlresolvers import reverse +from kitsune.sumo.utils import auto_delete_files class Media(ModelBase): diff --git a/apps/gallery/templates/gallery/confirm_media_delete.html b/kitsune/gallery/templates/gallery/confirm_media_delete.html similarity index 100% rename from apps/gallery/templates/gallery/confirm_media_delete.html rename to kitsune/gallery/templates/gallery/confirm_media_delete.html diff --git a/apps/gallery/templates/gallery/edit_media.html b/kitsune/gallery/templates/gallery/edit_media.html similarity index 100% rename from apps/gallery/templates/gallery/edit_media.html rename to kitsune/gallery/templates/gallery/edit_media.html diff --git a/apps/gallery/templates/gallery/gallery.html b/kitsune/gallery/templates/gallery/gallery.html similarity index 100% rename from apps/gallery/templates/gallery/gallery.html rename to kitsune/gallery/templates/gallery/gallery.html diff --git a/apps/gallery/templates/gallery/includes/media_list.html b/kitsune/gallery/templates/gallery/includes/media_list.html similarity index 100% rename from apps/gallery/templates/gallery/includes/media_list.html rename to kitsune/gallery/templates/gallery/includes/media_list.html diff --git a/apps/gallery/templates/gallery/includes/upload_media_form.html b/kitsune/gallery/templates/gallery/includes/upload_media_form.html similarity index 100% rename from apps/gallery/templates/gallery/includes/upload_media_form.html rename to kitsune/gallery/templates/gallery/includes/upload_media_form.html diff --git a/apps/gallery/templates/gallery/media.html b/kitsune/gallery/templates/gallery/media.html similarity index 100% rename from apps/gallery/templates/gallery/media.html rename to kitsune/gallery/templates/gallery/media.html diff --git a/apps/gallery/templates/gallery/search.html b/kitsune/gallery/templates/gallery/search.html similarity index 100% rename from apps/gallery/templates/gallery/search.html rename to kitsune/gallery/templates/gallery/search.html diff --git a/apps/gallery/tests/__init__.py b/kitsune/gallery/tests/__init__.py similarity index 79% rename from apps/gallery/tests/__init__.py rename to kitsune/gallery/tests/__init__.py index e7f4210d832..5c783c121e2 100644 --- a/apps/gallery/tests/__init__.py +++ b/kitsune/gallery/tests/__init__.py @@ -2,8 +2,8 @@ from django.core.files import File -from gallery.models import Image, Video -from users.tests import user +from kitsune.gallery.models import Image, Video +from kitsune.users.tests import user def image(file_and_save=True, **kwargs): @@ -22,7 +22,7 @@ def image(file_and_save=True, **kwargs): return img if 'file' not in kwargs: - with open('apps/upload/tests/media/test.jpg') as f: + with open('kitsune/upload/tests/media/test.jpg') as f: up_file = File(f) img.file.save(up_file.name, up_file, save=True) @@ -44,13 +44,13 @@ def video(file_and_save=True, **kwargs): return vid if 'file' not in kwargs: - with open('apps/gallery/tests/media/test.webm') as f: + with open('kitsune/gallery/tests/media/test.webm') as f: up_file = File(f) vid.webm.save(up_file.name, up_file, save=False) - with open('apps/gallery/tests/media/test.ogv') as f: + with open('kitsune/gallery/tests/media/test.ogv') as f: up_file = File(f) vid.ogv.save(up_file.name, up_file, save=False) - with open('apps/gallery/tests/media/test.flv') as f: + with open('kitsune/gallery/tests/media/test.flv') as f: up_file = File(f) vid.flv.save(up_file.name, up_file, save=False) vid.save() diff --git a/apps/gallery/tests/media/test.flv b/kitsune/gallery/tests/media/test.flv similarity index 100% rename from apps/gallery/tests/media/test.flv rename to kitsune/gallery/tests/media/test.flv diff --git a/apps/gallery/tests/media/test.ogv b/kitsune/gallery/tests/media/test.ogv similarity index 100% rename from apps/gallery/tests/media/test.ogv rename to kitsune/gallery/tests/media/test.ogv diff --git a/apps/gallery/tests/media/test.rtf b/kitsune/gallery/tests/media/test.rtf similarity index 100% rename from apps/gallery/tests/media/test.rtf rename to kitsune/gallery/tests/media/test.rtf diff --git a/apps/gallery/tests/media/test.webm b/kitsune/gallery/tests/media/test.webm similarity index 100% rename from apps/gallery/tests/media/test.webm rename to kitsune/gallery/tests/media/test.webm diff --git a/apps/gallery/tests/test__utils.py b/kitsune/gallery/tests/test__utils.py similarity index 83% rename from apps/gallery/tests/test__utils.py rename to kitsune/gallery/tests/test__utils.py index 7d60b786161..3d12d0c99ad 100644 --- a/apps/gallery/tests/test__utils.py +++ b/kitsune/gallery/tests/test__utils.py @@ -3,13 +3,14 @@ from django.core.exceptions import PermissionDenied from django.core.files import File -from gallery.models import Image, Video -from gallery.tests import image, video -from gallery.utils import create_image, create_video, check_media_permissions -from sumo.tests import TestCase -from sumo.urlresolvers import reverse -from upload.tests import check_file_info -from users.tests import user, add_permission +from kitsune.gallery.models import Image, Video +from kitsune.gallery.tests import image, video +from kitsune.gallery.utils import ( + create_image, create_video, check_media_permissions) +from kitsune.sumo.tests import TestCase +from kitsune.sumo.urlresolvers import reverse +from kitsune.upload.tests import check_file_info +from kitsune.users.tests import user, add_permission class CheckPermissionsTestCase(TestCase): @@ -58,7 +59,7 @@ def test_create_image(self): Verifies all appropriate fields are correctly set. """ - with open('apps/upload/tests/media/test.jpg') as f: + with open('kitsune/upload/tests/media/test.jpg') as f: up_file = File(f) file_info = create_image({'image': up_file}, self.user) @@ -87,7 +88,7 @@ def test_create_video(self): Verifies all appropriate fields are correctly set. """ - with open('apps/gallery/tests/media/test.flv') as f: + with open('kitsune/gallery/tests/media/test.flv') as f: up_file = File(f) file_info = create_video({'flv': up_file}, self.user) @@ -95,7 +96,7 @@ def test_create_video(self): delete_url = reverse('gallery.delete_media', args=['video', vid.id]) check_file_info( - file_info, name='apps/gallery/tests/media/test.flv', + file_info, name='kitsune/gallery/tests/media/test.flv', width=32, height=32, delete_url=delete_url, url=vid.get_absolute_url(), thumbnail_url=settings.GALLERY_VIDEO_THUMBNAIL_PROGRESS_URL) diff --git a/apps/gallery/tests/test_models.py b/kitsune/gallery/tests/test_models.py similarity index 88% rename from apps/gallery/tests/test_models.py rename to kitsune/gallery/tests/test_models.py index f4d076e4393..a99a06f0ae7 100644 --- a/apps/gallery/tests/test_models.py +++ b/kitsune/gallery/tests/test_models.py @@ -1,10 +1,10 @@ from nose.tools import eq_ from nose import SkipTest -from sumo.tests import TestCase -from gallery.models import Image, Video -from gallery.tests import image, video -from upload.tasks import generate_thumbnail +from kitsune.gallery.models import Image, Video +from kitsune.gallery.tests import image, video +from kitsune.sumo.tests import TestCase +from kitsune.upload.tasks import generate_thumbnail class ImageTestCase(TestCase): diff --git a/apps/gallery/tests/test_templates.py b/kitsune/gallery/tests/test_templates.py similarity index 96% rename from apps/gallery/tests/test_templates.py rename to kitsune/gallery/tests/test_templates.py index a87219b69fd..c70ece4a07b 100644 --- a/apps/gallery/tests/test_templates.py +++ b/kitsune/gallery/tests/test_templates.py @@ -4,11 +4,11 @@ from nose.tools import eq_ from pyquery import PyQuery as pq -from sumo.helpers import urlparams -from sumo.tests import TestCase, get, LocalizingClient, post -from sumo.urlresolvers import reverse -from gallery.models import Image, Video -from gallery.tests import image, video +from kitsune.sumo.helpers import urlparams +from kitsune.sumo.tests import TestCase, get, LocalizingClient, post +from kitsune.sumo.urlresolvers import reverse +from kitsune.gallery.models import Image, Video +from kitsune.gallery.tests import image, video class GalleryPageCase(TestCase): diff --git a/apps/gallery/tests/test_views.py b/kitsune/gallery/tests/test_views.py similarity index 94% rename from apps/gallery/tests/test_views.py rename to kitsune/gallery/tests/test_views.py index 4a1727652ee..523a2dda157 100644 --- a/apps/gallery/tests/test_views.py +++ b/kitsune/gallery/tests/test_views.py @@ -7,21 +7,21 @@ from nose.tools import eq_ from pyquery import PyQuery as pq -from gallery import forms, views -from gallery.models import Image, Video -from gallery.tests import image, video -from gallery.views import _get_media_info -from sumo.tests import post, LocalizingClient, TestCase -from sumo.urlresolvers import reverse -from users.tests import user, add_permission - - -TEST_IMG = 'apps/upload/tests/media/test.jpg' -TEST_VID = {'webm': 'apps/gallery/tests/media/test.webm', - 'ogv': 'apps/gallery/tests/media/test.ogv', +from kitsune.gallery import forms, views +from kitsune.gallery.models import Image, Video +from kitsune.gallery.tests import image, video +from kitsune.gallery.views import _get_media_info +from kitsune.sumo.tests import post, LocalizingClient, TestCase +from kitsune.sumo.urlresolvers import reverse +from kitsune.users.tests import user, add_permission + + +TEST_IMG = 'kitsune/upload/tests/media/test.jpg' +TEST_VID = {'webm': 'kitsune/gallery/tests/media/test.webm', + 'ogv': 'kitsune/gallery/tests/media/test.ogv', 'thumbnail': TEST_IMG, - 'flv': 'apps/gallery/tests/media/test.flv'} -INVALID_VID = 'apps/gallery/tests/media/test.rtf' + 'flv': 'kitsune/gallery/tests/media/test.flv'} +INVALID_VID = 'kitsune/gallery/tests/media/test.rtf' VIDEO_PATH = settings.MEDIA_URL + settings.GALLERY_VIDEO_PATH @@ -163,7 +163,7 @@ def test_upload_image(self): def test_upload_unicode_image(self): """Uploading an unicode image works.""" - with open(u'apps/upload/tests/media/123ascii\u6709\u52b9.jpg') as f: + with open(u'kitsune/upload/tests/media/123ascii\u6709\u52b9.jpg') as f: r = post(self.client, 'gallery.upload_async', {'file': f}, args=['image']) @@ -174,7 +174,7 @@ def test_upload_unicode_image(self): def test_invalid_image(self): """Make sure invalid files are not accepted as images.""" - with open('apps/gallery/__init__.py', 'rb') as f: + with open('kitsune/gallery/__init__.py', 'rb') as f: r = post(self.client, 'gallery.upload_async', {'file': f}, args=['image']) @@ -187,7 +187,7 @@ def test_invalid_image(self): def test_invalid_image_extension(self): """Make sure invalid extensions are not accepted as images.""" - with open('apps/upload/tests/media/test_invalid.ext', 'rb') as f: + with open('kitsune/upload/tests/media/test_invalid.ext', 'rb') as f: r = post(self.client, 'gallery.upload_async', {'file': f}, args=['image']) @@ -200,7 +200,7 @@ def test_invalid_image_extension(self): def test_invalid_thumbnail_extension(self): """Make sure invalid extensions are not accepted as thumbnails.""" - with open('apps/upload/tests/media/test_invalid.ext', 'rb') as f: + with open('kitsune/upload/tests/media/test_invalid.ext', 'rb') as f: r = post(self.client, 'gallery.upload_async', {'thumbnail': f}, args=['video']) @@ -213,7 +213,7 @@ def test_invalid_thumbnail_extension(self): def test_upload_image_long_filename(self): """Uploading an image with a filename that's too long fails.""" - with open('apps/upload/tests/media/a_really_long_filename_worth_' + with open('kitsune/upload/tests/media/a_really_long_filename_worth_' 'more_than_250_characters__a_really_long_filename_worth_' 'more_than_250_characters__a_really_long_filename_worth_' 'more_than_250_characters__a_really_long_filename_worth_' @@ -395,7 +395,7 @@ def test_video_required(self): def test_upload_video_long_filename(self): """Uploading a video with a filename that's too long fails.""" for k in ('flv', 'ogv', 'webm'): - with open('apps/upload/tests/media/a_really_long_filename_worth_' + with open('kitsune/upload/tests/media/a_really_long_filename_worth_' 'more_than_250_characters__a_really_long_filename_worth_' 'more_than_250_characters__a_really_long_filename_worth_' 'more_than_250_characters__a_really_long_filename_worth_' diff --git a/apps/gallery/urls.py b/kitsune/gallery/urls.py similarity index 83% rename from apps/gallery/urls.py rename to kitsune/gallery/urls.py index 7df5b0e7c53..7e701714225 100644 --- a/apps/gallery/urls.py +++ b/kitsune/gallery/urls.py @@ -1,9 +1,11 @@ from django.conf.urls import patterns, url -from sumo.views import redirect_to +from kitsune.sumo.views import redirect_to -urlpatterns = patterns('gallery.views', - url(r'^/$', redirect_to, {'url': 'gallery.gallery', 'media_type': 'image'}, + +urlpatterns = patterns('kitsune.gallery.views', + url(r'^/$', redirect_to, + {'url': 'gallery.gallery', 'media_type': 'image'}, name='gallery.home'), url(r'^/async$', 'gallery_async', name='gallery.async'), url(r'^/(?P\w+)s$', 'gallery', name='gallery.gallery'), diff --git a/apps/gallery/utils.py b/kitsune/gallery/utils.py similarity index 93% rename from apps/gallery/utils.py rename to kitsune/gallery/utils.py index 12a71476557..6b3c0ac4602 100644 --- a/apps/gallery/utils.py +++ b/kitsune/gallery/utils.py @@ -4,11 +4,11 @@ from django.core.exceptions import PermissionDenied from django.core.files import File -from gallery.forms import ImageForm, VideoForm -from gallery.models import Image, Video -from sumo.urlresolvers import reverse -from upload.utils import _image_to_png, upload_media, check_file_size -from upload.tasks import _scale_dimensions +from kitsune.gallery.forms import ImageForm, VideoForm +from kitsune.gallery.models import Image, Video +from kitsune.sumo.urlresolvers import reverse +from kitsune.upload.utils import _image_to_png, upload_media, check_file_size +from kitsune.upload.tasks import _scale_dimensions def create_image(files, user): diff --git a/apps/gallery/views.py b/kitsune/gallery/views.py similarity index 95% rename from apps/gallery/views.py rename to kitsune/gallery/views.py index a66a6cd109c..0474f0c3782 100644 --- a/apps/gallery/views.py +++ b/kitsune/gallery/views.py @@ -12,16 +12,17 @@ from tower import ugettext_lazy as _lazy -from access.decorators import login_required -from gallery import ITEMS_PER_PAGE -from gallery.forms import ImageForm, VideoForm, UploadTypeForm -from gallery.models import Image, Video -from gallery.utils import upload_image, upload_video, check_media_permissions -from sumo.urlresolvers import reverse -from sumo.utils import paginate -from upload.tasks import compress_image, generate_thumbnail -from upload.utils import FileTooLargeError -from wiki.tasks import schedule_rebuild_kb +from kitsune.access.decorators import login_required +from kitsune.gallery import ITEMS_PER_PAGE +from kitsune.gallery.forms import ImageForm, VideoForm, UploadTypeForm +from kitsune.gallery.models import Image, Video +from kitsune.gallery.utils import ( + upload_image, upload_video, check_media_permissions) +from kitsune.sumo.urlresolvers import reverse +from kitsune.sumo.utils import paginate +from kitsune.upload.tasks import compress_image, generate_thumbnail +from kitsune.upload.utils import FileTooLargeError +from kitsune.wiki.tasks import schedule_rebuild_kb MSG_FAIL_UPLOAD = {'image': _lazy(u'Could not upload your image.'), 'video': _lazy(u'Could not upload your video.')} diff --git a/apps/flagit/__init__.py b/kitsune/groups/__init__.py similarity index 100% rename from apps/flagit/__init__.py rename to kitsune/groups/__init__.py diff --git a/apps/groups/admin.py b/kitsune/groups/admin.py similarity index 77% rename from apps/groups/admin.py rename to kitsune/groups/admin.py index 0bfcb619d1f..39911532f82 100644 --- a/apps/groups/admin.py +++ b/kitsune/groups/admin.py @@ -1,6 +1,6 @@ from django.contrib import admin -from groups.models import GroupProfile +from kitsune.groups.models import GroupProfile class GroupProfileAdmin(admin.ModelAdmin): diff --git a/apps/groups/forms.py b/kitsune/groups/forms.py similarity index 84% rename from apps/groups/forms.py rename to kitsune/groups/forms.py index c3d8fcdb040..771812dd36b 100644 --- a/apps/groups/forms.py +++ b/kitsune/groups/forms.py @@ -2,9 +2,9 @@ from tower import ugettext_lazy as _lazy -from groups.models import GroupProfile -from sumo.form_fields import MultiUsernameField -from users.forms import AvatarForm +from kitsune.groups.models import GroupProfile +from kitsune.sumo.form_fields import MultiUsernameField +from kitsune.users.forms import AvatarForm class GroupProfileForm(forms.ModelForm): diff --git a/apps/groups/helpers.py b/kitsune/groups/helpers.py similarity index 87% rename from apps/groups/helpers.py rename to kitsune/groups/helpers.py index 3946e11fe2e..7cd951b2446 100644 --- a/apps/groups/helpers.py +++ b/kitsune/groups/helpers.py @@ -3,8 +3,8 @@ from jingo import register from jinja2 import Markup, escape -from groups.models import GroupProfile -from sumo.urlresolvers import reverse +from kitsune.groups.models import GroupProfile +from kitsune.sumo.urlresolvers import reverse @register.function diff --git a/apps/groups/models.py b/kitsune/groups/models.py similarity index 91% rename from apps/groups/models.py rename to kitsune/groups/models.py index 672d6efd39b..e9193427762 100644 --- a/apps/groups/models.py +++ b/kitsune/groups/models.py @@ -5,9 +5,9 @@ from tower import ugettext_lazy as _lazy -from sumo.models import ModelBase -from sumo.urlresolvers import reverse -from wiki.parser import wiki_to_html +from kitsune.sumo.models import ModelBase +from kitsune.sumo.urlresolvers import reverse +from kitsune.wiki.parser import wiki_to_html class GroupProfile(ModelBase): diff --git a/apps/groups/templates/groups/base.html b/kitsune/groups/templates/groups/base.html similarity index 100% rename from apps/groups/templates/groups/base.html rename to kitsune/groups/templates/groups/base.html diff --git a/apps/groups/templates/groups/confirm_avatar_delete.html b/kitsune/groups/templates/groups/confirm_avatar_delete.html similarity index 100% rename from apps/groups/templates/groups/confirm_avatar_delete.html rename to kitsune/groups/templates/groups/confirm_avatar_delete.html diff --git a/apps/groups/templates/groups/confirm_remove_leader.html b/kitsune/groups/templates/groups/confirm_remove_leader.html similarity index 100% rename from apps/groups/templates/groups/confirm_remove_leader.html rename to kitsune/groups/templates/groups/confirm_remove_leader.html diff --git a/apps/groups/templates/groups/confirm_remove_member.html b/kitsune/groups/templates/groups/confirm_remove_member.html similarity index 100% rename from apps/groups/templates/groups/confirm_remove_member.html rename to kitsune/groups/templates/groups/confirm_remove_member.html diff --git a/apps/groups/templates/groups/edit.html b/kitsune/groups/templates/groups/edit.html similarity index 100% rename from apps/groups/templates/groups/edit.html rename to kitsune/groups/templates/groups/edit.html diff --git a/apps/groups/templates/groups/edit_avatar.html b/kitsune/groups/templates/groups/edit_avatar.html similarity index 100% rename from apps/groups/templates/groups/edit_avatar.html rename to kitsune/groups/templates/groups/edit_avatar.html diff --git a/apps/groups/templates/groups/list.html b/kitsune/groups/templates/groups/list.html similarity index 100% rename from apps/groups/templates/groups/list.html rename to kitsune/groups/templates/groups/list.html diff --git a/apps/groups/templates/groups/profile.html b/kitsune/groups/templates/groups/profile.html similarity index 100% rename from apps/groups/templates/groups/profile.html rename to kitsune/groups/templates/groups/profile.html diff --git a/kitsune/groups/tests/__init__.py b/kitsune/groups/tests/__init__.py new file mode 100644 index 00000000000..e4b8b86406f --- /dev/null +++ b/kitsune/groups/tests/__init__.py @@ -0,0 +1,7 @@ +from kitsune.groups.models import GroupProfile +from kitsune.sumo.tests import with_save + + +@with_save +def group_profile(**kwargs): + return GroupProfile(**kwargs) diff --git a/apps/groups/tests/test_helpers.py b/kitsune/groups/tests/test_helpers.py similarity index 85% rename from apps/groups/tests/test_helpers.py rename to kitsune/groups/tests/test_helpers.py index 4a716a18c17..6d452e9df65 100644 --- a/apps/groups/tests/test_helpers.py +++ b/kitsune/groups/tests/test_helpers.py @@ -4,11 +4,11 @@ from nose.tools import eq_ from pyquery import PyQuery as pq -from groups.helpers import group_avatar, group_link -from groups.models import GroupProfile -from sumo.tests import TestCase -from sumo.urlresolvers import reverse -from users.tests import group +from kitsune.groups.helpers import group_avatar, group_link +from kitsune.groups.models import GroupProfile +from kitsune.sumo.tests import TestCase +from kitsune.sumo.urlresolvers import reverse +from kitsune.users.tests import group class GroupHelperTests(TestCase): diff --git a/apps/groups/tests/test_views.py b/kitsune/groups/tests/test_views.py similarity index 94% rename from apps/groups/tests/test_views.py rename to kitsune/groups/tests/test_views.py index d5435a10da9..c74122f8982 100644 --- a/apps/groups/tests/test_views.py +++ b/kitsune/groups/tests/test_views.py @@ -4,12 +4,12 @@ from nose.tools import eq_ -from groups.models import GroupProfile -from groups.tests import group_profile -from sumo.helpers import urlparams -from sumo.tests import TestCase -from sumo.urlresolvers import reverse -from users.tests import user, group, add_permission +from kitsune.groups.models import GroupProfile +from kitsune.groups.tests import group_profile +from kitsune.sumo.helpers import urlparams +from kitsune.sumo.tests import TestCase +from kitsune.sumo.urlresolvers import reverse +from kitsune.users.tests import user, group, add_permission class EditGroupProfileTests(TestCase): @@ -67,7 +67,7 @@ def tearDown(self): def test_upload_avatar(self): """Upload a group avatar.""" - with open('apps/upload/tests/media/test.jpg') as f: + with open('kitsune/upload/tests/media/test.jpg') as f: self.group_profile.avatar.save('test_old.jpg', File(f), save=True) assert self.group_profile.avatar.name.endswith('92b516.jpg') old_path = self.group_profile.avatar.path @@ -75,7 +75,7 @@ def test_upload_avatar(self): url = reverse('groups.edit_avatar', locale='en-US', args=[self.group_profile.slug]) - with open('apps/upload/tests/media/test.jpg') as f: + with open('kitsune/upload/tests/media/test.jpg') as f: r = self.client.post(url, {'avatar': f}) eq_(302, r.status_code) diff --git a/apps/groups/urls.py b/kitsune/groups/urls.py similarity index 90% rename from apps/groups/urls.py rename to kitsune/groups/urls.py index f113e9bba94..2f522888cd5 100644 --- a/apps/groups/urls.py +++ b/kitsune/groups/urls.py @@ -1,7 +1,7 @@ from django.conf.urls import patterns, url, include -group_patterns = patterns('groups.views', +group_patterns = patterns('kitsune.groups.views', url(r'^$', 'profile', name='groups.profile'), url(r'^/edit$', 'edit', name='groups.edit'), url(r'^/avatar$', 'edit_avatar', name='groups.edit_avatar'), @@ -15,7 +15,7 @@ name='groups.remove_leader'), ) -urlpatterns = patterns('groups.views', +urlpatterns = patterns('kitsune.groups.views', url(r'^$', 'list', name='groups.list'), url(r'^join-contributors$', 'join_contributors', name='groups.join_contributors'), diff --git a/apps/groups/views.py b/kitsune/groups/views.py similarity index 96% rename from apps/groups/views.py rename to kitsune/groups/views.py index ba972803027..3a02ae346d1 100755 --- a/apps/groups/views.py +++ b/kitsune/groups/views.py @@ -11,12 +11,13 @@ from tower import ugettext as _ -from access.decorators import login_required -from groups.forms import GroupProfileForm, GroupAvatarForm, AddUserForm -from groups.models import GroupProfile -from sumo.urlresolvers import reverse -from sumo.utils import get_next_url -from upload.tasks import _create_image_thumbnail +from kitsune.access.decorators import login_required +from kitsune.groups.forms import ( + GroupProfileForm, GroupAvatarForm, AddUserForm) +from kitsune.groups.models import GroupProfile +from kitsune.sumo.urlresolvers import reverse +from kitsune.sumo.utils import get_next_url +from kitsune.upload.tasks import _create_image_thumbnail def list(request): diff --git a/apps/groups/__init__.py b/kitsune/inproduct/__init__.py similarity index 100% rename from apps/groups/__init__.py rename to kitsune/inproduct/__init__.py diff --git a/apps/inproduct/admin.py b/kitsune/inproduct/admin.py similarity index 88% rename from apps/inproduct/admin.py rename to kitsune/inproduct/admin.py index 2b67793e8c7..2b5496b074a 100644 --- a/apps/inproduct/admin.py +++ b/kitsune/inproduct/admin.py @@ -1,6 +1,6 @@ from django.contrib import admin -from inproduct.models import Redirect +from kitsune.inproduct.models import Redirect class RedirectAdmin(admin.ModelAdmin): diff --git a/apps/inproduct/middleware.py b/kitsune/inproduct/middleware.py similarity index 100% rename from apps/inproduct/middleware.py rename to kitsune/inproduct/middleware.py diff --git a/apps/inproduct/models.py b/kitsune/inproduct/models.py similarity index 95% rename from apps/inproduct/models.py rename to kitsune/inproduct/models.py index b11d85d6fe1..5cc932ad61c 100644 --- a/apps/inproduct/models.py +++ b/kitsune/inproduct/models.py @@ -1,6 +1,6 @@ from django.db import models -from sumo.models import ModelBase +from kitsune.sumo.models import ModelBase class Redirect(ModelBase): diff --git a/apps/inproduct/tests/__init__.py b/kitsune/inproduct/tests/__init__.py similarity index 66% rename from apps/inproduct/tests/__init__.py rename to kitsune/inproduct/tests/__init__.py index bb99e313b55..fc7bd372b69 100644 --- a/apps/inproduct/tests/__init__.py +++ b/kitsune/inproduct/tests/__init__.py @@ -1,5 +1,5 @@ -from inproduct.models import Redirect -from sumo.tests import with_save +from kitsune.inproduct.models import Redirect +from kitsune.sumo.tests import with_save @with_save diff --git a/apps/inproduct/tests/test_views.py b/kitsune/inproduct/tests/test_views.py similarity index 97% rename from apps/inproduct/tests/test_views.py rename to kitsune/inproduct/tests/test_views.py index 8781fcc077d..fa991ae892e 100644 --- a/apps/inproduct/tests/test_views.py +++ b/kitsune/inproduct/tests/test_views.py @@ -6,8 +6,8 @@ import waffle from nose.tools import eq_ -from inproduct.tests import redirect -from sumo.tests import TestCase +from kitsune.inproduct.tests import redirect +from kitsune.sumo.tests import TestCase class RedirectTestCase(TestCase): diff --git a/apps/inproduct/urls.py b/kitsune/inproduct/urls.py similarity index 87% rename from apps/inproduct/urls.py rename to kitsune/inproduct/urls.py index 222d478db23..f496261202e 100644 --- a/apps/inproduct/urls.py +++ b/kitsune/inproduct/urls.py @@ -1,6 +1,7 @@ from django.conf.urls import patterns, url -from inproduct import views +from kitsune.inproduct import views + urlpatterns = patterns('', url(r'/(?P[^/]+)/(?P[^/]+)/(?P[^/]+)/' diff --git a/apps/inproduct/views.py b/kitsune/inproduct/views.py similarity index 97% rename from apps/inproduct/views.py rename to kitsune/inproduct/views.py index 59650f149cc..86a9cd82918 100644 --- a/apps/inproduct/views.py +++ b/kitsune/inproduct/views.py @@ -5,8 +5,8 @@ import waffle -from inproduct.models import Redirect -from sumo.helpers import urlparams +from kitsune.inproduct.models import Redirect +from kitsune.sumo.helpers import urlparams @cache_page(24 * 60 * 60) # 24 hours. diff --git a/apps/inproduct/__init__.py b/kitsune/kadmin/__init__.py similarity index 100% rename from apps/inproduct/__init__.py rename to kitsune/kadmin/__init__.py diff --git a/apps/kadmin/admin.py b/kitsune/kadmin/admin.py similarity index 98% rename from apps/kadmin/admin.py rename to kitsune/kadmin/admin.py index 693e6bc7be6..cf031631241 100644 --- a/apps/kadmin/admin.py +++ b/kitsune/kadmin/admin.py @@ -12,7 +12,7 @@ import jinja2 from redis import ConnectionError -from sumo.redis_utils import redis_client +from kitsune.sumo.redis_utils import redis_client def settings(request): diff --git a/apps/kadmin/templates/kadmin/base.html b/kitsune/kadmin/templates/kadmin/base.html similarity index 100% rename from apps/kadmin/templates/kadmin/base.html rename to kitsune/kadmin/templates/kadmin/base.html diff --git a/apps/kadmin/templates/kadmin/redis.html b/kitsune/kadmin/templates/kadmin/redis.html similarity index 100% rename from apps/kadmin/templates/kadmin/redis.html rename to kitsune/kadmin/templates/kadmin/redis.html diff --git a/apps/kadmin/templates/kadmin/schema.html b/kitsune/kadmin/templates/kadmin/schema.html similarity index 100% rename from apps/kadmin/templates/kadmin/schema.html rename to kitsune/kadmin/templates/kadmin/schema.html diff --git a/apps/kadmin/templates/kadmin/settings.html b/kitsune/kadmin/templates/kadmin/settings.html similarity index 100% rename from apps/kadmin/templates/kadmin/settings.html rename to kitsune/kadmin/templates/kadmin/settings.html diff --git a/apps/kadmin/__init__.py b/kitsune/karma/__init__.py similarity index 100% rename from apps/kadmin/__init__.py rename to kitsune/karma/__init__.py diff --git a/apps/karma/actions.py b/kitsune/karma/actions.py similarity index 96% rename from apps/karma/actions.py rename to kitsune/karma/actions.py index 8eca5d4145d..ffd013a5906 100644 --- a/apps/karma/actions.py +++ b/kitsune/karma/actions.py @@ -6,8 +6,8 @@ from statsd import statsd import waffle -from karma.manager import KarmaManager -from karma.models import Points +from kitsune.karma.manager import KarmaManager +from kitsune.karma.models import Points class ClassProperty(property): diff --git a/apps/karma/admin.py b/kitsune/karma/admin.py similarity index 90% rename from apps/karma/admin.py rename to kitsune/karma/admin.py index e213e207e7b..0d9f61220be 100644 --- a/apps/karma/admin.py +++ b/kitsune/karma/admin.py @@ -4,13 +4,13 @@ from django.http import HttpResponseRedirect from django.shortcuts import render -from karma.manager import KarmaManager -from karma.models import Title, Points -from karma.tasks import (init_karma, update_top_contributors, - recalculate_karma_points) -from questions.karma_actions import (AnswerAction, AnswerMarkedHelpfulAction, - AnswerMarkedNotHelpfulAction, - FirstAnswerAction, SolutionAction) +from kitsune.karma.manager import KarmaManager +from kitsune.karma.models import Title, Points +from kitsune.karma.tasks import ( + init_karma, update_top_contributors, recalculate_karma_points) +from kitsune.questions.karma_actions import ( + AnswerAction, AnswerMarkedHelpfulAction, AnswerMarkedNotHelpfulAction, + FirstAnswerAction, SolutionAction) class TitleAdmin(admin.ModelAdmin): diff --git a/apps/karma/api.py b/kitsune/karma/api.py similarity index 91% rename from apps/karma/api.py rename to kitsune/karma/api.py index 712e462385e..643fceadd8b 100644 --- a/apps/karma/api.py +++ b/kitsune/karma/api.py @@ -1,12 +1,11 @@ from datetime import datetime, date, timedelta -from access.decorators import login_required, permission_required -from karma.forms import ( - UserAPIForm, OverviewAPIForm, DetailAPIForm -) -from karma.manager import KarmaManager -from questions.models import Question, Answer -from sumo.decorators import json_view +from kitsune.access.decorators import login_required, permission_required +from kitsune.karma.forms import ( + UserAPIForm, OverviewAPIForm, DetailAPIForm) +from kitsune.karma.manager import KarmaManager +from kitsune.questions.models import Question, Answer +from kitsune.sumo.decorators import json_view @login_required diff --git a/apps/karma/cron.py b/kitsune/karma/cron.py similarity index 82% rename from apps/karma/cron.py rename to kitsune/karma/cron.py index 14710d1a049..239660ea23f 100644 --- a/apps/karma/cron.py +++ b/kitsune/karma/cron.py @@ -1,8 +1,8 @@ import cronjobs import waffle -from karma.manager import KarmaManager -from karma.models import Title +from kitsune.karma.manager import KarmaManager +from kitsune.karma.models import Title @cronjobs.register diff --git a/apps/karma/forms.py b/kitsune/karma/forms.py similarity index 95% rename from apps/karma/forms.py rename to kitsune/karma/forms.py index b522cc94391..881cd8fc196 100644 --- a/apps/karma/forms.py +++ b/kitsune/karma/forms.py @@ -1,6 +1,6 @@ from django import forms -from karma.manager import KarmaManager +from kitsune.karma.manager import KarmaManager class UserAPIForm(forms.Form): diff --git a/apps/karma/helpers.py b/kitsune/karma/helpers.py similarity index 88% rename from apps/karma/helpers.py rename to kitsune/karma/helpers.py index 2697a55970e..0d958fcca98 100644 --- a/apps/karma/helpers.py +++ b/kitsune/karma/helpers.py @@ -2,7 +2,7 @@ from jingo import register -from karma.models import Title +from kitsune.karma.models import Title @register.function diff --git a/apps/karma/manager.py b/kitsune/karma/manager.py similarity index 99% rename from apps/karma/manager.py rename to kitsune/karma/manager.py index 5c271fc9bb0..b51dc47ef99 100644 --- a/apps/karma/manager.py +++ b/kitsune/karma/manager.py @@ -7,7 +7,7 @@ from redis.exceptions import ConnectionError from statsd import statsd -from sumo.redis_utils import redis_client, RedisError +from kitsune.sumo.redis_utils import redis_client, RedisError KEY_PREFIX = 'karma' # Prefix for the Redis keys used. diff --git a/apps/karma/models.py b/kitsune/karma/models.py similarity index 98% rename from apps/karma/models.py rename to kitsune/karma/models.py index 8833a2e373b..f35fac1f1ae 100644 --- a/apps/karma/models.py +++ b/kitsune/karma/models.py @@ -6,7 +6,7 @@ from caching.base import CachingManager -from sumo.models import ModelBase +from kitsune.sumo.models import ModelBase class TitleManager(CachingManager): diff --git a/apps/karma/tasks.py b/kitsune/karma/tasks.py similarity index 85% rename from apps/karma/tasks.py rename to kitsune/karma/tasks.py index dbcc3044328..d70ed06683e 100644 --- a/apps/karma/tasks.py +++ b/kitsune/karma/tasks.py @@ -1,14 +1,15 @@ from celery.task import task import waffle -from karma.cron import update_top_contributors as _update_top_contributors -from karma.manager import KarmaManager -from questions.karma_actions import (AnswerAction, AnswerMarkedHelpfulAction, - AnswerMarkedNotHelpfulAction, - FirstAnswerAction, SolutionAction) -from questions.models import Question, AnswerVote -from sumo.redis_utils import redis_client -from sumo.utils import chunked +from kitsune.karma.cron import ( + update_top_contributors as _update_top_contributors) +from kitsune.karma.manager import KarmaManager +from kitsune.questions.karma_actions import ( + AnswerAction, AnswerMarkedHelpfulAction, AnswerMarkedNotHelpfulAction, + FirstAnswerAction, SolutionAction) +from kitsune.questions.models import Question, AnswerVote +from kitsune.sumo.redis_utils import redis_client +from kitsune.sumo.utils import chunked @task diff --git a/apps/karma/templates/admin/karma.html b/kitsune/karma/templates/admin/karma.html similarity index 100% rename from apps/karma/templates/admin/karma.html rename to kitsune/karma/templates/admin/karma.html diff --git a/apps/karma/templates/karma/dashboards/base.html b/kitsune/karma/templates/karma/dashboards/base.html similarity index 100% rename from apps/karma/templates/karma/dashboards/base.html rename to kitsune/karma/templates/karma/dashboards/base.html diff --git a/apps/karma/templates/karma/dashboards/questions.html b/kitsune/karma/templates/karma/dashboards/questions.html similarity index 100% rename from apps/karma/templates/karma/dashboards/questions.html rename to kitsune/karma/templates/karma/dashboards/questions.html diff --git a/apps/karma/templates/karma/includes/karma_macros.html b/kitsune/karma/templates/karma/includes/karma_macros.html similarity index 100% rename from apps/karma/templates/karma/includes/karma_macros.html rename to kitsune/karma/templates/karma/includes/karma_macros.html diff --git a/apps/karma/tests/__init__.py b/kitsune/karma/tests/__init__.py similarity index 80% rename from apps/karma/tests/__init__.py rename to kitsune/karma/tests/__init__.py index 6dbc7469116..729e4d3bd33 100644 --- a/apps/karma/tests/__init__.py +++ b/kitsune/karma/tests/__init__.py @@ -1,5 +1,5 @@ -from karma.actions import KarmaAction -from karma.manager import KarmaManager +from kitsune.karma.actions import KarmaAction +from kitsune.karma.manager import KarmaManager class TestAction1(KarmaAction): diff --git a/apps/karma/tests/test_actions.py b/kitsune/karma/tests/test_actions.py similarity index 94% rename from apps/karma/tests/test_actions.py rename to kitsune/karma/tests/test_actions.py index 7b73652c0b8..3d8a3c7bd0c 100644 --- a/apps/karma/tests/test_actions.py +++ b/kitsune/karma/tests/test_actions.py @@ -5,11 +5,11 @@ from nose.tools import eq_ import waffle -from karma.manager import KarmaManager -from karma.tests import TestAction1, TestAction2 -from sumo.redis_utils import redis_client, RedisError -from sumo.tests import TestCase -from users.tests import user +from kitsune.karma.manager import KarmaManager +from kitsune.karma.tests import TestAction1, TestAction2 +from kitsune.sumo.redis_utils import redis_client, RedisError +from kitsune.sumo.tests import TestCase +from kitsune.users.tests import user class KarmaActionTests(TestCase): diff --git a/apps/karma/tests/test_api.py b/kitsune/karma/tests/test_api.py similarity index 90% rename from apps/karma/tests/test_api.py rename to kitsune/karma/tests/test_api.py index 148613260cc..7d66066f1b4 100644 --- a/apps/karma/tests/test_api.py +++ b/kitsune/karma/tests/test_api.py @@ -6,15 +6,15 @@ from nose.tools import eq_ import waffle -from karma import models -from karma.manager import KarmaManager -from karma.tests import TestAction1, TestAction2 -from questions.tests import answer -from sumo.helpers import urlparams -from sumo.redis_utils import redis_client, RedisError -from sumo.tests import TestCase, LocalizingClient -from sumo.urlresolvers import reverse -from users.tests import user, add_permission +from kitsune.karma import models +from kitsune.karma.manager import KarmaManager +from kitsune.karma.tests import TestAction1, TestAction2 +from kitsune.questions.tests import answer +from kitsune.sumo.helpers import urlparams +from kitsune.sumo.redis_utils import redis_client, RedisError +from kitsune.sumo.tests import TestCase, LocalizingClient +from kitsune.sumo.urlresolvers import reverse +from kitsune.users.tests import user, add_permission class KarmaAPITests(TestCase): diff --git a/apps/karma/tests/test_helpers.py b/kitsune/karma/tests/test_helpers.py similarity index 89% rename from apps/karma/tests/test_helpers.py rename to kitsune/karma/tests/test_helpers.py index 8ef493ce16c..d6277f9bb54 100644 --- a/apps/karma/tests/test_helpers.py +++ b/kitsune/karma/tests/test_helpers.py @@ -1,8 +1,8 @@ from nose.tools import eq_ -from karma.helpers import karma_titles -from karma.models import Title -from users.tests import TestCase, user, group +from kitsune.karma.helpers import karma_titles +from kitsune.karma.models import Title +from kitsune.users.tests import TestCase, user, group class KarmaTitleHelperTests(TestCase): diff --git a/apps/karma/tests/test_manager.py b/kitsune/karma/tests/test_manager.py similarity index 94% rename from apps/karma/tests/test_manager.py rename to kitsune/karma/tests/test_manager.py index b1e7765be43..d81a6d760e2 100644 --- a/apps/karma/tests/test_manager.py +++ b/kitsune/karma/tests/test_manager.py @@ -5,12 +5,12 @@ from nose.tools import eq_ import waffle -from karma.manager import KarmaManager -from karma.models import Points -from karma.tests import TestAction1, TestAction2 -from sumo.redis_utils import redis_client, RedisError -from sumo.tests import TestCase -from users.tests import user +from kitsune.karma.manager import KarmaManager +from kitsune.karma.models import Points +from kitsune.karma.tests import TestAction1, TestAction2 +from kitsune.sumo.redis_utils import redis_client, RedisError +from kitsune.sumo.tests import TestCase +from kitsune.users.tests import user class KarmaManagerTests(TestCase): diff --git a/apps/karma/tests/test_models.py b/kitsune/karma/tests/test_models.py similarity index 90% rename from apps/karma/tests/test_models.py rename to kitsune/karma/tests/test_models.py index 1d096a1e87e..71667970fa0 100644 --- a/apps/karma/tests/test_models.py +++ b/kitsune/karma/tests/test_models.py @@ -1,7 +1,7 @@ from nose.tools import eq_ -from karma.models import Title -from users.tests import TestCase, user +from kitsune.karma.models import Title +from kitsune.users.tests import TestCase, user class KarmaTitleTests(TestCase): diff --git a/apps/karma/urls.py b/kitsune/karma/urls.py similarity index 80% rename from apps/karma/urls.py rename to kitsune/karma/urls.py index b159341ec6c..ffd72f19752 100644 --- a/apps/karma/urls.py +++ b/kitsune/karma/urls.py @@ -1,14 +1,14 @@ from django.conf.urls import patterns, url, include -api_patterns = patterns('karma.api', +api_patterns = patterns('kitsune.karma.api', url(r'^/users$', 'users', name='karma.api.users'), url(r'^/overview$', 'overview', name='karma.api.overview'), url(r'^/details$', 'details', name='karma.api.details'), ) -urlpatterns = patterns('karma.views', +urlpatterns = patterns('kitsune.karma.views', url(r'^/questions$', 'questions_dashboard', name='karma.questions_dashboard'), (r'^/api', include(api_patterns)), diff --git a/apps/karma/views.py b/kitsune/karma/views.py similarity index 76% rename from apps/karma/views.py rename to kitsune/karma/views.py index 8d2d66ec499..73de0be003b 100644 --- a/apps/karma/views.py +++ b/kitsune/karma/views.py @@ -1,6 +1,6 @@ from django.shortcuts import render -from access.decorators import login_required, permission_required +from kitsune.access.decorators import login_required, permission_required @login_required diff --git a/apps/kbforums/__init__.py b/kitsune/kbforums/__init__.py similarity index 100% rename from apps/kbforums/__init__.py rename to kitsune/kbforums/__init__.py diff --git a/apps/kbforums/events.py b/kitsune/kbforums/events.py similarity index 96% rename from apps/kbforums/events.py rename to kitsune/kbforums/events.py index 26c61162a03..774b4871bc0 100644 --- a/apps/kbforums/events.py +++ b/kitsune/kbforums/events.py @@ -3,9 +3,9 @@ from tidings.events import InstanceEvent, EventUnion, Event from tower import ugettext_lazy as _lazy -from kbforums.models import Thread -from sumo.email_utils import emails_with_users_and_watches -from wiki.models import Document +from kitsune.kbforums.models import Thread +from kitsune.sumo.email_utils import emails_with_users_and_watches +from kitsune.wiki.models import Document def new_post_mails(reply, users_and_watches): diff --git a/apps/kbforums/feeds.py b/kitsune/kbforums/feeds.py similarity index 94% rename from apps/kbforums/feeds.py rename to kitsune/kbforums/feeds.py index 55f02a00705..c8c5a04248d 100644 --- a/apps/kbforums/feeds.py +++ b/kitsune/kbforums/feeds.py @@ -5,9 +5,9 @@ from tower import ugettext as _ -import forums as constants -from kbforums.models import Thread -from wiki.models import Document +from kitsune import forums as constants +from kitsune.kbforums.models import Thread +from kitsune.wiki.models import Document class ThreadsFeed(Feed): diff --git a/apps/kbforums/forms.py b/kitsune/kbforums/forms.py similarity index 97% rename from apps/kbforums/forms.py rename to kitsune/kbforums/forms.py index 9e29c9704d0..8a84e065305 100644 --- a/apps/kbforums/forms.py +++ b/kitsune/kbforums/forms.py @@ -2,8 +2,8 @@ from tower import ugettext_lazy as _lazy -from kbforums.models import Thread, Post -from sumo.form_fields import StrippedCharField +from kitsune.kbforums.models import Thread, Post +from kitsune.sumo.form_fields import StrippedCharField MSG_TITLE_REQUIRED = _lazy(u'Please provide a title.') diff --git a/apps/kbforums/helpers.py b/kitsune/kbforums/helpers.py similarity index 82% rename from apps/kbforums/helpers.py rename to kitsune/kbforums/helpers.py index eb438daf49a..622fc2ea7cd 100644 --- a/apps/kbforums/helpers.py +++ b/kitsune/kbforums/helpers.py @@ -1,6 +1,6 @@ from jingo import register -from kbforums.events import NewPostInLocaleEvent +from kitsune.kbforums.events import NewPostInLocaleEvent @register.function diff --git a/apps/kbforums/models.py b/kitsune/kbforums/models.py similarity index 95% rename from apps/kbforums/models.py rename to kitsune/kbforums/models.py index c2eb7207303..a5e775633ef 100644 --- a/apps/kbforums/models.py +++ b/kitsune/kbforums/models.py @@ -5,11 +5,11 @@ from tidings.models import NotificationsMixin -import kbforums -from sumo.helpers import urlparams, wiki_to_html -from sumo.models import ModelBase -from sumo.urlresolvers import reverse -from wiki.models import Document +from kitsune import kbforums +from kitsune.sumo.helpers import urlparams, wiki_to_html +from kitsune.sumo.models import ModelBase +from kitsune.sumo.urlresolvers import reverse +from kitsune.wiki.models import Document def _last_post_from(posts, exclude_post=None): diff --git a/apps/kbforums/templates/kbforums/base.html b/kitsune/kbforums/templates/kbforums/base.html similarity index 100% rename from apps/kbforums/templates/kbforums/base.html rename to kitsune/kbforums/templates/kbforums/base.html diff --git a/apps/kbforums/templates/kbforums/confirm_post_delete.html b/kitsune/kbforums/templates/kbforums/confirm_post_delete.html similarity index 100% rename from apps/kbforums/templates/kbforums/confirm_post_delete.html rename to kitsune/kbforums/templates/kbforums/confirm_post_delete.html diff --git a/apps/kbforums/templates/kbforums/confirm_thread_delete.html b/kitsune/kbforums/templates/kbforums/confirm_thread_delete.html similarity index 100% rename from apps/kbforums/templates/kbforums/confirm_thread_delete.html rename to kitsune/kbforums/templates/kbforums/confirm_thread_delete.html diff --git a/apps/kbforums/templates/kbforums/discussions.html b/kitsune/kbforums/templates/kbforums/discussions.html similarity index 100% rename from apps/kbforums/templates/kbforums/discussions.html rename to kitsune/kbforums/templates/kbforums/discussions.html diff --git a/apps/kbforums/templates/kbforums/edit_post.html b/kitsune/kbforums/templates/kbforums/edit_post.html similarity index 100% rename from apps/kbforums/templates/kbforums/edit_post.html rename to kitsune/kbforums/templates/kbforums/edit_post.html diff --git a/apps/kbforums/templates/kbforums/edit_thread.html b/kitsune/kbforums/templates/kbforums/edit_thread.html similarity index 100% rename from apps/kbforums/templates/kbforums/edit_thread.html rename to kitsune/kbforums/templates/kbforums/edit_thread.html diff --git a/apps/kbforums/templates/kbforums/email/new_post.html b/kitsune/kbforums/templates/kbforums/email/new_post.html similarity index 100% rename from apps/kbforums/templates/kbforums/email/new_post.html rename to kitsune/kbforums/templates/kbforums/email/new_post.html diff --git a/apps/kbforums/templates/kbforums/email/new_post.ltxt b/kitsune/kbforums/templates/kbforums/email/new_post.ltxt similarity index 100% rename from apps/kbforums/templates/kbforums/email/new_post.ltxt rename to kitsune/kbforums/templates/kbforums/email/new_post.ltxt diff --git a/apps/kbforums/templates/kbforums/email/new_thread.html b/kitsune/kbforums/templates/kbforums/email/new_thread.html similarity index 100% rename from apps/kbforums/templates/kbforums/email/new_thread.html rename to kitsune/kbforums/templates/kbforums/email/new_thread.html diff --git a/apps/kbforums/templates/kbforums/email/new_thread.ltxt b/kitsune/kbforums/templates/kbforums/email/new_thread.ltxt similarity index 100% rename from apps/kbforums/templates/kbforums/email/new_thread.ltxt rename to kitsune/kbforums/templates/kbforums/email/new_thread.ltxt diff --git a/apps/kbforums/templates/kbforums/includes/macros.html b/kitsune/kbforums/templates/kbforums/includes/macros.html similarity index 100% rename from apps/kbforums/templates/kbforums/includes/macros.html rename to kitsune/kbforums/templates/kbforums/includes/macros.html diff --git a/apps/kbforums/templates/kbforums/includes/post.html b/kitsune/kbforums/templates/kbforums/includes/post.html similarity index 100% rename from apps/kbforums/templates/kbforums/includes/post.html rename to kitsune/kbforums/templates/kbforums/includes/post.html diff --git a/apps/kbforums/templates/kbforums/includes/post_preview.html b/kitsune/kbforums/templates/kbforums/includes/post_preview.html similarity index 100% rename from apps/kbforums/templates/kbforums/includes/post_preview.html rename to kitsune/kbforums/templates/kbforums/includes/post_preview.html diff --git a/apps/kbforums/templates/kbforums/includes/watch_locale.html b/kitsune/kbforums/templates/kbforums/includes/watch_locale.html similarity index 100% rename from apps/kbforums/templates/kbforums/includes/watch_locale.html rename to kitsune/kbforums/templates/kbforums/includes/watch_locale.html diff --git a/apps/kbforums/templates/kbforums/new_thread.html b/kitsune/kbforums/templates/kbforums/new_thread.html similarity index 100% rename from apps/kbforums/templates/kbforums/new_thread.html rename to kitsune/kbforums/templates/kbforums/new_thread.html diff --git a/apps/kbforums/templates/kbforums/posts.html b/kitsune/kbforums/templates/kbforums/posts.html similarity index 100% rename from apps/kbforums/templates/kbforums/posts.html rename to kitsune/kbforums/templates/kbforums/posts.html diff --git a/apps/kbforums/templates/kbforums/threads.html b/kitsune/kbforums/templates/kbforums/threads.html similarity index 100% rename from apps/kbforums/templates/kbforums/threads.html rename to kitsune/kbforums/templates/kbforums/threads.html diff --git a/apps/kbforums/tests/__init__.py b/kitsune/kbforums/tests/__init__.py similarity index 95% rename from apps/kbforums/tests/__init__.py rename to kitsune/kbforums/tests/__init__.py index 1314e91ad7c..acaaef1db1b 100644 --- a/apps/kbforums/tests/__init__.py +++ b/kitsune/kbforums/tests/__init__.py @@ -2,11 +2,11 @@ from nose.tools import eq_ -from kbforums.models import Thread, Post, ThreadLockedError -from kbforums.views import sort_threads -from sumo.tests import get, LocalizingClient, TestCase, with_save -from users.tests import user -from wiki.tests import document +from kitsune.kbforums.models import Thread, Post, ThreadLockedError +from kitsune.kbforums.views import sort_threads +from kitsune.sumo.tests import get, LocalizingClient, TestCase, with_save +from kitsune.users.tests import user +from kitsune.wiki.tests import document @with_save diff --git a/apps/kbforums/tests/test_feeds.py b/kitsune/kbforums/tests/test_feeds.py similarity index 88% rename from apps/kbforums/tests/test_feeds.py rename to kitsune/kbforums/tests/test_feeds.py index c26970f11fd..7b349f94f00 100644 --- a/apps/kbforums/tests/test_feeds.py +++ b/kitsune/kbforums/tests/test_feeds.py @@ -3,9 +3,9 @@ from nose.tools import eq_ from pyquery import PyQuery as pq -from kbforums.feeds import ThreadsFeed, PostsFeed -from kbforums.tests import KBForumTestCase, get, thread -from wiki.tests import document +from kitsune.kbforums.feeds import ThreadsFeed, PostsFeed +from kitsune.kbforums.tests import KBForumTestCase, get, thread +from kitsune.wiki.tests import document class FeedSortingTestCase(KBForumTestCase): diff --git a/apps/kbforums/tests/test_models.py b/kitsune/kbforums/tests/test_models.py similarity index 94% rename from apps/kbforums/tests/test_models.py rename to kitsune/kbforums/tests/test_models.py index fd171857213..f2898b3dabb 100644 --- a/apps/kbforums/tests/test_models.py +++ b/kitsune/kbforums/tests/test_models.py @@ -2,12 +2,12 @@ from nose.tools import eq_ -from kbforums.models import Thread -from kbforums.tests import KBForumTestCase, thread, post as post_ -from sumo.urlresolvers import reverse -from sumo.helpers import urlparams -from users.tests import user -from wiki.tests import document +from kitsune.kbforums.models import Thread +from kitsune.kbforums.tests import KBForumTestCase, thread, post as post_ +from kitsune.sumo.urlresolvers import reverse +from kitsune.sumo.helpers import urlparams +from kitsune.users.tests import user +from kitsune.wiki.tests import document class KBForumModelTestCase(KBForumTestCase): diff --git a/apps/kbforums/tests/test_notifications.py b/kitsune/kbforums/tests/test_notifications.py similarity index 97% rename from apps/kbforums/tests/test_notifications.py rename to kitsune/kbforums/tests/test_notifications.py index bf4c927d170..82c55871f54 100644 --- a/apps/kbforums/tests/test_notifications.py +++ b/kitsune/kbforums/tests/test_notifications.py @@ -5,13 +5,13 @@ import mock from nose.tools import eq_ -from kbforums.events import NewPostEvent, NewThreadEvent -from kbforums.models import Thread, Post -from kbforums.tests import KBForumTestCase, thread -from sumo.tests import post, attrs_eq, starts_with -from users.models import Setting -from users.tests import user -from wiki.tests import document +from kitsune.kbforums.events import NewPostEvent, NewThreadEvent +from kitsune.kbforums.models import Thread, Post +from kitsune.kbforums.tests import KBForumTestCase, thread +from kitsune.sumo.tests import post, attrs_eq, starts_with +from kitsune.users.models import Setting +from kitsune.users.tests import user +from kitsune.wiki.tests import document # Some of these contain a locale prefix on included links, while others don't. diff --git a/apps/kbforums/tests/test_templates.py b/kitsune/kbforums/tests/test_templates.py similarity index 97% rename from apps/kbforums/tests/test_templates.py rename to kitsune/kbforums/tests/test_templates.py index 8e0a2451129..002baa5708d 100644 --- a/apps/kbforums/tests/test_templates.py +++ b/kitsune/kbforums/tests/test_templates.py @@ -3,13 +3,13 @@ from nose.tools import eq_ from pyquery import PyQuery as pq -from flagit.models import FlaggedObject -from kbforums.models import Post, Thread -from kbforums.tests import KBForumTestCase, thread, post as post_ -from sumo.urlresolvers import reverse -from sumo.tests import get, post -from users.tests import user, add_permission -from wiki.tests import document, revision +from kitsune.flagit.models import FlaggedObject +from kitsune.kbforums.models import Post, Thread +from kitsune.kbforums.tests import KBForumTestCase, thread, post as post_ +from kitsune.sumo.urlresolvers import reverse +from kitsune.sumo.tests import get, post +from kitsune.users.tests import user, add_permission +from kitsune.wiki.tests import document, revision class PostsTemplateTests(KBForumTestCase): diff --git a/apps/kbforums/tests/test_urls.py b/kitsune/kbforums/tests/test_urls.py similarity index 94% rename from apps/kbforums/tests/test_urls.py rename to kitsune/kbforums/tests/test_urls.py index 633ce0069b7..25df51eb012 100644 --- a/apps/kbforums/tests/test_urls.py +++ b/kitsune/kbforums/tests/test_urls.py @@ -1,9 +1,9 @@ from nose.tools import eq_ -from kbforums.tests import KBForumTestCase, thread -from sumo.tests import get, post -from users.tests import user, add_permission -from wiki.tests import document +from kitsune.kbforums.tests import KBForumTestCase, thread +from kitsune.sumo.tests import get, post +from kitsune.users.tests import user, add_permission +from kitsune.wiki.tests import document class KBBelongsTestCase(KBForumTestCase): diff --git a/apps/kbforums/tests/test_views.py b/kitsune/kbforums/tests/test_views.py similarity index 94% rename from apps/kbforums/tests/test_views.py rename to kitsune/kbforums/tests/test_views.py index 41809d89f4f..5559c8b3f81 100644 --- a/apps/kbforums/tests/test_views.py +++ b/kitsune/kbforums/tests/test_views.py @@ -1,12 +1,12 @@ from nose.tools import eq_ -from kbforums.models import Thread -from kbforums.tests import KBForumTestCase, thread -from kbforums.events import NewThreadEvent, NewPostEvent -from sumo.tests import get, post -from sumo.urlresolvers import reverse -from users.tests import user, add_permission -from wiki.tests import document +from kitsune.kbforums.models import Thread +from kitsune.kbforums.tests import KBForumTestCase, thread +from kitsune.kbforums.events import NewThreadEvent, NewPostEvent +from kitsune.sumo.tests import get, post +from kitsune.sumo.urlresolvers import reverse +from kitsune.users.tests import user, add_permission +from kitsune.wiki.tests import document class ThreadTests(KBForumTestCase): diff --git a/apps/kbforums/urls.py b/kitsune/kbforums/urls.py similarity index 89% rename from apps/kbforums/urls.py rename to kitsune/kbforums/urls.py index 6e12d366489..28ca4849a8d 100644 --- a/apps/kbforums/urls.py +++ b/kitsune/kbforums/urls.py @@ -1,13 +1,13 @@ from django.conf.urls import patterns, url from django.contrib.contenttypes.models import ContentType -from kbforums.feeds import ThreadsFeed, PostsFeed -from kbforums.models import Post -from flagit import views as flagit_views +from kitsune.kbforums.feeds import ThreadsFeed, PostsFeed +from kitsune.kbforums.models import Post +from kitsune.flagit import views as flagit_views # These patterns inherit from /document/discuss -urlpatterns = patterns('kbforums.views', +urlpatterns = patterns('kitsune.kbforums.views', url(r'^$', 'threads', name='wiki.discuss.threads'), url(r'^/feed', ThreadsFeed(), name='wiki.discuss.threads.feed'), url(r'^/new', 'new_thread', name='wiki.discuss.new_thread'), diff --git a/apps/kbforums/views.py b/kitsune/kbforums/views.py similarity index 96% rename from apps/kbforums/views.py rename to kitsune/kbforums/views.py index 9d360063333..bac93921eba 100644 --- a/apps/kbforums/views.py +++ b/kitsune/kbforums/views.py @@ -6,22 +6,22 @@ from django.shortcuts import get_object_or_404, render from django.views.decorators.http import require_POST +from ratelimit.helpers import is_ratelimited from statsd import statsd -from access.decorators import permission_required, login_required -import kbforums -from kbforums.events import (NewPostEvent, NewThreadEvent, +from kitsune import kbforums +from kitsune.access.decorators import permission_required, login_required +from kitsune.kbforums.events import (NewPostEvent, NewThreadEvent, NewPostInLocaleEvent, NewThreadInLocaleEvent) -from kbforums.feeds import ThreadsFeed, PostsFeed -from kbforums.forms import (ReplyForm, NewThreadForm, +from kitsune.kbforums.feeds import ThreadsFeed, PostsFeed +from kitsune.kbforums.forms import (ReplyForm, NewThreadForm, EditThreadForm, EditPostForm) -from kbforums.models import Thread, Post -from ratelimit.helpers import is_ratelimited -from sumo_locales import LOCALES -from sumo.urlresolvers import reverse -from sumo.utils import paginate, get_next_url, user_or_ip -from users.models import Setting -from wiki.models import Document +from kitsune.kbforums.models import Thread, Post +from kitsune.lib.sumo_locales import LOCALES +from kitsune.sumo.urlresolvers import reverse +from kitsune.sumo.utils import paginate, get_next_url, user_or_ip +from kitsune.users.models import Setting +from kitsune.wiki.models import Document log = logging.getLogger('k.kbforums') diff --git a/apps/karma/__init__.py b/kitsune/kpi/__init__.py similarity index 100% rename from apps/karma/__init__.py rename to kitsune/kpi/__init__.py diff --git a/apps/kpi/admin.py b/kitsune/kpi/admin.py similarity index 85% rename from apps/kpi/admin.py rename to kitsune/kpi/admin.py index 41a603ede3f..d1e6a9285e9 100644 --- a/apps/kpi/admin.py +++ b/kitsune/kpi/admin.py @@ -1,6 +1,6 @@ from django.contrib import admin -from kpi.models import Metric, MetricKind +from kitsune.kpi.models import Metric, MetricKind class MetricAdmin(admin.ModelAdmin): diff --git a/apps/kpi/api.py b/kitsune/kpi/api.py similarity index 97% rename from apps/kpi/api.py rename to kitsune/kpi/api.py index 66641189a22..8d0f6ea3024 100644 --- a/apps/kpi/api.py +++ b/kitsune/kpi/api.py @@ -11,15 +11,13 @@ from tastypie.cache import SimpleCache from tastypie.resources import Resource -from kpi.models import (Metric, MetricKind, - AOA_CONTRIBUTORS_METRIC_CODE, - KB_ENUS_CONTRIBUTORS_METRIC_CODE, - KB_L10N_CONTRIBUTORS_METRIC_CODE, - L10N_METRIC_CODE, - SUPPORT_FORUM_CONTRIBUTORS_METRIC_CODE, - VISITORS_METRIC_CODE) -from questions.models import Question, Answer, AnswerVote -from wiki.models import HelpfulVote +from kitsune.kpi.models import ( + Metric, MetricKind, AOA_CONTRIBUTORS_METRIC_CODE, + KB_ENUS_CONTRIBUTORS_METRIC_CODE, KB_L10N_CONTRIBUTORS_METRIC_CODE, + L10N_METRIC_CODE, SUPPORT_FORUM_CONTRIBUTORS_METRIC_CODE, + VISITORS_METRIC_CODE) +from kitsune.questions.models import Question, Answer, AnswerVote +from kitsune.wiki.models import HelpfulVote class CachedResource(Resource): diff --git a/apps/kpi/cron.py b/kitsune/kpi/cron.py similarity index 94% rename from apps/kpi/cron.py rename to kitsune/kpi/cron.py index f37c9fbfe47..167e2e5025b 100644 --- a/apps/kpi/cron.py +++ b/kitsune/kpi/cron.py @@ -5,20 +5,18 @@ import cronjobs -from customercare.models import Reply -from dashboards import LAST_90_DAYS -from dashboards.models import WikiDocumentVisits -from kpi.models import (Metric, MetricKind, - AOA_CONTRIBUTORS_METRIC_CODE, - KB_ENUS_CONTRIBUTORS_METRIC_CODE, - KB_L10N_CONTRIBUTORS_METRIC_CODE, - L10N_METRIC_CODE, - SUPPORT_FORUM_CONTRIBUTORS_METRIC_CODE, - VISITORS_METRIC_CODE) -from questions.models import Answer -from sumo import googleanalytics -from wiki.config import TYPO_SIGNIFICANCE, MEDIUM_SIGNIFICANCE -from wiki.models import Revision +from kitsune.customercare.models import Reply +from kitsune.dashboards import LAST_90_DAYS +from kitsune.dashboards.models import WikiDocumentVisits +from kitsune.kpi.models import ( + Metric, MetricKind, AOA_CONTRIBUTORS_METRIC_CODE, + KB_ENUS_CONTRIBUTORS_METRIC_CODE, KB_L10N_CONTRIBUTORS_METRIC_CODE, + L10N_METRIC_CODE, SUPPORT_FORUM_CONTRIBUTORS_METRIC_CODE, + VISITORS_METRIC_CODE) +from kitsune.questions.models import Answer +from kitsune.sumo import googleanalytics +from kitsune.wiki.config import TYPO_SIGNIFICANCE, MEDIUM_SIGNIFICANCE +from kitsune.wiki.models import Revision @cronjobs.register diff --git a/apps/kpi/models.py b/kitsune/kpi/models.py similarity index 98% rename from apps/kpi/models.py rename to kitsune/kpi/models.py index 914e5539b9c..8d403f21f22 100644 --- a/apps/kpi/models.py +++ b/kitsune/kpi/models.py @@ -1,7 +1,7 @@ from django.db.models import (CharField, DateField, ForeignKey, PositiveIntegerField) -from sumo.models import ModelBase +from kitsune.sumo.models import ModelBase VISITORS_METRIC_CODE = 'general keymetrics:visitors' diff --git a/apps/kpi/templates/kpi/base.html b/kitsune/kpi/templates/kpi/base.html similarity index 100% rename from apps/kpi/templates/kpi/base.html rename to kitsune/kpi/templates/kpi/base.html diff --git a/apps/kpi/templates/kpi/dashboard.html b/kitsune/kpi/templates/kpi/dashboard.html similarity index 100% rename from apps/kpi/templates/kpi/dashboard.html rename to kitsune/kpi/templates/kpi/dashboard.html diff --git a/apps/kpi/tests/__init__.py b/kitsune/kpi/tests/__init__.py similarity index 82% rename from apps/kpi/tests/__init__.py rename to kitsune/kpi/tests/__init__.py index ea674e10b6c..0fb666585ed 100644 --- a/apps/kpi/tests/__init__.py +++ b/kitsune/kpi/tests/__init__.py @@ -1,7 +1,7 @@ from datetime import date -from kpi.models import MetricKind, Metric -from sumo.tests import with_save +from kitsune.kpi.models import MetricKind, Metric +from kitsune.sumo.tests import with_save @with_save diff --git a/apps/kpi/tests/test_api.py b/kitsune/kpi/tests/test_api.py similarity index 93% rename from apps/kpi/tests/test_api.py rename to kitsune/kpi/tests/test_api.py index 7e7665a1dab..a42b938c5e6 100644 --- a/apps/kpi/tests/test_api.py +++ b/kitsune/kpi/tests/test_api.py @@ -6,23 +6,19 @@ from nose.tools import eq_ -from customercare.tests import reply -from kpi.cron import update_contributor_metrics -from kpi.models import (Metric, - AOA_CONTRIBUTORS_METRIC_CODE, - KB_ENUS_CONTRIBUTORS_METRIC_CODE, - KB_L10N_CONTRIBUTORS_METRIC_CODE, - L10N_METRIC_CODE, - SUPPORT_FORUM_CONTRIBUTORS_METRIC_CODE, - VISITORS_METRIC_CODE) - -from kpi.tests import metric, metric_kind -from sumo.helpers import urlparams -from sumo.tests import TestCase, LocalizingClient -from sumo.urlresolvers import reverse -from questions.tests import answer, answervote, question -from users.tests import user, add_permission -from wiki.tests import document, revision, helpful_vote +from kitsune.customercare.tests import reply +from kitsune.kpi.cron import update_contributor_metrics +from kitsune.kpi.models import ( + Metric, AOA_CONTRIBUTORS_METRIC_CODE, KB_ENUS_CONTRIBUTORS_METRIC_CODE, + KB_L10N_CONTRIBUTORS_METRIC_CODE, L10N_METRIC_CODE, + SUPPORT_FORUM_CONTRIBUTORS_METRIC_CODE, VISITORS_METRIC_CODE) +from kitsune.kpi.tests import metric, metric_kind +from kitsune.sumo.helpers import urlparams +from kitsune.sumo.tests import TestCase, LocalizingClient +from kitsune.sumo.urlresolvers import reverse +from kitsune.questions.tests import answer, answervote, question +from kitsune.users.tests import user, add_permission +from kitsune.wiki.tests import document, revision, helpful_vote class KpiApiTests(TestCase): diff --git a/apps/kpi/tests/test_cron.py b/kitsune/kpi/tests/test_cron.py similarity index 89% rename from apps/kpi/tests/test_cron.py rename to kitsune/kpi/tests/test_cron.py index 3ef76ef3677..3e8c1888d72 100644 --- a/apps/kpi/tests/test_cron.py +++ b/kitsune/kpi/tests/test_cron.py @@ -3,15 +3,15 @@ from mock import patch from nose.tools import eq_ -import kpi.cron -from kpi.cron import (update_visitors_metric, update_l10n_metric, - googleanalytics) -from kpi.models import Metric, VISITORS_METRIC_CODE, L10N_METRIC_CODE -from kpi.tests import metric_kind -from sumo.tests import TestCase -from wiki.config import (MAJOR_SIGNIFICANCE, MEDIUM_SIGNIFICANCE, - TYPO_SIGNIFICANCE) -from wiki.tests import document, revision +import kitsune.kpi.cron +from kitsune.kpi.cron import ( + update_visitors_metric, update_l10n_metric, googleanalytics) +from kitsune.kpi.models import Metric, VISITORS_METRIC_CODE, L10N_METRIC_CODE +from kitsune.kpi.tests import metric_kind +from kitsune.sumo.tests import TestCase +from kitsune.wiki.config import ( + MAJOR_SIGNIFICANCE, MEDIUM_SIGNIFICANCE, TYPO_SIGNIFICANCE) +from kitsune.wiki.tests import document, revision class CronJobTests(TestCase): @@ -31,7 +31,7 @@ def test_update_visitors_cron(self, visitors): eq_(193, metrics[1].value) eq_(date(2012, 01, 15), metrics[2].start) - @patch.object(kpi.cron, '_get_top_docs') + @patch.object(kitsune.kpi.cron, '_get_top_docs') @patch.object(googleanalytics, 'visitors_by_locale') def test_update_l10n_metric_cron(self, visitors_by_locale, _get_top_docs): """Verify the cron job creates the correct metric.""" diff --git a/apps/kpi/urls.py b/kitsune/kpi/urls.py similarity index 66% rename from apps/kpi/urls.py rename to kitsune/kpi/urls.py index 0c03c17043f..43d8ec9fdb7 100644 --- a/apps/kpi/urls.py +++ b/kitsune/kpi/urls.py @@ -1,10 +1,12 @@ from django.conf.urls import patterns, url, include -from kpi.api import (QuestionsResource, VoteResource, - ActiveContributorsResource, ElasticClickthroughResource, - VisitorsResource, L10nCoverageResource, KBVoteResource) from tastypie.api import Api +from kitsune.kpi.api import ( + QuestionsResource, VoteResource, ActiveContributorsResource, + ElasticClickthroughResource, VisitorsResource, L10nCoverageResource, + KBVoteResource) + v1_api = Api(api_name='v1') v1_api.register(QuestionsResource()) @@ -16,7 +18,7 @@ v1_api.register(L10nCoverageResource()) -urlpatterns = patterns('kpi.views', +urlpatterns = patterns('kitsune.kpi.views', url(r'^dashboard$', 'dashboard', name='kpi.dashboard'), (r'^api/', include(v1_api.urls)), diff --git a/apps/kpi/views.py b/kitsune/kpi/views.py similarity index 100% rename from apps/kpi/views.py rename to kitsune/kpi/views.py diff --git a/apps/kpi/__init__.py b/kitsune/landings/__init__.py similarity index 100% rename from apps/kpi/__init__.py rename to kitsune/landings/__init__.py diff --git a/apps/landings/models.py b/kitsune/landings/models.py similarity index 100% rename from apps/landings/models.py rename to kitsune/landings/models.py diff --git a/apps/landings/templates/landings/get-involved-aoa.html b/kitsune/landings/templates/landings/get-involved-aoa.html similarity index 100% rename from apps/landings/templates/landings/get-involved-aoa.html rename to kitsune/landings/templates/landings/get-involved-aoa.html diff --git a/apps/landings/templates/landings/get-involved-kb.html b/kitsune/landings/templates/landings/get-involved-kb.html similarity index 100% rename from apps/landings/templates/landings/get-involved-kb.html rename to kitsune/landings/templates/landings/get-involved-kb.html diff --git a/apps/landings/templates/landings/get-involved-l10n.html b/kitsune/landings/templates/landings/get-involved-l10n.html similarity index 100% rename from apps/landings/templates/landings/get-involved-l10n.html rename to kitsune/landings/templates/landings/get-involved-l10n.html diff --git a/apps/landings/templates/landings/get-involved-questions.html b/kitsune/landings/templates/landings/get-involved-questions.html similarity index 100% rename from apps/landings/templates/landings/get-involved-questions.html rename to kitsune/landings/templates/landings/get-involved-questions.html diff --git a/apps/landings/templates/landings/get-involved.html b/kitsune/landings/templates/landings/get-involved.html similarity index 100% rename from apps/landings/templates/landings/get-involved.html rename to kitsune/landings/templates/landings/get-involved.html diff --git a/apps/landings/templates/landings/home.html b/kitsune/landings/templates/landings/home.html similarity index 100% rename from apps/landings/templates/landings/home.html rename to kitsune/landings/templates/landings/home.html diff --git a/apps/landings/templates/landings/integrity-check.html b/kitsune/landings/templates/landings/integrity-check.html similarity index 100% rename from apps/landings/templates/landings/integrity-check.html rename to kitsune/landings/templates/landings/integrity-check.html diff --git a/apps/landings/templates/landings/mobile/get-involved-aoa.html b/kitsune/landings/templates/landings/mobile/get-involved-aoa.html similarity index 100% rename from apps/landings/templates/landings/mobile/get-involved-aoa.html rename to kitsune/landings/templates/landings/mobile/get-involved-aoa.html diff --git a/apps/landings/templates/landings/mobile/get-involved-kb.html b/kitsune/landings/templates/landings/mobile/get-involved-kb.html similarity index 100% rename from apps/landings/templates/landings/mobile/get-involved-kb.html rename to kitsune/landings/templates/landings/mobile/get-involved-kb.html diff --git a/apps/landings/templates/landings/mobile/get-involved-l10n.html b/kitsune/landings/templates/landings/mobile/get-involved-l10n.html similarity index 100% rename from apps/landings/templates/landings/mobile/get-involved-l10n.html rename to kitsune/landings/templates/landings/mobile/get-involved-l10n.html diff --git a/apps/landings/templates/landings/mobile/get-involved-questions.html b/kitsune/landings/templates/landings/mobile/get-involved-questions.html similarity index 100% rename from apps/landings/templates/landings/mobile/get-involved-questions.html rename to kitsune/landings/templates/landings/mobile/get-involved-questions.html diff --git a/apps/landings/templates/landings/mobile/get-involved.html b/kitsune/landings/templates/landings/mobile/get-involved.html similarity index 100% rename from apps/landings/templates/landings/mobile/get-involved.html rename to kitsune/landings/templates/landings/mobile/get-involved.html diff --git a/apps/landings/__init__.py b/kitsune/landings/tests/__init__.py similarity index 100% rename from apps/landings/__init__.py rename to kitsune/landings/tests/__init__.py diff --git a/apps/landings/tests/test_templates.py b/kitsune/landings/tests/test_templates.py similarity index 87% rename from apps/landings/tests/test_templates.py rename to kitsune/landings/tests/test_templates.py index b623a167cd2..ce0485c38f2 100644 --- a/apps/landings/tests/test_templates.py +++ b/kitsune/landings/tests/test_templates.py @@ -3,13 +3,13 @@ from nose.tools import eq_ from pyquery import PyQuery as pq -from products.tests import product -from search.tests.test_es import ElasticTestCase -from sumo.tests import TestCase -from sumo.urlresolvers import reverse -from topics.models import HOT_TOPIC_SLUG -from topics.tests import topic -from wiki.tests import document, revision +from kitsune.products.tests import product +from kitsune.search.tests.test_es import ElasticTestCase +from kitsune.sumo.tests import TestCase +from kitsune.sumo.urlresolvers import reverse +from kitsune.topics.models import HOT_TOPIC_SLUG +from kitsune.topics.tests import topic +from kitsune.wiki.tests import document, revision class HomeTestCase(ElasticTestCase): diff --git a/apps/landings/tests/test_views.py b/kitsune/landings/tests/test_views.py similarity index 87% rename from apps/landings/tests/test_views.py rename to kitsune/landings/tests/test_views.py index 0bb3865f230..67ba5d0f0f1 100644 --- a/apps/landings/tests/test_views.py +++ b/kitsune/landings/tests/test_views.py @@ -1,7 +1,7 @@ from nose.tools import eq_ -from sumo.tests import MobileTestCase, TestCase -from sumo.urlresolvers import reverse +from kitsune.sumo.tests import MobileTestCase, TestCase +from kitsune.sumo.urlresolvers import reverse class RootRedirectTests(TestCase): diff --git a/apps/landings/urls.py b/kitsune/landings/urls.py similarity index 91% rename from apps/landings/urls.py rename to kitsune/landings/urls.py index d3eec374c46..b9349a8ae7d 100644 --- a/apps/landings/urls.py +++ b/kitsune/landings/urls.py @@ -1,9 +1,9 @@ from django.conf.urls import patterns, url -from sumo.views import redirect_to +from kitsune.sumo.views import redirect_to -urlpatterns = patterns('landings.views', +urlpatterns = patterns('kitsune.landings.views', url(r'^$', 'desktop_or_mobile', name='home.default'), url(r'^home$', 'home', name='home'), diff --git a/apps/landings/views.py b/kitsune/landings/views.py similarity index 88% rename from apps/landings/views.py rename to kitsune/landings/views.py index aefc19c729c..8a1a3b11813 100644 --- a/apps/landings/views.py +++ b/kitsune/landings/views.py @@ -2,12 +2,13 @@ from django.views.decorators.cache import never_cache from mobility.decorators import mobile_template -from products.models import Product -from sumo.parser import get_object_fallback -from sumo.views import redirect_to -from topics.models import Topic, HOT_TOPIC_SLUG -from wiki.facets import documents_for -from wiki.models import Document + +from kitsune.products.models import Product +from kitsune.sumo.parser import get_object_fallback +from kitsune.sumo.views import redirect_to +from kitsune.topics.models import Topic, HOT_TOPIC_SLUG +from kitsune.wiki.facets import documents_for +from kitsune.wiki.models import Document # Docs for the new IA: diff --git a/apps/landings/tests/__init__.py b/kitsune/lib/__init__.py similarity index 100% rename from apps/landings/tests/__init__.py rename to kitsune/lib/__init__.py diff --git a/lib/countries.py b/kitsune/lib/countries.py similarity index 100% rename from lib/countries.py rename to kitsune/lib/countries.py diff --git a/lib/languages.json b/kitsune/lib/languages.json similarity index 100% rename from lib/languages.json rename to kitsune/lib/languages.json diff --git a/lib/sumo_locales.py b/kitsune/lib/sumo_locales.py similarity index 100% rename from lib/sumo_locales.py rename to kitsune/lib/sumo_locales.py diff --git a/apps/messages/__init__.py b/kitsune/messages/__init__.py similarity index 80% rename from apps/messages/__init__.py rename to kitsune/messages/__init__.py index 1bdccae25ef..6e3e4343fec 100644 --- a/apps/messages/__init__.py +++ b/kitsune/messages/__init__.py @@ -1,7 +1,7 @@ -from messages.models import InboxMessage, OutboxMessage -from messages.signals import message_sent -from messages.tasks import email_private_message -from users.models import Setting +from kitsune.messages.models import InboxMessage, OutboxMessage +from kitsune.messages.signals import message_sent +from kitsune.messages.tasks import email_private_message +from kitsune.users.models import Setting # The number of threads per page. diff --git a/apps/messages/context_processors.py b/kitsune/messages/context_processors.py similarity index 92% rename from apps/messages/context_processors.py rename to kitsune/messages/context_processors.py index 0c1c9a239f5..c4f619e802a 100644 --- a/apps/messages/context_processors.py +++ b/kitsune/messages/context_processors.py @@ -1,6 +1,6 @@ import waffle -import messages +from kitsune import messages def unread_message_count(request): diff --git a/apps/messages/forms.py b/kitsune/messages/forms.py similarity index 93% rename from apps/messages/forms.py rename to kitsune/messages/forms.py index d39e01f1ce0..504dbf3d7f2 100644 --- a/apps/messages/forms.py +++ b/kitsune/messages/forms.py @@ -2,7 +2,7 @@ from tower import ugettext_lazy as _lazy -from sumo.form_fields import MultiUsernameField +from kitsune.sumo.form_fields import MultiUsernameField TO_PLACEHOLDER = _lazy(u'username1, username2,...') diff --git a/apps/messages/models.py b/kitsune/messages/models.py similarity index 89% rename from apps/messages/models.py rename to kitsune/messages/models.py index b353f237468..c577b0e2e98 100644 --- a/apps/messages/models.py +++ b/kitsune/messages/models.py @@ -3,7 +3,7 @@ from django.contrib.auth.models import User from django.db import models -from sumo.models import ModelBase +from kitsune.sumo.models import ModelBase class InboxMessage(ModelBase): @@ -23,7 +23,7 @@ def __unicode__(self): @property def content_parsed(self): - from sumo.helpers import wiki_to_html + from kitsune.sumo.helpers import wiki_to_html return wiki_to_html(self.message) @@ -39,5 +39,5 @@ def __unicode__(self): @property def content_parsed(self): - from sumo.helpers import wiki_to_html + from kitsune.sumo.helpers import wiki_to_html return wiki_to_html(self.message) diff --git a/apps/messages/signals.py b/kitsune/messages/signals.py similarity index 100% rename from apps/messages/signals.py rename to kitsune/messages/signals.py diff --git a/apps/messages/tasks.py b/kitsune/messages/tasks.py similarity index 91% rename from apps/messages/tasks.py rename to kitsune/messages/tasks.py index a36404d957c..26c048e2f45 100644 --- a/apps/messages/tasks.py +++ b/kitsune/messages/tasks.py @@ -8,9 +8,9 @@ from celery.task import task from tower import ugettext as _ -from messages.models import InboxMessage -from sumo.email_utils import (make_mail, safe_translation, render_email, - send_messages) +from kitsune.messages.models import InboxMessage +from kitsune.sumo.email_utils import ( + make_mail, safe_translation, render_email, send_messages) log = logging.getLogger('k.task') diff --git a/apps/messages/templates/messages/base.html b/kitsune/messages/templates/messages/base.html similarity index 100% rename from apps/messages/templates/messages/base.html rename to kitsune/messages/templates/messages/base.html diff --git a/apps/messages/templates/messages/delete.html b/kitsune/messages/templates/messages/delete.html similarity index 100% rename from apps/messages/templates/messages/delete.html rename to kitsune/messages/templates/messages/delete.html diff --git a/apps/messages/templates/messages/email/private_message.html b/kitsune/messages/templates/messages/email/private_message.html similarity index 100% rename from apps/messages/templates/messages/email/private_message.html rename to kitsune/messages/templates/messages/email/private_message.html diff --git a/apps/messages/templates/messages/email/private_message.ltxt b/kitsune/messages/templates/messages/email/private_message.ltxt similarity index 100% rename from apps/messages/templates/messages/email/private_message.ltxt rename to kitsune/messages/templates/messages/email/private_message.ltxt diff --git a/apps/messages/templates/messages/inbox.html b/kitsune/messages/templates/messages/inbox.html similarity index 100% rename from apps/messages/templates/messages/inbox.html rename to kitsune/messages/templates/messages/inbox.html diff --git a/apps/messages/templates/messages/includes/macros.html b/kitsune/messages/templates/messages/includes/macros.html similarity index 100% rename from apps/messages/templates/messages/includes/macros.html rename to kitsune/messages/templates/messages/includes/macros.html diff --git a/apps/messages/templates/messages/includes/message_preview.html b/kitsune/messages/templates/messages/includes/message_preview.html similarity index 100% rename from apps/messages/templates/messages/includes/message_preview.html rename to kitsune/messages/templates/messages/includes/message_preview.html diff --git a/apps/messages/templates/messages/mobile/delete.html b/kitsune/messages/templates/messages/mobile/delete.html similarity index 100% rename from apps/messages/templates/messages/mobile/delete.html rename to kitsune/messages/templates/messages/mobile/delete.html diff --git a/apps/messages/templates/messages/mobile/inbox.html b/kitsune/messages/templates/messages/mobile/inbox.html similarity index 100% rename from apps/messages/templates/messages/mobile/inbox.html rename to kitsune/messages/templates/messages/mobile/inbox.html diff --git a/apps/messages/templates/messages/mobile/new.html b/kitsune/messages/templates/messages/mobile/new.html similarity index 100% rename from apps/messages/templates/messages/mobile/new.html rename to kitsune/messages/templates/messages/mobile/new.html diff --git a/apps/messages/templates/messages/mobile/outbox.html b/kitsune/messages/templates/messages/mobile/outbox.html similarity index 100% rename from apps/messages/templates/messages/mobile/outbox.html rename to kitsune/messages/templates/messages/mobile/outbox.html diff --git a/apps/messages/templates/messages/mobile/read-outbox.html b/kitsune/messages/templates/messages/mobile/read-outbox.html similarity index 100% rename from apps/messages/templates/messages/mobile/read-outbox.html rename to kitsune/messages/templates/messages/mobile/read-outbox.html diff --git a/apps/messages/templates/messages/mobile/read.html b/kitsune/messages/templates/messages/mobile/read.html similarity index 100% rename from apps/messages/templates/messages/mobile/read.html rename to kitsune/messages/templates/messages/mobile/read.html diff --git a/apps/messages/templates/messages/new.html b/kitsune/messages/templates/messages/new.html similarity index 100% rename from apps/messages/templates/messages/new.html rename to kitsune/messages/templates/messages/new.html diff --git a/apps/messages/templates/messages/outbox.html b/kitsune/messages/templates/messages/outbox.html similarity index 100% rename from apps/messages/templates/messages/outbox.html rename to kitsune/messages/templates/messages/outbox.html diff --git a/apps/messages/templates/messages/read-outbox.html b/kitsune/messages/templates/messages/read-outbox.html similarity index 100% rename from apps/messages/templates/messages/read-outbox.html rename to kitsune/messages/templates/messages/read-outbox.html diff --git a/apps/messages/templates/messages/read.html b/kitsune/messages/templates/messages/read.html similarity index 100% rename from apps/messages/templates/messages/read.html rename to kitsune/messages/templates/messages/read.html diff --git a/apps/messages/tests/__init__.py b/kitsune/messages/tests/__init__.py similarity index 100% rename from apps/messages/tests/__init__.py rename to kitsune/messages/tests/__init__.py diff --git a/apps/messages/tests/test_context_processors.py b/kitsune/messages/tests/test_context_processors.py similarity index 85% rename from apps/messages/tests/test_context_processors.py rename to kitsune/messages/tests/test_context_processors.py index 8186ae7999e..c06fd8542c1 100644 --- a/apps/messages/tests/test_context_processors.py +++ b/kitsune/messages/tests/test_context_processors.py @@ -4,10 +4,10 @@ from nose.tools import eq_ from test_utils import RequestFactory -import messages -from messages.context_processors import unread_message_count -from sumo.tests import TestCase -from users.tests import user +from kitsune import messages +from kitsune.messages.context_processors import unread_message_count +from kitsune.sumo.tests import TestCase +from kitsune.users.tests import user class UnreadCountTests(TestCase): diff --git a/apps/messages/tests/test_internal_api.py b/kitsune/messages/tests/test_internal_api.py similarity index 80% rename from apps/messages/tests/test_internal_api.py rename to kitsune/messages/tests/test_internal_api.py index 729905e820e..afc3936ae23 100644 --- a/apps/messages/tests/test_internal_api.py +++ b/kitsune/messages/tests/test_internal_api.py @@ -1,9 +1,9 @@ from nose.tools import eq_ -from messages import send_message -from messages.models import InboxMessage, OutboxMessage -from sumo.tests import TestCase -from users.tests import user +from kitsune.messages import send_message +from kitsune.messages.models import InboxMessage, OutboxMessage +from kitsune.sumo.tests import TestCase +from kitsune.users.tests import user class SendTests(TestCase): diff --git a/apps/messages/tests/test_notifications.py b/kitsune/messages/tests/test_notifications.py similarity index 92% rename from apps/messages/tests/test_notifications.py rename to kitsune/messages/tests/test_notifications.py index 7ef2ef74ddb..aca9e065bbe 100644 --- a/apps/messages/tests/test_notifications.py +++ b/kitsune/messages/tests/test_notifications.py @@ -3,10 +3,10 @@ import mock -from kbforums.tests import KBForumTestCase -from sumo.tests import post, attrs_eq, starts_with -from users.models import Setting -from users.tests import user +from kitsune.kbforums.tests import KBForumTestCase +from kitsune.sumo.tests import post, attrs_eq, starts_with +from kitsune.users.models import Setting +from kitsune.users.tests import user PRIVATE_MESSAGE_EMAIL = '{sender} sent you the following' diff --git a/apps/messages/tests/test_templates.py b/kitsune/messages/tests/test_templates.py similarity index 93% rename from apps/messages/tests/test_templates.py rename to kitsune/messages/tests/test_templates.py index c72b10b5bff..2ddc27e8ca0 100644 --- a/apps/messages/tests/test_templates.py +++ b/kitsune/messages/tests/test_templates.py @@ -1,11 +1,11 @@ from nose.tools import eq_ from pyquery import PyQuery as pq -from messages.models import OutboxMessage -from sumo.helpers import urlparams -from sumo.tests import TestCase -from sumo.urlresolvers import reverse -from users.tests import user +from kitsune.messages.models import OutboxMessage +from kitsune.sumo.helpers import urlparams +from kitsune.sumo.tests import TestCase +from kitsune.sumo.urlresolvers import reverse +from kitsune.users.tests import user class SendMessageTestCase(TestCase): diff --git a/apps/messages/tests/test_views.py b/kitsune/messages/tests/test_views.py similarity index 96% rename from apps/messages/tests/test_views.py rename to kitsune/messages/tests/test_views.py index 4a081f9eff2..d8cd0824aaa 100644 --- a/apps/messages/tests/test_views.py +++ b/kitsune/messages/tests/test_views.py @@ -1,10 +1,10 @@ from multidb.middleware import PINNING_COOKIE from nose.tools import eq_ -from messages.models import InboxMessage, OutboxMessage -from sumo.tests import TestCase, LocalizingClient -from sumo.urlresolvers import reverse -from users.tests import user +from kitsune.messages.models import InboxMessage, OutboxMessage +from kitsune.sumo.tests import TestCase, LocalizingClient +from kitsune.sumo.urlresolvers import reverse +from kitsune.users.tests import user class ReadMessageTests(TestCase): diff --git a/apps/messages/urls.py b/kitsune/messages/urls.py similarity index 96% rename from apps/messages/urls.py rename to kitsune/messages/urls.py index cf3d3a88bb8..06548aeddb5 100644 --- a/apps/messages/urls.py +++ b/kitsune/messages/urls.py @@ -1,6 +1,6 @@ from django.conf.urls import patterns, url -from messages import views +from kitsune.messages import views urlpatterns = patterns('', diff --git a/apps/messages/views.py b/kitsune/messages/views.py similarity index 94% rename from apps/messages/views.py rename to kitsune/messages/views.py index be58a215bcd..67e43127bb2 100644 --- a/apps/messages/views.py +++ b/kitsune/messages/views.py @@ -7,18 +7,18 @@ from django.views.decorators.http import require_POST from django.shortcuts import get_object_or_404, redirect, render +from mobility.decorators import mobile_template from multidb.pinning import mark_as_write from ratelimit.helpers import is_ratelimited -from tower import ugettext as _ from statsd import statsd +from tower import ugettext as _ -from access.decorators import login_required -from messages import send_message, MESSAGES_PER_PAGE -from messages.forms import MessageForm, ReplyForm -from messages.models import InboxMessage, OutboxMessage -from mobility.decorators import mobile_template -from sumo.urlresolvers import reverse -from sumo.utils import user_or_ip, paginate +from kitsune.access.decorators import login_required +from kitsune.messages import send_message, MESSAGES_PER_PAGE +from kitsune.messages.forms import MessageForm, ReplyForm +from kitsune.messages.models import InboxMessage, OutboxMessage +from kitsune.sumo.urlresolvers import reverse +from kitsune.sumo.utils import user_or_ip, paginate @login_required diff --git a/apps/postcrash/__init__.py b/kitsune/postcrash/__init__.py similarity index 100% rename from apps/postcrash/__init__.py rename to kitsune/postcrash/__init__.py diff --git a/apps/postcrash/admin.py b/kitsune/postcrash/admin.py similarity index 84% rename from apps/postcrash/admin.py rename to kitsune/postcrash/admin.py index bff65856296..d27931a8598 100644 --- a/apps/postcrash/admin.py +++ b/kitsune/postcrash/admin.py @@ -1,6 +1,6 @@ from django.contrib import admin -from postcrash.models import Signature +from kitsune.postcrash.models import Signature class SignatureAdmin(admin.ModelAdmin): diff --git a/apps/postcrash/models.py b/kitsune/postcrash/models.py similarity index 83% rename from apps/postcrash/models.py rename to kitsune/postcrash/models.py index 04e994a4e29..b787902b5ba 100644 --- a/apps/postcrash/models.py +++ b/kitsune/postcrash/models.py @@ -1,7 +1,7 @@ from django.db import models -from sumo.models import ModelBase -from wiki.models import Document +from kitsune.sumo.models import ModelBase +from kitsune.wiki.models import Document class Signature(ModelBase): diff --git a/apps/postcrash/tests/__init__.py b/kitsune/postcrash/tests/__init__.py similarity index 100% rename from apps/postcrash/tests/__init__.py rename to kitsune/postcrash/tests/__init__.py diff --git a/apps/postcrash/tests/test_models.py b/kitsune/postcrash/tests/test_models.py similarity index 67% rename from apps/postcrash/tests/test_models.py rename to kitsune/postcrash/tests/test_models.py index 119bbc4ec0c..bc85be76795 100644 --- a/apps/postcrash/tests/test_models.py +++ b/kitsune/postcrash/tests/test_models.py @@ -1,8 +1,8 @@ from nose.tools import eq_ -from postcrash.models import Signature -from sumo.tests import TestCase -from wiki.tests import document +from kitsune.postcrash.models import Signature +from kitsune.sumo.tests import TestCase +from kitsune.wiki.tests import document class SignatureTests(TestCase): diff --git a/apps/postcrash/tests/test_views.py b/kitsune/postcrash/tests/test_views.py similarity index 81% rename from apps/postcrash/tests/test_views.py rename to kitsune/postcrash/tests/test_views.py index 39495993b76..c59e4694926 100644 --- a/apps/postcrash/tests/test_views.py +++ b/kitsune/postcrash/tests/test_views.py @@ -1,10 +1,10 @@ from nose.tools import eq_ -from postcrash.models import Signature -from sumo.helpers import urlparams -from sumo.tests import TestCase -from sumo.urlresolvers import reverse -from wiki.tests import document +from kitsune.postcrash.models import Signature +from kitsune.sumo.helpers import urlparams +from kitsune.sumo.tests import TestCase +from kitsune.sumo.urlresolvers import reverse +from kitsune.wiki.tests import document class ApiTests(TestCase): diff --git a/apps/postcrash/urls.py b/kitsune/postcrash/urls.py similarity index 77% rename from apps/postcrash/urls.py rename to kitsune/postcrash/urls.py index 9e6de690a2a..4fc7afc80fa 100644 --- a/apps/postcrash/urls.py +++ b/kitsune/postcrash/urls.py @@ -1,6 +1,6 @@ from django.conf.urls import patterns, url -from postcrash import views +from kitsune.postcrash import views urlpatterns = patterns('', diff --git a/apps/postcrash/views.py b/kitsune/postcrash/views.py similarity index 93% rename from apps/postcrash/views.py rename to kitsune/postcrash/views.py index be135002f66..e4fbe4691b7 100644 --- a/apps/postcrash/views.py +++ b/kitsune/postcrash/views.py @@ -2,7 +2,7 @@ from django.http import HttpResponse, HttpResponseBadRequest from django.views.decorators.cache import cache_page -from postcrash.models import Signature +from kitsune.postcrash.models import Signature @cache_page(60 * 60 * 24) # One day. diff --git a/apps/products/__init__.py b/kitsune/products/__init__.py similarity index 100% rename from apps/products/__init__.py rename to kitsune/products/__init__.py diff --git a/apps/products/admin.py b/kitsune/products/admin.py similarity index 88% rename from apps/products/admin.py rename to kitsune/products/admin.py index 677d7fa9904..1fd7940c4ad 100644 --- a/apps/products/admin.py +++ b/kitsune/products/admin.py @@ -1,6 +1,6 @@ from django.contrib import admin -from products.models import Product +from kitsune.products.models import Product class ProductAdmin(admin.ModelAdmin): diff --git a/apps/products/models.py b/kitsune/products/models.py similarity index 95% rename from apps/products/models.py rename to kitsune/products/models.py index 13f08d1733a..0295729c922 100644 --- a/apps/products/models.py +++ b/kitsune/products/models.py @@ -3,7 +3,7 @@ from django.conf import settings from django.db import models -from sumo.models import ModelBase +from kitsune.sumo.models import ModelBase class Product(ModelBase): diff --git a/apps/products/static/img/product_placeholder.png b/kitsune/products/static/img/product_placeholder.png similarity index 100% rename from apps/products/static/img/product_placeholder.png rename to kitsune/products/static/img/product_placeholder.png diff --git a/apps/products/templates/products/documents.html b/kitsune/products/templates/products/documents.html similarity index 100% rename from apps/products/templates/products/documents.html rename to kitsune/products/templates/products/documents.html diff --git a/apps/products/templates/products/includes/product_macros.html b/kitsune/products/templates/products/includes/product_macros.html similarity index 100% rename from apps/products/templates/products/includes/product_macros.html rename to kitsune/products/templates/products/includes/product_macros.html diff --git a/apps/products/templates/products/mobile/documents.html b/kitsune/products/templates/products/mobile/documents.html similarity index 100% rename from apps/products/templates/products/mobile/documents.html rename to kitsune/products/templates/products/mobile/documents.html diff --git a/apps/products/templates/products/mobile/product.html b/kitsune/products/templates/products/mobile/product.html similarity index 100% rename from apps/products/templates/products/mobile/product.html rename to kitsune/products/templates/products/mobile/product.html diff --git a/apps/products/templates/products/mobile/products.html b/kitsune/products/templates/products/mobile/products.html similarity index 100% rename from apps/products/templates/products/mobile/products.html rename to kitsune/products/templates/products/mobile/products.html diff --git a/apps/products/templates/products/product.html b/kitsune/products/templates/products/product.html similarity index 100% rename from apps/products/templates/products/product.html rename to kitsune/products/templates/products/product.html diff --git a/apps/products/templates/products/products.html b/kitsune/products/templates/products/products.html similarity index 100% rename from apps/products/templates/products/products.html rename to kitsune/products/templates/products/products.html diff --git a/apps/products/tests/__init__.py b/kitsune/products/tests/__init__.py similarity index 84% rename from apps/products/tests/__init__.py rename to kitsune/products/tests/__init__.py index e84bc6c9bbe..33fc4021912 100644 --- a/apps/products/tests/__init__.py +++ b/kitsune/products/tests/__init__.py @@ -3,8 +3,8 @@ from django.template.defaultfilters import slugify -from sumo.tests import with_save -from products.models import Product +from kitsune.products.models import Product +from kitsune.sumo.tests import with_save @with_save diff --git a/apps/products/tests/test_templates.py b/kitsune/products/tests/test_templates.py similarity index 95% rename from apps/products/tests/test_templates.py rename to kitsune/products/tests/test_templates.py index 250f8ddf1d6..3a89f7ed767 100644 --- a/apps/products/tests/test_templates.py +++ b/kitsune/products/tests/test_templates.py @@ -5,12 +5,12 @@ from nose.tools import eq_ from pyquery import PyQuery as pq -from products.tests import product -from search.tests.test_es import ElasticTestCase -from sumo.urlresolvers import reverse -from topics.models import HOT_TOPIC_SLUG -from topics.tests import topic -from wiki.tests import revision, helpful_vote +from kitsune.products.tests import product +from kitsune.search.tests.test_es import ElasticTestCase +from kitsune.sumo.urlresolvers import reverse +from kitsune.topics.models import HOT_TOPIC_SLUG +from kitsune.topics.tests import topic +from kitsune.wiki.tests import revision, helpful_vote class ProductViewsTestCase(ElasticTestCase): diff --git a/apps/products/urls.py b/kitsune/products/urls.py similarity index 85% rename from apps/products/urls.py rename to kitsune/products/urls.py index 3022fffb30b..1081becef5c 100644 --- a/apps/products/urls.py +++ b/kitsune/products/urls.py @@ -1,6 +1,7 @@ from django.conf.urls import patterns, url -urlpatterns = patterns('products.views', + +urlpatterns = patterns('kitsune.products.views', url(r'^$', 'product_list', name='products'), url(r'^/(?P[^/]+)$', 'product_landing', name='products.product'), url(r'^/(?P[^/]+)/(?P[^/]+)$', diff --git a/apps/products/views.py b/kitsune/products/views.py similarity index 92% rename from apps/products/views.py rename to kitsune/products/views.py index 3f22c1d69af..dc065bdd357 100644 --- a/apps/products/views.py +++ b/kitsune/products/views.py @@ -1,9 +1,10 @@ from django.shortcuts import get_object_or_404, render from mobility.decorators import mobile_template -from products.models import Product -from topics.models import Topic, HOT_TOPIC_SLUG -from wiki.facets import topics_for, documents_for + +from kitsune.products.models import Product +from kitsune.topics.models import Topic, HOT_TOPIC_SLUG +from kitsune.wiki.facets import topics_for, documents_for @mobile_template('products/{mobile/}products.html') diff --git a/apps/questions/__init__.py b/kitsune/questions/__init__.py similarity index 100% rename from apps/questions/__init__.py rename to kitsune/questions/__init__.py diff --git a/apps/questions/cron.py b/kitsune/questions/cron.py similarity index 92% rename from apps/questions/cron.py rename to kitsune/questions/cron.py index fd2044c18e2..2fc2dfbc5e0 100644 --- a/apps/questions/cron.py +++ b/kitsune/questions/cron.py @@ -9,12 +9,12 @@ import cronjobs -from questions.models import (Question, QuestionVote, QuestionMappingType, - QuestionVisits) -from questions.tasks import update_question_vote_chunk -from search.es_utils import ES_EXCEPTIONS, get_documents -from search.tasks import index_task -from sumo.utils import chunked +from kitsune.questions.models import ( + Question, QuestionVote, QuestionMappingType, QuestionVisits) +from kitsune.questions.tasks import update_question_vote_chunk +from kitsune.search.es_utils import ES_EXCEPTIONS, get_documents +from kitsune.search.tasks import index_task +from kitsune.sumo.utils import chunked log = logging.getLogger('k.cron') @@ -97,7 +97,7 @@ def auto_lock_old_questions(): # After we've done this for the first time, we can nix # the chunking code. - from search.utils import chunked + from kitsune.search.utils import chunked for chunk in chunked(q_ids, 100): # Fetch all the documents we need to update. diff --git a/apps/questions/events.py b/kitsune/questions/events.py similarity index 98% rename from apps/questions/events.py rename to kitsune/questions/events.py index e293f83981e..c6a964fc944 100644 --- a/apps/questions/events.py +++ b/kitsune/questions/events.py @@ -5,9 +5,9 @@ from tidings.events import InstanceEvent from tower import ugettext as _ -from questions.models import Question -from sumo import email_utils -from sumo.urlresolvers import reverse +from kitsune.questions.models import Question +from kitsune.sumo import email_utils +from kitsune.sumo.urlresolvers import reverse class QuestionEvent(InstanceEvent): diff --git a/apps/questions/feeds.py b/kitsune/questions/feeds.py similarity index 92% rename from apps/questions/feeds.py rename to kitsune/questions/feeds.py index 98fdecbc7a2..24579bc94d2 100644 --- a/apps/questions/feeds.py +++ b/kitsune/questions/feeds.py @@ -1,16 +1,16 @@ -from django.shortcuts import get_object_or_404 -from django.utils.html import strip_tags, escape from django.contrib.syndication.views import Feed +from django.shortcuts import get_object_or_404 from django.utils.feedgenerator import Atom1Feed +from django.utils.html import strip_tags, escape from tower import ugettext as _ -from sumo.urlresolvers import reverse from taggit.models import Tag -from sumo.helpers import urlparams -from questions.models import Question -import questions as constants +from kitsune import questions as constants +from kitsune.questions.models import Question +from kitsune.sumo.urlresolvers import reverse +from kitsune.sumo.helpers import urlparams class QuestionsFeed(Feed): diff --git a/apps/questions/fixtures/questions.json b/kitsune/questions/fixtures/questions.json similarity index 100% rename from apps/questions/fixtures/questions.json rename to kitsune/questions/fixtures/questions.json diff --git a/apps/questions/fixtures/taggit.json b/kitsune/questions/fixtures/taggit.json similarity index 100% rename from apps/questions/fixtures/taggit.json rename to kitsune/questions/fixtures/taggit.json diff --git a/apps/questions/formatters.py b/kitsune/questions/formatters.py similarity index 88% rename from apps/questions/formatters.py rename to kitsune/questions/formatters.py index b2efedbe11b..b03c6d82c70 100644 --- a/apps/questions/formatters.py +++ b/kitsune/questions/formatters.py @@ -2,8 +2,8 @@ from jingo.helpers import fe from tower import ugettext as _ -from activity import ActionFormatter -from users.helpers import display_name, profile_url +from kitsune.activity import ActionFormatter +from kitsune.users.helpers import display_name, profile_url class AnswerFormatter(ActionFormatter): diff --git a/apps/questions/forms.py b/kitsune/questions/forms.py similarity index 99% rename from apps/questions/forms.py rename to kitsune/questions/forms.py index 9e2cf9a14d4..aa8f0d7a3b4 100644 --- a/apps/questions/forms.py +++ b/kitsune/questions/forms.py @@ -5,8 +5,8 @@ from tower import ugettext_lazy as _lazy, ugettext as _ -from sumo.form_fields import StrippedCharField -from questions.models import Answer +from kitsune.questions.models import Answer +from kitsune.sumo.form_fields import StrippedCharField # labels and help text SITE_AFFECTED_LABEL = _lazy(u'URL of affected site') diff --git a/apps/questions/karma_actions.py b/kitsune/questions/karma_actions.py similarity index 91% rename from apps/questions/karma_actions.py rename to kitsune/questions/karma_actions.py index bf1349e72fe..9885cc37610 100644 --- a/apps/questions/karma_actions.py +++ b/kitsune/questions/karma_actions.py @@ -1,5 +1,5 @@ -from karma.actions import KarmaAction -from karma.manager import KarmaManager +from kitsune.karma.actions import KarmaAction +from kitsune.karma.manager import KarmaManager class AnswerAction(KarmaAction): diff --git a/apps/questions/management/__init__.py b/kitsune/questions/management/__init__.py similarity index 100% rename from apps/questions/management/__init__.py rename to kitsune/questions/management/__init__.py diff --git a/apps/questions/management/commands/__init__.py b/kitsune/questions/management/commands/__init__.py similarity index 100% rename from apps/questions/management/commands/__init__.py rename to kitsune/questions/management/commands/__init__.py diff --git a/apps/questions/management/commands/fix_weekly_votes.py b/kitsune/questions/management/commands/fix_weekly_votes.py similarity index 100% rename from apps/questions/management/commands/fix_weekly_votes.py rename to kitsune/questions/management/commands/fix_weekly_votes.py diff --git a/apps/questions/marketplace.py b/kitsune/questions/marketplace.py similarity index 100% rename from apps/questions/marketplace.py rename to kitsune/questions/marketplace.py diff --git a/apps/questions/models.py b/kitsune/questions/models.py similarity index 95% rename from apps/questions/models.py rename to kitsune/questions/models.py index 10d516914d1..0679f3c162e 100755 --- a/apps/questions/models.py +++ b/kitsune/questions/models.py @@ -20,28 +20,28 @@ from statsd import statsd from taggit.models import Tag, TaggedItem -import questions as constants -from activity.models import ActionMixin -from flagit.models import FlaggedObject -from karma.manager import KarmaManager -from products.models import Product -from questions.karma_actions import (AnswerAction, FirstAnswerAction, - SolutionAction) -from questions.question_config import products -from questions.tasks import (update_question_votes, update_answer_pages, - log_answer) -from search.models import (SearchMappingType, SearchMixin, - register_for_indexing, register_mapping_type) - -from sumo.helpers import urlparams -from sumo.models import ModelBase, LocaleField -from sumo.helpers import wiki_to_html -from sumo.redis_utils import RedisError -from sumo.urlresolvers import reverse, split_path -from tags.models import BigVocabTaggableMixin -from tags.utils import add_existing_tag -from topics.models import Topic -from upload.models import ImageAttachment +from kitsune import questions as constants +from kitsune.activity.models import ActionMixin +from kitsune.flagit.models import FlaggedObject +from kitsune.karma.manager import KarmaManager +from kitsune.products.models import Product +from kitsune.questions.karma_actions import ( + AnswerAction, FirstAnswerAction, SolutionAction) +from kitsune.questions.question_config import products +from kitsune.questions.tasks import ( + update_question_votes, update_answer_pages, log_answer) +from kitsune.search.models import ( + SearchMappingType, SearchMixin, register_for_indexing, + register_mapping_type) +from kitsune.sumo.helpers import urlparams +from kitsune.sumo.models import ModelBase, LocaleField +from kitsune.sumo.helpers import wiki_to_html +from kitsune.sumo.redis_utils import RedisError +from kitsune.sumo.urlresolvers import reverse, split_path +from kitsune.tags.models import BigVocabTaggableMixin +from kitsune.tags.utils import add_existing_tag +from kitsune.topics.models import Topic +from kitsune.upload.models import ImageAttachment log = logging.getLogger('k.questions') @@ -121,7 +121,7 @@ def save(self, update=False, *args, **kwargs): if new: # Avoid circular import, events.py imports Question - from questions.events import QuestionReplyEvent + from kitsune.questions.events import QuestionReplyEvent # Authors should automatically watch their own questions. QuestionReplyEvent.notify(self.creator, self) @@ -355,8 +355,8 @@ def from_url(cls, url, id_only=False): except Http404: return None - import questions.views # Views import models; models import views. - if view != questions.views.answers: + import kitsune.questions.views # Views import models; models import views. + if view != kitsune.questions.views.answers: return None question_id = view_kwargs['question_id'] @@ -547,7 +547,7 @@ class QuestionVisits(ModelBase): @classmethod def reload_from_analytics(cls): """Update the stats from Google Analytics.""" - from sumo import googleanalytics + from kitsune.sumo import googleanalytics counts = googleanalytics.pageviews_by_question( settings.GA_START_DATE, date.today()) if counts: @@ -636,7 +636,7 @@ def save(self, update=True, no_notify=False, *args, **kwargs): if not no_notify: # Avoid circular import: events.py imports Question. - from questions.events import QuestionReplyEvent + from kitsune.questions.events import QuestionReplyEvent QuestionReplyEvent(self).fire(exclude=self.creator) def delete(self, *args, **kwargs): diff --git a/apps/questions/question_config.py b/kitsune/questions/question_config.py similarity index 100% rename from apps/questions/question_config.py rename to kitsune/questions/question_config.py diff --git a/apps/questions/tasks.py b/kitsune/questions/tasks.py similarity index 90% rename from apps/questions/tasks.py rename to kitsune/questions/tasks.py index 48e26baa55b..e621d08a5cd 100644 --- a/apps/questions/tasks.py +++ b/kitsune/questions/tasks.py @@ -7,11 +7,11 @@ from multidb.pinning import pin_this_thread, unpin_this_thread from statsd import statsd -from activity.models import Action -from questions import ANSWERS_PER_PAGE -from questions.karma_actions import AnswerAction, FirstAnswerAction -from search.es_utils import ES_EXCEPTIONS -from search.tasks import index_task +from kitsune.activity.models import Action +from kitsune.questions import ANSWERS_PER_PAGE +from kitsune.questions.karma_actions import AnswerAction, FirstAnswerAction +from kitsune.search.es_utils import ES_EXCEPTIONS +from kitsune.search.tasks import index_task log = logging.getLogger('k.task') @@ -19,7 +19,7 @@ @task(rate_limit='1/s') def update_question_votes(question_id): - from questions.models import Question + from kitsune.questions.models import Question log.debug('Got a new QuestionVote for question_id=%s.' % question_id) statsd.incr('questions.tasks.update') @@ -77,8 +77,8 @@ def update_question_vote_chunk(data): try: # Fetch all the documents we need to update. - from questions.models import QuestionMappingType - from search import es_utils + from kitsune.questions.models import QuestionMappingType + from kitsune.search import es_utils es_docs = es_utils.get_documents(QuestionMappingType, data) # For each document, update the data and stick it back in the @@ -139,7 +139,7 @@ def log_answer(answer): # Record karma actions AnswerAction(answer.creator, answer.created.date()).save() try: - from questions.models import Answer + from kitsune.questions.models import Answer answers = Answer.uncached.filter(question=answer.question_id) if answer == answers.order_by('created')[0]: FirstAnswerAction(answer.creator, answer.created.date()).save() diff --git a/apps/questions/templates/questions/activate_watch.html b/kitsune/questions/templates/questions/activate_watch.html similarity index 100% rename from apps/questions/templates/questions/activate_watch.html rename to kitsune/questions/templates/questions/activate_watch.html diff --git a/apps/questions/templates/questions/answers.html b/kitsune/questions/templates/questions/answers.html similarity index 99% rename from apps/questions/templates/questions/answers.html rename to kitsune/questions/templates/questions/answers.html index be12b6e028b..3ac3a17a2e4 100644 --- a/apps/questions/templates/questions/answers.html +++ b/kitsune/questions/templates/questions/answers.html @@ -34,7 +34,7 @@

{{ _('Support Forum') }}

{% if question.is_locked %} {% endif %} diff --git a/apps/questions/templates/questions/base.html b/kitsune/questions/templates/questions/base.html similarity index 100% rename from apps/questions/templates/questions/base.html rename to kitsune/questions/templates/questions/base.html diff --git a/apps/questions/templates/questions/confirm_answer_delete.html b/kitsune/questions/templates/questions/confirm_answer_delete.html similarity index 100% rename from apps/questions/templates/questions/confirm_answer_delete.html rename to kitsune/questions/templates/questions/confirm_answer_delete.html diff --git a/apps/questions/templates/questions/confirm_email.html b/kitsune/questions/templates/questions/confirm_email.html similarity index 100% rename from apps/questions/templates/questions/confirm_email.html rename to kitsune/questions/templates/questions/confirm_email.html diff --git a/apps/questions/templates/questions/confirm_question_delete.html b/kitsune/questions/templates/questions/confirm_question_delete.html similarity index 100% rename from apps/questions/templates/questions/confirm_question_delete.html rename to kitsune/questions/templates/questions/confirm_question_delete.html diff --git a/apps/questions/templates/questions/edit_answer.html b/kitsune/questions/templates/questions/edit_answer.html similarity index 100% rename from apps/questions/templates/questions/edit_answer.html rename to kitsune/questions/templates/questions/edit_answer.html diff --git a/apps/questions/templates/questions/edit_question.html b/kitsune/questions/templates/questions/edit_question.html similarity index 100% rename from apps/questions/templates/questions/edit_question.html rename to kitsune/questions/templates/questions/edit_question.html diff --git a/apps/questions/templates/questions/email/activate_watch.html b/kitsune/questions/templates/questions/email/activate_watch.html similarity index 100% rename from apps/questions/templates/questions/email/activate_watch.html rename to kitsune/questions/templates/questions/email/activate_watch.html diff --git a/apps/questions/templates/questions/email/activate_watch.ltxt b/kitsune/questions/templates/questions/email/activate_watch.ltxt similarity index 100% rename from apps/questions/templates/questions/email/activate_watch.ltxt rename to kitsune/questions/templates/questions/email/activate_watch.ltxt diff --git a/apps/questions/templates/questions/email/confirm_question.html b/kitsune/questions/templates/questions/email/confirm_question.html similarity index 100% rename from apps/questions/templates/questions/email/confirm_question.html rename to kitsune/questions/templates/questions/email/confirm_question.html diff --git a/apps/questions/templates/questions/email/confirm_question.ltxt b/kitsune/questions/templates/questions/email/confirm_question.ltxt similarity index 100% rename from apps/questions/templates/questions/email/confirm_question.ltxt rename to kitsune/questions/templates/questions/email/confirm_question.ltxt diff --git a/apps/questions/templates/questions/email/new_answer.html b/kitsune/questions/templates/questions/email/new_answer.html similarity index 100% rename from apps/questions/templates/questions/email/new_answer.html rename to kitsune/questions/templates/questions/email/new_answer.html diff --git a/apps/questions/templates/questions/email/new_answer.ltxt b/kitsune/questions/templates/questions/email/new_answer.ltxt similarity index 100% rename from apps/questions/templates/questions/email/new_answer.ltxt rename to kitsune/questions/templates/questions/email/new_answer.ltxt diff --git a/apps/questions/templates/questions/email/new_answer_to_asker.html b/kitsune/questions/templates/questions/email/new_answer_to_asker.html similarity index 100% rename from apps/questions/templates/questions/email/new_answer_to_asker.html rename to kitsune/questions/templates/questions/email/new_answer_to_asker.html diff --git a/apps/questions/templates/questions/email/new_answer_to_asker.ltxt b/kitsune/questions/templates/questions/email/new_answer_to_asker.ltxt similarity index 100% rename from apps/questions/templates/questions/email/new_answer_to_asker.ltxt rename to kitsune/questions/templates/questions/email/new_answer_to_asker.ltxt diff --git a/apps/questions/templates/questions/email/solution.html b/kitsune/questions/templates/questions/email/solution.html similarity index 100% rename from apps/questions/templates/questions/email/solution.html rename to kitsune/questions/templates/questions/email/solution.html diff --git a/apps/questions/templates/questions/email/solution.ltxt b/kitsune/questions/templates/questions/email/solution.ltxt similarity index 100% rename from apps/questions/templates/questions/email/solution.ltxt rename to kitsune/questions/templates/questions/email/solution.ltxt diff --git a/apps/questions/templates/questions/includes/aaq_macros.html b/kitsune/questions/templates/questions/includes/aaq_macros.html similarity index 100% rename from apps/questions/templates/questions/includes/aaq_macros.html rename to kitsune/questions/templates/questions/includes/aaq_macros.html diff --git a/apps/questions/templates/questions/includes/answer.html b/kitsune/questions/templates/questions/includes/answer.html similarity index 100% rename from apps/questions/templates/questions/includes/answer.html rename to kitsune/questions/templates/questions/includes/answer.html diff --git a/apps/questions/templates/questions/includes/answer_preview.html b/kitsune/questions/templates/questions/includes/answer_preview.html similarity index 100% rename from apps/questions/templates/questions/includes/answer_preview.html rename to kitsune/questions/templates/questions/includes/answer_preview.html diff --git a/apps/questions/templates/questions/includes/email_subscribe.html b/kitsune/questions/templates/questions/includes/email_subscribe.html similarity index 100% rename from apps/questions/templates/questions/includes/email_subscribe.html rename to kitsune/questions/templates/questions/includes/email_subscribe.html diff --git a/apps/questions/templates/questions/includes/have_problem.html b/kitsune/questions/templates/questions/includes/have_problem.html similarity index 100% rename from apps/questions/templates/questions/includes/have_problem.html rename to kitsune/questions/templates/questions/includes/have_problem.html diff --git a/apps/questions/templates/questions/includes/question_editing_frame.html b/kitsune/questions/templates/questions/includes/question_editing_frame.html similarity index 100% rename from apps/questions/templates/questions/includes/question_editing_frame.html rename to kitsune/questions/templates/questions/includes/question_editing_frame.html diff --git a/apps/questions/templates/questions/includes/question_vote_thanks.html b/kitsune/questions/templates/questions/includes/question_vote_thanks.html similarity index 100% rename from apps/questions/templates/questions/includes/question_vote_thanks.html rename to kitsune/questions/templates/questions/includes/question_vote_thanks.html diff --git a/apps/questions/templates/questions/includes/questions.html b/kitsune/questions/templates/questions/includes/questions.html similarity index 100% rename from apps/questions/templates/questions/includes/questions.html rename to kitsune/questions/templates/questions/includes/questions.html diff --git a/apps/questions/templates/questions/marketplace.html b/kitsune/questions/templates/questions/marketplace.html similarity index 100% rename from apps/questions/templates/questions/marketplace.html rename to kitsune/questions/templates/questions/marketplace.html diff --git a/apps/questions/templates/questions/marketplace_category.html b/kitsune/questions/templates/questions/marketplace_category.html similarity index 100% rename from apps/questions/templates/questions/marketplace_category.html rename to kitsune/questions/templates/questions/marketplace_category.html diff --git a/apps/questions/templates/questions/marketplace_success.html b/kitsune/questions/templates/questions/marketplace_success.html similarity index 100% rename from apps/questions/templates/questions/marketplace_success.html rename to kitsune/questions/templates/questions/marketplace_success.html diff --git a/apps/questions/templates/questions/mobile/answers.html b/kitsune/questions/templates/questions/mobile/answers.html similarity index 100% rename from apps/questions/templates/questions/mobile/answers.html rename to kitsune/questions/templates/questions/mobile/answers.html diff --git a/apps/questions/templates/questions/mobile/confirm_email.html b/kitsune/questions/templates/questions/mobile/confirm_email.html similarity index 100% rename from apps/questions/templates/questions/mobile/confirm_email.html rename to kitsune/questions/templates/questions/mobile/confirm_email.html diff --git a/apps/questions/templates/questions/mobile/marketplace.html b/kitsune/questions/templates/questions/mobile/marketplace.html similarity index 100% rename from apps/questions/templates/questions/mobile/marketplace.html rename to kitsune/questions/templates/questions/mobile/marketplace.html diff --git a/apps/questions/templates/questions/mobile/marketplace_category.html b/kitsune/questions/templates/questions/mobile/marketplace_category.html similarity index 100% rename from apps/questions/templates/questions/mobile/marketplace_category.html rename to kitsune/questions/templates/questions/mobile/marketplace_category.html diff --git a/apps/questions/templates/questions/mobile/marketplace_success.html b/kitsune/questions/templates/questions/mobile/marketplace_success.html similarity index 100% rename from apps/questions/templates/questions/mobile/marketplace_success.html rename to kitsune/questions/templates/questions/mobile/marketplace_success.html diff --git a/apps/questions/templates/questions/mobile/new_question.html b/kitsune/questions/templates/questions/mobile/new_question.html similarity index 100% rename from apps/questions/templates/questions/mobile/new_question.html rename to kitsune/questions/templates/questions/mobile/new_question.html diff --git a/apps/questions/templates/questions/mobile/new_question_login.html b/kitsune/questions/templates/questions/mobile/new_question_login.html similarity index 100% rename from apps/questions/templates/questions/mobile/new_question_login.html rename to kitsune/questions/templates/questions/mobile/new_question_login.html diff --git a/apps/questions/templates/questions/mobile/questions.html b/kitsune/questions/templates/questions/mobile/questions.html similarity index 100% rename from apps/questions/templates/questions/mobile/questions.html rename to kitsune/questions/templates/questions/mobile/questions.html diff --git a/apps/questions/templates/questions/new_question.html b/kitsune/questions/templates/questions/new_question.html similarity index 100% rename from apps/questions/templates/questions/new_question.html rename to kitsune/questions/templates/questions/new_question.html diff --git a/apps/questions/templates/questions/new_question_login.html b/kitsune/questions/templates/questions/new_question_login.html similarity index 100% rename from apps/questions/templates/questions/new_question_login.html rename to kitsune/questions/templates/questions/new_question_login.html diff --git a/apps/questions/templates/questions/questions.html b/kitsune/questions/templates/questions/questions.html similarity index 100% rename from apps/questions/templates/questions/questions.html rename to kitsune/questions/templates/questions/questions.html diff --git a/apps/questions/templates/questions/stats.html b/kitsune/questions/templates/questions/stats.html similarity index 100% rename from apps/questions/templates/questions/stats.html rename to kitsune/questions/templates/questions/stats.html diff --git a/apps/questions/templates/questions/unsubscribe_watch.html b/kitsune/questions/templates/questions/unsubscribe_watch.html similarity index 100% rename from apps/questions/templates/questions/unsubscribe_watch.html rename to kitsune/questions/templates/questions/unsubscribe_watch.html diff --git a/apps/questions/tests/__init__.py b/kitsune/questions/tests/__init__.py similarity index 92% rename from apps/questions/tests/__init__.py rename to kitsune/questions/tests/__init__.py index 61d6479338a..44c6ca94565 100644 --- a/apps/questions/tests/__init__.py +++ b/kitsune/questions/tests/__init__.py @@ -5,9 +5,10 @@ from nose.tools import eq_ -from questions.models import Question, QuestionVote, Answer, AnswerVote -from sumo.tests import LocalizingClient, TestCase, with_save -from users.tests import user, profile +from kitsune.questions.models import ( + Question, QuestionVote, Answer, AnswerVote) +from kitsune.sumo.tests import LocalizingClient, TestCase, with_save +from kitsune.users.tests import user, profile class TestCaseBase(TestCase): diff --git a/apps/questions/tests/test_es.py b/kitsune/questions/tests/test_es.py similarity index 95% rename from apps/questions/tests/test_es.py rename to kitsune/questions/tests/test_es.py index 27c42575775..eca0415fde4 100644 --- a/apps/questions/tests/test_es.py +++ b/kitsune/questions/tests/test_es.py @@ -1,10 +1,10 @@ from nose.tools import eq_ -from products.tests import product -from questions.models import Question, QuestionMappingType -from questions.tests import question, answer, answervote, questionvote -from search.tests.test_es import ElasticTestCase -from topics.tests import topic +from kitsune.products.tests import product +from kitsune.questions.models import Question, QuestionMappingType +from kitsune.questions.tests import question, answer, answervote, questionvote +from kitsune.search.tests.test_es import ElasticTestCase +from kitsune.topics.tests import topic class QuestionUpdateTests(ElasticTestCase): diff --git a/apps/questions/tests/test_feeds.py b/kitsune/questions/tests/test_feeds.py similarity index 87% rename from apps/questions/tests/test_feeds.py rename to kitsune/questions/tests/test_feeds.py index 033b1d9151a..3f2637448e5 100644 --- a/apps/questions/tests/test_feeds.py +++ b/kitsune/questions/tests/test_feeds.py @@ -4,14 +4,14 @@ from django.core.cache import cache from nose.tools import eq_ -from taggit.models import Tag from pyquery import PyQuery as pq +from taggit.models import Tag -from sumo.urlresolvers import reverse -from sumo.helpers import urlparams -from questions.feeds import QuestionsFeed, TaggedQuestionsFeed -from questions.models import Question -from questions.tests import TaggingTestCaseBase +from kitsune.sumo.urlresolvers import reverse +from kitsune.sumo.helpers import urlparams +from kitsune.questions.feeds import QuestionsFeed, TaggedQuestionsFeed +from kitsune.questions.models import Question +from kitsune.questions.tests import TaggingTestCaseBase class ForumTestFeedSorting(TaggingTestCaseBase): diff --git a/apps/questions/tests/test_forms.py b/kitsune/questions/tests/test_forms.py similarity index 95% rename from apps/questions/tests/test_forms.py rename to kitsune/questions/tests/test_forms.py index 5421621257e..0c6b620dabf 100644 --- a/apps/questions/tests/test_forms.py +++ b/kitsune/questions/tests/test_forms.py @@ -2,9 +2,9 @@ from nose.tools import eq_ -from questions.forms import NewQuestionForm, WatchQuestionForm -from questions.tests import TestCaseBase -from users.tests import user +from kitsune.questions.forms import NewQuestionForm, WatchQuestionForm +from kitsune.questions.tests import TestCaseBase +from kitsune.users.tests import user class WatchQuestionFormTests(TestCaseBase): diff --git a/apps/questions/tests/test_karma.py b/kitsune/questions/tests/test_karma.py similarity index 88% rename from apps/questions/tests/test_karma.py rename to kitsune/questions/tests/test_karma.py index a04955ec298..1a9b92cacb8 100644 --- a/apps/questions/tests/test_karma.py +++ b/kitsune/questions/tests/test_karma.py @@ -1,12 +1,12 @@ import mock -from questions.karma_actions import (AnswerAction, AnswerMarkedHelpfulAction, - AnswerMarkedNotHelpfulAction, - FirstAnswerAction, SolutionAction) -from questions.models import Question, Answer -from questions.tests import TestCaseBase -from sumo.tests import post -from users.tests import user +from kitsune.questions.karma_actions import ( + AnswerAction, AnswerMarkedHelpfulAction, AnswerMarkedNotHelpfulAction, + FirstAnswerAction, SolutionAction) +from kitsune.questions.models import Question, Answer +from kitsune.questions.tests import TestCaseBase +from kitsune.sumo.tests import post +from kitsune.users.tests import user class KarmaTests(TestCaseBase): diff --git a/apps/questions/tests/test_marketplace.py b/kitsune/questions/tests/test_marketplace.py similarity index 92% rename from apps/questions/tests/test_marketplace.py rename to kitsune/questions/tests/test_marketplace.py index 45918dbf0da..57b0ae0fb96 100644 --- a/apps/questions/tests/test_marketplace.py +++ b/kitsune/questions/tests/test_marketplace.py @@ -3,11 +3,11 @@ from pyquery import PyQuery as pq from zendesk import Zendesk -import questions -from questions.marketplace import submit_ticket -import questions.views -from sumo.tests import TestCase, LocalizingClient, get, post -from users.tests import user +import kitsune.questions.views +from kitsune import questions +from kitsune.questions.marketplace import submit_ticket +from kitsune.sumo.tests import TestCase, LocalizingClient, get, post +from kitsune.users.tests import user class MarketplaceAaqTests(TestCase): @@ -62,7 +62,7 @@ def test_account_category_anon(self): # One extra form field (email) in this case. eq_(5, len(doc('#question-form li'))) - @mock.patch.object(questions.views, 'submit_ticket') + @mock.patch.object(kitsune.questions.views, 'submit_ticket') def test_submit_ticket(self, submit_ticket): """Verify form post.""" subject = 'A new ticket' @@ -76,7 +76,7 @@ def test_submit_ticket(self, submit_ticket): eq_(200, response.status_code) submit_ticket.assert_called_with(self.user.email, cat, subject, body) - @mock.patch.object(questions.views, 'submit_ticket') + @mock.patch.object(kitsune.questions.views, 'submit_ticket') def test_submit_ticket_anon(self, submit_ticket): """Verify form post from unauth'd user.""" email = 'foo@bar.com' diff --git a/apps/questions/tests/test_models.py b/kitsune/questions/tests/test_models.py similarity index 94% rename from apps/questions/tests/test_models.py rename to kitsune/questions/tests/test_models.py index 29b994d87f7..7e7ef301281 100644 --- a/apps/questions/tests/test_models.py +++ b/kitsune/questions/tests/test_models.py @@ -5,30 +5,31 @@ from django.db.models import Q import mock +import waffle from nose import SkipTest from nose.tools import eq_, raises from taggit.models import Tag -import waffle -import sumo.models -from flagit.models import FlaggedObject -from karma.manager import KarmaManager -from sumo.redis_utils import RedisError, redis_client -from questions.cron import auto_lock_old_questions -from questions.events import QuestionReplyEvent -from questions.karma_actions import SolutionAction, AnswerAction -from questions.models import (Answer, Question, QuestionMetaData, QuestionVisits, - _tenths_version, _has_beta, user_num_questions, - user_num_answers, user_num_solutions) -from questions.tasks import update_answer_pages -from questions.tests import (TestCaseBase, TaggingTestCaseBase, tags_eq, - question, answer) -from questions.question_config import products -from sumo import googleanalytics -from sumo.tests import TestCase -from tags.utils import add_existing_tag -from users.tests import user -from wiki.tests import translated_revision +import kitsune.sumo.models +from kitsune.flagit.models import FlaggedObject +from kitsune.karma.manager import KarmaManager +from kitsune.sumo.redis_utils import RedisError, redis_client +from kitsune.questions.cron import auto_lock_old_questions +from kitsune.questions.events import QuestionReplyEvent +from kitsune.questions.karma_actions import SolutionAction, AnswerAction +from kitsune.questions.models import ( + Answer, Question, QuestionMetaData, QuestionVisits, + _tenths_version, _has_beta, user_num_questions, + user_num_answers, user_num_solutions) +from kitsune.questions.tasks import update_answer_pages +from kitsune.questions.tests import ( + TestCaseBase, TaggingTestCaseBase, tags_eq, question, answer) +from kitsune.questions.question_config import products +from kitsune.sumo import googleanalytics +from kitsune.sumo.tests import TestCase +from kitsune.tags.utils import add_existing_tag +from kitsune.users.tests import user +from kitsune.wiki.tests import translated_revision class TestAnswer(TestCaseBase): @@ -325,7 +326,8 @@ def test_default_manager(self): This is easy to get wrong when mixing in taggability. """ - eq_(Question._default_manager.__class__, sumo.models.ManagerBase) + eq_(Question._default_manager.__class__, + kitsune.sumo.models.ManagerBase) def test_notification_created(self): """Creating a new question auto-watches it for answers.""" diff --git a/apps/questions/tests/test_notifications.py b/kitsune/questions/tests/test_notifications.py similarity index 97% rename from apps/questions/tests/test_notifications.py rename to kitsune/questions/tests/test_notifications.py index 7fe6240ea8e..774f56702a6 100644 --- a/apps/questions/tests/test_notifications.py +++ b/kitsune/questions/tests/test_notifications.py @@ -6,12 +6,12 @@ import mock from nose.tools import eq_ -from questions.events import QuestionReplyEvent, QuestionSolvedEvent -from questions.models import Question, Answer -from questions.tests import TestCaseBase -from sumo.tests import post, attrs_eq, starts_with -from users.models import Setting -from users.tests import user +from kitsune.questions.events import QuestionReplyEvent, QuestionSolvedEvent +from kitsune.questions.models import Question, Answer +from kitsune.questions.tests import TestCaseBase +from kitsune.sumo.tests import post, attrs_eq, starts_with +from kitsune.users.models import Setting +from kitsune.users.tests import user # These mails are generated using reverse() calls, which return different diff --git a/apps/questions/tests/test_tasks.py b/kitsune/questions/tests/test_tasks.py similarity index 88% rename from apps/questions/tests/test_tasks.py rename to kitsune/questions/tests/test_tasks.py index 547a7f6db34..f5856cebd78 100644 --- a/apps/questions/tests/test_tasks.py +++ b/kitsune/questions/tests/test_tasks.py @@ -3,11 +3,11 @@ from nose.tools import eq_ -from activity.models import Action -from questions.models import (Question, QuestionVote, send_vote_update_task, - Answer) -from questions.tasks import update_question_vote_chunk -from sumo.tests import TestCase +from kitsune.activity.models import Action +from kitsune.questions.models import ( + Question, QuestionVote, send_vote_update_task, Answer) +from kitsune.questions.tasks import update_question_vote_chunk +from kitsune.sumo.tests import TestCase class QuestionVoteTestCase(TestCase): diff --git a/apps/questions/tests/test_templates.py b/kitsune/questions/tests/test_templates.py similarity index 98% rename from apps/questions/tests/test_templates.py rename to kitsune/questions/tests/test_templates.py index 88c7d794dd3..aa368bf5fb7 100644 --- a/apps/questions/tests/test_templates.py +++ b/kitsune/questions/tests/test_templates.py @@ -14,21 +14,22 @@ from pyquery import PyQuery as pq from tidings.models import Watch -from products.tests import product -from questions.events import QuestionReplyEvent, QuestionSolvedEvent -from questions.models import Question, Answer, VoteMetadata -from questions.tests import (TestCaseBase, TaggingTestCaseBase, tags_eq, - question, answer, questionvote) -from questions.views import UNAPPROVED_TAG, NO_TAG -from questions.cron import cache_top_contributors -from sumo.helpers import urlparams -from sumo.tests import (get, post, attrs_eq, emailmessage_raise_smtp, TestCase, - LocalizingClient) -from sumo.urlresolvers import reverse -from topics.tests import topic -from upload.models import ImageAttachment -from users.models import RegistrationProfile -from users.tests import user, add_permission +from kitsune.products.tests import product +from kitsune.questions.events import QuestionReplyEvent, QuestionSolvedEvent +from kitsune.questions.models import Question, Answer, VoteMetadata +from kitsune.questions.tests import ( + TestCaseBase, TaggingTestCaseBase, tags_eq, question, answer, + questionvote) +from kitsune.questions.views import UNAPPROVED_TAG, NO_TAG +from kitsune.questions.cron import cache_top_contributors +from kitsune.sumo.helpers import urlparams +from kitsune.sumo.tests import ( + get, post, attrs_eq, emailmessage_raise_smtp, TestCase, LocalizingClient) +from kitsune.sumo.urlresolvers import reverse +from kitsune.topics.tests import topic +from kitsune.upload.models import ImageAttachment +from kitsune.users.models import RegistrationProfile +from kitsune.users.tests import user, add_permission class AnswersTemplateTestCase(TestCaseBase): @@ -65,7 +66,7 @@ def test_answer(self): def test_answer_upload(self): """Posting answer attaches an existing uploaded image to the answer.""" - f = open('apps/upload/tests/media/test.jpg') + f = open('kitsune/upload/tests/media/test.jpg') post(self.client, 'upload.up_image_async', {'image': f}, args=['questions.Question', self.question.id]) f.close() diff --git a/apps/questions/tests/test_views.py b/kitsune/questions/tests/test_views.py similarity index 97% rename from apps/questions/tests/test_views.py rename to kitsune/questions/tests/test_views.py index a79ccbfdea6..cb1df2c95f5 100644 --- a/apps/questions/tests/test_views.py +++ b/kitsune/questions/tests/test_views.py @@ -10,18 +10,19 @@ from nose.tools import eq_ from pyquery import PyQuery as pq -from products.tests import product -from questions.models import Question, QuestionVote, AnswerVote, Answer -from questions.tests import answer, question -from questions.views import parse_troubleshooting -from search.tests.test_es import ElasticTestCase -from sumo.helpers import urlparams -from sumo.tests import (get, MobileTestCase, LocalizingClient, TestCase, - eq_msg) -from sumo.urlresolvers import reverse -from topics.tests import topic -from users.tests import user -from wiki.tests import document, revision +from kitsune.products.tests import product +from kitsune.questions.models import ( + Question, QuestionVote, AnswerVote, Answer) +from kitsune.questions.tests import answer, question +from kitsune.questions.views import parse_troubleshooting +from kitsune.search.tests.test_es import ElasticTestCase +from kitsune.sumo.helpers import urlparams +from kitsune.sumo.tests import ( + get, MobileTestCase, LocalizingClient, TestCase, eq_msg) +from kitsune.sumo.urlresolvers import reverse +from kitsune.topics.tests import topic +from kitsune.users.tests import user +from kitsune.wiki.tests import document, revision class AAQTests(ElasticTestCase): diff --git a/apps/questions/tests/test_votes.py b/kitsune/questions/tests/test_votes.py similarity index 86% rename from apps/questions/tests/test_votes.py rename to kitsune/questions/tests/test_votes.py index 39487949f14..1c20075e29c 100644 --- a/apps/questions/tests/test_votes.py +++ b/kitsune/questions/tests/test_votes.py @@ -1,9 +1,10 @@ from nose.tools import eq_ -from questions.models import Question, QuestionMappingType, QuestionVote -from questions.tests import TestCaseBase, question, questionvote -from questions.cron import update_weekly_votes -from search.tests.test_es import ElasticTestCase +from kitsune.questions.models import ( + Question, QuestionMappingType, QuestionVote) +from kitsune.questions.tests import TestCaseBase, question, questionvote +from kitsune.questions.cron import update_weekly_votes +from kitsune.search.tests.test_es import ElasticTestCase class TestVotes(TestCaseBase): diff --git a/apps/questions/urls.py b/kitsune/questions/urls.py similarity index 94% rename from apps/questions/urls.py rename to kitsune/questions/urls.py index 239603c2eac..84042315a38 100644 --- a/apps/questions/urls.py +++ b/kitsune/questions/urls.py @@ -1,12 +1,13 @@ from django.conf.urls import patterns, url from django.contrib.contenttypes.models import ContentType -from questions.feeds import QuestionsFeed, AnswersFeed, TaggedQuestionsFeed -from questions.models import Question, Answer -from flagit import views as flagit_views +from kitsune.questions.feeds import ( + QuestionsFeed, AnswersFeed, TaggedQuestionsFeed) +from kitsune.questions.models import Question, Answer +from kitsune.flagit import views as flagit_views -urlpatterns = patterns('questions.views', +urlpatterns = patterns('kitsune.questions.views', url(r'^$', 'questions', name='questions.questions'), url(r'^/answer-preview-async$', 'answer_preview_async', name='questions.answer_preview_async'), diff --git a/apps/questions/views.py b/kitsune/questions/views.py similarity index 96% rename from apps/questions/views.py rename to kitsune/questions/views.py index 81de66bcb1e..9630b31fee0 100644 --- a/apps/questions/views.py +++ b/kitsune/questions/views.py @@ -33,37 +33,39 @@ from tidings.models import Watch from tower import ugettext as _, ugettext_lazy as _lazy -from access.decorators import (has_perm_or_owns_or_403, permission_required, - login_required) -from karma.manager import KarmaManager -from products.models import Product -import questions as constants -from questions.events import QuestionReplyEvent, QuestionSolvedEvent -from questions.feeds import QuestionsFeed, AnswersFeed, TaggedQuestionsFeed -from questions.forms import (NewQuestionForm, EditQuestionForm, AnswerForm, - WatchQuestionForm, FREQUENCY_CHOICES, - MarketplaceAaqForm, StatsForm) -from questions.karma_actions import (SolutionAction, AnswerMarkedHelpfulAction, - AnswerMarkedNotHelpfulAction) -from questions.marketplace import (MARKETPLACE_CATEGORIES, submit_ticket, - ZendeskError) -from questions.models import (Question, Answer, QuestionVote, AnswerVote, - QuestionMappingType) -from questions.question_config import products -from search.utils import locale_or_default, clean_excerpt -from search.es_utils import ES_EXCEPTIONS, Sphilastic, F -from sumo.helpers import urlparams -from sumo.urlresolvers import reverse -from sumo.utils import paginate, simple_paginate, build_paged_url, user_or_ip -from tags.utils import add_existing_tag -from topics.models import Topic -from upload.models import ImageAttachment -from upload.views import upload_imageattachment -from users.forms import RegisterForm -from users.models import Setting -from users.utils import handle_login, handle_register -from wiki.models import Document, DocumentMappingType -from wiki.facets import documents_for +from kitsune import questions as constants +from kitsune.access.decorators import ( + has_perm_or_owns_or_403, permission_required, login_required) +from kitsune.karma.manager import KarmaManager +from kitsune.products.models import Product +from kitsune.questions.events import QuestionReplyEvent, QuestionSolvedEvent +from kitsune.questions.feeds import ( + QuestionsFeed, AnswersFeed, TaggedQuestionsFeed) +from kitsune.questions.forms import ( + NewQuestionForm, EditQuestionForm, AnswerForm, WatchQuestionForm, + FREQUENCY_CHOICES, MarketplaceAaqForm, StatsForm) +from kitsune.questions.karma_actions import ( + SolutionAction, AnswerMarkedHelpfulAction, AnswerMarkedNotHelpfulAction) +from kitsune.questions.marketplace import ( + MARKETPLACE_CATEGORIES, submit_ticket, ZendeskError) +from kitsune.questions.models import ( + Question, Answer, QuestionVote, AnswerVote, QuestionMappingType) +from kitsune.questions.question_config import products +from kitsune.search.utils import locale_or_default, clean_excerpt +from kitsune.search.es_utils import ES_EXCEPTIONS, Sphilastic, F +from kitsune.sumo.helpers import urlparams +from kitsune.sumo.urlresolvers import reverse +from kitsune.sumo.utils import ( + paginate, simple_paginate, build_paged_url, user_or_ip) +from kitsune.tags.utils import add_existing_tag +from kitsune.topics.models import Topic +from kitsune.upload.models import ImageAttachment +from kitsune.upload.views import upload_imageattachment +from kitsune.users.forms import RegisterForm +from kitsune.users.models import Setting +from kitsune.users.utils import handle_login, handle_register +from kitsune.wiki.facets import documents_for +from kitsune.wiki.models import Document, DocumentMappingType log = logging.getLogger('k.questions') diff --git a/apps/search/__init__.py b/kitsune/search/__init__.py similarity index 100% rename from apps/search/__init__.py rename to kitsune/search/__init__.py diff --git a/apps/search/admin.py b/kitsune/search/admin.py similarity index 96% rename from apps/search/admin.py rename to kitsune/search/admin.py index 8545bc6e008..23a9ba0dff6 100644 --- a/apps/search/admin.py +++ b/kitsune/search/admin.py @@ -10,15 +10,15 @@ from django.http import HttpResponseRedirect, Http404 from django.shortcuts import render -from search import es_utils -from search.es_utils import (get_doctype_stats, get_indexes, delete_index, - ES_EXCEPTIONS, get_indexable, CHUNK_SIZE, - recreate_index) -from search.models import Record, get_mapping_types -from search.tasks import OUTSTANDING_INDEX_CHUNKS, index_chunk_task -from search.utils import chunked, create_batch_id -from sumo.redis_utils import redis_client, RedisError -from wiki.models import Document, DocumentMappingType +from kitsune.search import es_utils +from kitsune.search.es_utils import ( + get_doctype_stats, get_indexes, delete_index, ES_EXCEPTIONS, + get_indexable, CHUNK_SIZE, recreate_index) +from kitsune.search.models import Record, get_mapping_types +from kitsune.search.tasks import OUTSTANDING_INDEX_CHUNKS, index_chunk_task +from kitsune.search.utils import chunked, create_batch_id +from kitsune.sumo.redis_utils import redis_client, RedisError +from kitsune.wiki.models import Document, DocumentMappingType log = logging.getLogger('k.es') diff --git a/apps/search/es_utils.py b/kitsune/search/es_utils.py similarity index 98% rename from apps/search/es_utils.py rename to kitsune/search/es_utils.py index 73a5fc648d6..ce60504c3d2 100644 --- a/apps/search/es_utils.py +++ b/kitsune/search/es_utils.py @@ -3,14 +3,14 @@ import pprint import time -import requests - from django.conf import settings from django.db import reset_queries +import requests from elasticutils.contrib.django import S, F, get_es, ES_EXCEPTIONS # noqa from pyelasticsearch.exceptions import ElasticHttpNotFoundError -from search.utils import chunked + +from kitsune.search.utils import chunked # Calculate index names. @@ -82,7 +82,7 @@ def process_query_mlt(self, key, val, action): def get_mappings(): mappings = {} - from search.models import get_mapping_types + from kitsune.search.models import get_mapping_types for cls in get_mapping_types(): mappings[cls.get_mapping_type_name()] = cls.get_mapping() @@ -120,7 +120,7 @@ def get_doctype_stats(index): """ stats = {} - from search.models import get_mapping_types + from kitsune.search.models import get_mapping_types for cls in get_mapping_types(): stats[cls.get_mapping_type_name()] = cls.search().count() @@ -191,7 +191,7 @@ def get_indexable(percent=100, mapping_types=None): :arg mapping_types: The list of mapping types to index. """ - from search.models import get_mapping_types + from kitsune.search.models import get_mapping_types # Note: Passing in None will get all the mapping types mapping_types = get_mapping_types(mapping_types) @@ -477,8 +477,8 @@ def es_search_cmd(query, pages=1, log=log): page search. """ - from sumo.tests import LocalizingClient - from sumo.urlresolvers import reverse + from kitsune.sumo.tests import LocalizingClient + from kitsune.sumo.urlresolvers import reverse client = LocalizingClient() diff --git a/apps/search/forms.py b/kitsune/search/forms.py similarity index 94% rename from apps/search/forms.py rename to kitsune/search/forms.py index 6b39c451b4f..026612bec02 100644 --- a/apps/search/forms.py +++ b/kitsune/search/forms.py @@ -6,13 +6,13 @@ from tower import ugettext_lazy as _lazy -import search as constants -from forums.models import Forum as DiscussionForum -from products.models import Product -from sumo.form_fields import TypedMultipleChoiceField -from sumo_locales import LOCALES -from topics.models import Topic -from wiki.config import CATEGORIES +from kitsune import search as constants +from kitsune.forums.models import Forum as DiscussionForum +from kitsune.lib.sumo_locales import LOCALES +from kitsune.products.models import Product +from kitsune.sumo.form_fields import TypedMultipleChoiceField +from kitsune.topics.models import Topic +from kitsune.wiki.config import CATEGORIES SEARCH_LANGUAGES = [(k, LOCALES[k].native) for diff --git a/apps/search/management/__init__.py b/kitsune/search/management/__init__.py similarity index 100% rename from apps/search/management/__init__.py rename to kitsune/search/management/__init__.py diff --git a/apps/search/management/commands/__init__.py b/kitsune/search/management/commands/__init__.py similarity index 100% rename from apps/search/management/commands/__init__.py rename to kitsune/search/management/commands/__init__.py diff --git a/apps/search/management/commands/esdelete.py b/kitsune/search/management/commands/esdelete.py similarity index 86% rename from apps/search/management/commands/esdelete.py rename to kitsune/search/management/commands/esdelete.py index 1871ebd8795..0ca6e68e239 100644 --- a/apps/search/management/commands/esdelete.py +++ b/kitsune/search/management/commands/esdelete.py @@ -2,8 +2,8 @@ from django.core.management.base import BaseCommand, CommandError -from search.es_utils import es_delete_cmd -from search.utils import FakeLogger +from kitsune.search.es_utils import es_delete_cmd +from kitsune.search.utils import FakeLogger class Command(BaseCommand): diff --git a/apps/search/management/commands/esreindex.py b/kitsune/search/management/commands/esreindex.py similarity index 95% rename from apps/search/management/commands/esreindex.py rename to kitsune/search/management/commands/esreindex.py index e0eda3566d9..de674bb08d7 100644 --- a/apps/search/management/commands/esreindex.py +++ b/kitsune/search/management/commands/esreindex.py @@ -3,8 +3,8 @@ from django.core.management.base import BaseCommand, CommandError from django.test.utils import override_settings -from search.es_utils import es_reindex_cmd -from search.utils import FakeLogger +from kitsune.search.es_utils import es_reindex_cmd +from kitsune.search.utils import FakeLogger class Command(BaseCommand): diff --git a/apps/search/management/commands/essearch.py b/kitsune/search/management/commands/essearch.py similarity index 87% rename from apps/search/management/commands/essearch.py rename to kitsune/search/management/commands/essearch.py index e38c92fc807..e03b6238ee7 100644 --- a/apps/search/management/commands/essearch.py +++ b/kitsune/search/management/commands/essearch.py @@ -2,8 +2,8 @@ from django.core.management.base import BaseCommand, CommandError -from search.es_utils import es_search_cmd -from search.utils import FakeLogger +from kitsune.search.es_utils import es_search_cmd +from kitsune.search.utils import FakeLogger class Command(BaseCommand): diff --git a/apps/search/management/commands/esstatus.py b/kitsune/search/management/commands/esstatus.py similarity index 82% rename from apps/search/management/commands/esstatus.py rename to kitsune/search/management/commands/esstatus.py index f99d0ce829e..36256fab873 100644 --- a/apps/search/management/commands/esstatus.py +++ b/kitsune/search/management/commands/esstatus.py @@ -2,8 +2,8 @@ from django.core.management.base import BaseCommand -from search.es_utils import es_status_cmd -from search.utils import FakeLogger +from kitsune.search.es_utils import es_status_cmd +from kitsune.search.utils import FakeLogger class Command(BaseCommand): diff --git a/apps/search/management/commands/esverify.py b/kitsune/search/management/commands/esverify.py similarity index 71% rename from apps/search/management/commands/esverify.py rename to kitsune/search/management/commands/esverify.py index c6ec794ccc9..61093629957 100644 --- a/apps/search/management/commands/esverify.py +++ b/kitsune/search/management/commands/esverify.py @@ -1,7 +1,7 @@ from django.core.management.base import BaseCommand -from search.es_utils import es_verify_cmd -from search.utils import FakeLogger +from kitsune.search.es_utils import es_verify_cmd +from kitsune.search.utils import FakeLogger class Command(BaseCommand): diff --git a/apps/search/models.py b/kitsune/search/models.py similarity index 98% rename from apps/search/models.py rename to kitsune/search/models.py index bf45839cfdb..f043de62cb3 100644 --- a/apps/search/models.py +++ b/kitsune/search/models.py @@ -10,9 +10,9 @@ from elasticutils.contrib.django import MappingType, Indexable, MLT from pyelasticsearch.exceptions import ElasticHttpNotFoundError -from search import es_utils -from search.tasks import index_task, unindex_task -from sumo.models import ModelBase +from kitsune.search import es_utils +from kitsune.search.tasks import index_task, unindex_task +from kitsune.sumo.models import ModelBase log = logging.getLogger('k.search.es') diff --git a/apps/search/tasks.py b/kitsune/search/tasks.py similarity index 96% rename from apps/search/tasks.py rename to kitsune/search/tasks.py index 3be7fbb3ca6..9fdaf6f6e66 100644 --- a/apps/search/tasks.py +++ b/kitsune/search/tasks.py @@ -7,8 +7,8 @@ from multidb.pinning import pin_this_thread, unpin_this_thread from statsd import statsd -from search.es_utils import index_chunk, UnindexMeBro -from sumo.redis_utils import redis_client, RedisError +from kitsune.search.es_utils import index_chunk, UnindexMeBro +from kitsune.sumo.redis_utils import redis_client, RedisError # This is present in memcached when reindexing is in progress and @@ -55,7 +55,7 @@ def index_chunk_task(write_index, batch_id, chunk): :arg chunk: a (class, id_list) of things to index """ # Need to import Record here to prevent circular import - from search.models import Record + from kitsune.search.models import Record cls, id_list = chunk diff --git a/apps/search/templates/admin/search_index.html b/kitsune/search/templates/admin/search_index.html similarity index 100% rename from apps/search/templates/admin/search_index.html rename to kitsune/search/templates/admin/search_index.html diff --git a/apps/search/templates/admin/search_maintenance.html b/kitsune/search/templates/admin/search_maintenance.html similarity index 100% rename from apps/search/templates/admin/search_maintenance.html rename to kitsune/search/templates/admin/search_maintenance.html diff --git a/apps/search/templates/admin/search_mapping.html b/kitsune/search/templates/admin/search_mapping.html similarity index 100% rename from apps/search/templates/admin/search_mapping.html rename to kitsune/search/templates/admin/search_mapping.html diff --git a/apps/search/templates/admin/search_troubleshooting.html b/kitsune/search/templates/admin/search_troubleshooting.html similarity index 100% rename from apps/search/templates/admin/search_troubleshooting.html rename to kitsune/search/templates/admin/search_troubleshooting.html diff --git a/apps/search/templates/search/base.html b/kitsune/search/templates/search/base.html similarity index 100% rename from apps/search/templates/search/base.html rename to kitsune/search/templates/search/base.html diff --git a/apps/search/templates/search/basic-form.html b/kitsune/search/templates/search/basic-form.html similarity index 100% rename from apps/search/templates/search/basic-form.html rename to kitsune/search/templates/search/basic-form.html diff --git a/apps/search/templates/search/down.html b/kitsune/search/templates/search/down.html similarity index 100% rename from apps/search/templates/search/down.html rename to kitsune/search/templates/search/down.html diff --git a/apps/search/templates/search/form.html b/kitsune/search/templates/search/form.html similarity index 100% rename from apps/search/templates/search/form.html rename to kitsune/search/templates/search/form.html diff --git a/apps/search/templates/search/includes/macros.html b/kitsune/search/templates/search/includes/macros.html similarity index 100% rename from apps/search/templates/search/includes/macros.html rename to kitsune/search/templates/search/includes/macros.html diff --git a/apps/search/templates/search/includes/result.html b/kitsune/search/templates/search/includes/result.html similarity index 100% rename from apps/search/templates/search/includes/result.html rename to kitsune/search/templates/search/includes/result.html diff --git a/apps/search/templates/search/mobile/down.html b/kitsune/search/templates/search/mobile/down.html similarity index 100% rename from apps/search/templates/search/mobile/down.html rename to kitsune/search/templates/search/mobile/down.html diff --git a/apps/search/templates/search/mobile/results.html b/kitsune/search/templates/search/mobile/results.html similarity index 100% rename from apps/search/templates/search/mobile/results.html rename to kitsune/search/templates/search/mobile/results.html diff --git a/apps/search/templates/search/plugin.html b/kitsune/search/templates/search/plugin.html similarity index 100% rename from apps/search/templates/search/plugin.html rename to kitsune/search/templates/search/plugin.html diff --git a/apps/search/templates/search/results.html b/kitsune/search/templates/search/results.html similarity index 100% rename from apps/search/templates/search/results.html rename to kitsune/search/templates/search/results.html diff --git a/apps/search/tests/__init__.py b/kitsune/search/tests/__init__.py similarity index 92% rename from apps/search/tests/__init__.py rename to kitsune/search/tests/__init__.py index 9c575a15f5d..d6d29b9e8c9 100644 --- a/apps/search/tests/__init__.py +++ b/kitsune/search/tests/__init__.py @@ -6,8 +6,8 @@ from nose import SkipTest from test_utils import TestCase -from search import es_utils -from search.models import generate_tasks +from kitsune.search import es_utils +from kitsune.search.models import generate_tasks # Dummy request for passing to question_searcher() and brethren. @@ -75,13 +75,13 @@ def refresh(self, run_tasks=True): def reindex_and_refresh(self): """Reindexes anything in the db""" - from search.es_utils import es_reindex_cmd + from kitsune.search.es_utils import es_reindex_cmd es_reindex_cmd() self.refresh(run_tasks=False) def setup_indexes(self, empty=False, wait=True): """(Re-)create WRITE_INDEX""" - from search.es_utils import recreate_index + from kitsune.search.es_utils import recreate_index recreate_index() get_es().health(wait_for_status='yellow') diff --git a/apps/search/tests/test__utils.py b/kitsune/search/tests/test__utils.py similarity index 96% rename from apps/search/tests/test__utils.py rename to kitsune/search/tests/test__utils.py index 2904242600a..02f4e8cc67e 100644 --- a/apps/search/tests/test__utils.py +++ b/kitsune/search/tests/test__utils.py @@ -1,7 +1,7 @@ from nose.tools import eq_ -from search.utils import ComposedList, chunked -from sumo.tests import TestCase +from kitsune.search.utils import ComposedList, chunked +from kitsune.sumo.tests import TestCase class TestComposedList(TestCase): diff --git a/apps/search/tests/test_cmds.py b/kitsune/search/tests/test_cmds.py similarity index 89% rename from apps/search/tests/test_cmds.py rename to kitsune/search/tests/test_cmds.py index a450d02d363..53464294110 100644 --- a/apps/search/tests/test_cmds.py +++ b/kitsune/search/tests/test_cmds.py @@ -1,11 +1,12 @@ from django.core.management import call_command import mock -from products.tests import product -from search import es_utils -from search.tests import ElasticTestCase -from search.utils import FakeLogger -from wiki.tests import document, revision + +from kitsune.products.tests import product +from kitsune.search import es_utils +from kitsune.search.tests import ElasticTestCase +from kitsune.search.utils import FakeLogger +from kitsune.wiki.tests import document, revision class ESCommandTests(ElasticTestCase): diff --git a/apps/search/tests/test_es.py b/kitsune/search/tests/test_es.py similarity index 97% rename from apps/search/tests/test_es.py rename to kitsune/search/tests/test_es.py index 47ecc708df1..2229178e619 100644 --- a/apps/search/tests/test_es.py +++ b/kitsune/search/tests/test_es.py @@ -11,19 +11,19 @@ from nose.tools import eq_ from pyquery import PyQuery as pq -import search as constants -from forums.tests import forum, thread, post -from products.tests import product -from questions.models import Question, QuestionMappingType -from questions.tests import question, answer, answervote, questionvote -from search import es_utils -from search.models import generate_tasks -from search.tests import ElasticTestCase -from sumo.tests import LocalizingClient -from sumo.urlresolvers import reverse -from topics.tests import topic -from users.tests import user -from wiki.tests import document, revision, helpful_vote +from kitsune import search as constants +from kitsune.forums.tests import forum, thread, post +from kitsune.products.tests import product +from kitsune.questions.models import Question, QuestionMappingType +from kitsune.questions.tests import question, answer, answervote, questionvote +from kitsune.search import es_utils +from kitsune.search.models import generate_tasks +from kitsune.search.tests import ElasticTestCase +from kitsune.sumo.tests import LocalizingClient +from kitsune.sumo.urlresolvers import reverse +from kitsune.topics.tests import topic +from kitsune.users.tests import user +from kitsune.wiki.tests import document, revision, helpful_vote class ElasticSearchViewPagingTests(ElasticTestCase): @@ -822,17 +822,17 @@ def test_discussion_filter_forum(self): thread2 = thread(forum=forum2, title=u'audio 2', save=True) post(thread=thread2, save=True) - import search.forms - reload(search.forms) - import search.views - import search.forms - search.views.SearchForm = search.forms.SearchForm + import kitsune.search.forms + reload(kitsune.search.forms) + import kitsune.search.views + import kitsune.search.forms + kitsune.search.views.SearchForm = kitsune.search.forms.SearchForm # Wait... reload? WTF is that about? What's going on here is # that SearchForm pulls the list of forums from the db **at # module load time**. Since we need it to include the two # forums we just created, we need to reload the module and - # rebind it in search.views. Otherwise when we go to get + # rebind it in kitsune.search.views. Otherwise when we go to get # cleaned_data from it, it ditches the forum data we so # lovingly put in our querystring and then our filters are # wrong and then this test FAILS. diff --git a/apps/search/tests/test_json.py b/kitsune/search/tests/test_json.py similarity index 91% rename from apps/search/tests/test_json.py rename to kitsune/search/tests/test_json.py index 86769b9f2fe..7f2e2602893 100644 --- a/apps/search/tests/test_json.py +++ b/kitsune/search/tests/test_json.py @@ -1,9 +1,8 @@ from nose.tools import eq_ -from sumo.urlresolvers import reverse -from sumo.tests import TestCase, LocalizingClient - -from search.tests.test_es import ElasticTestCase +from kitsune.search.tests.test_es import ElasticTestCase +from kitsune.sumo.urlresolvers import reverse +from kitsune.sumo.tests import TestCase, LocalizingClient class JSONTest(ElasticTestCase): diff --git a/apps/search/tests/test_plugin.py b/kitsune/search/tests/test_plugin.py similarity index 93% rename from apps/search/tests/test_plugin.py rename to kitsune/search/tests/test_plugin.py index 3ebaf9b75cf..106d5355709 100644 --- a/apps/search/tests/test_plugin.py +++ b/kitsune/search/tests/test_plugin.py @@ -3,8 +3,8 @@ import mock from nose.tools import eq_ -from sumo.tests import TestCase -from sumo.urlresolvers import reverse +from kitsune.sumo.tests import TestCase +from kitsune.sumo.urlresolvers import reverse class OpenSearchTestCase(TestCase): diff --git a/apps/search/tests/test_search.py b/kitsune/search/tests/test_search.py similarity index 93% rename from apps/search/tests/test_search.py rename to kitsune/search/tests/test_search.py index 343d556e3ce..473fdd8d68a 100644 --- a/apps/search/tests/test_search.py +++ b/kitsune/search/tests/test_search.py @@ -9,12 +9,12 @@ from nose.tools import eq_ from pyquery import PyQuery as pq -from products.tests import product -from questions.tests import question, answer, answervote -from search.tests.test_es import ElasticTestCase -from sumo.tests import LocalizingClient -from sumo.urlresolvers import reverse -from wiki.tests import document, revision +from kitsune.products.tests import product +from kitsune.questions.tests import question, answer, answervote +from kitsune.search.tests.test_es import ElasticTestCase +from kitsune.sumo.tests import LocalizingClient +from kitsune.sumo.urlresolvers import reverse +from kitsune.wiki.tests import document, revision def render(s, context): diff --git a/apps/search/urls.py b/kitsune/search/urls.py similarity index 81% rename from apps/search/urls.py rename to kitsune/search/urls.py index 5c62dbae45f..e4bc7563aac 100644 --- a/apps/search/urls.py +++ b/kitsune/search/urls.py @@ -1,7 +1,7 @@ from django.conf.urls import patterns, url -urlpatterns = patterns('search.views', +urlpatterns = patterns('kitsune.search.views', url(r'^$', 'search', name='search'), url(r'^/xml$', 'plugin', name='search.plugin'), url(r'^/suggestions$', 'suggestions', name='search.suggestions'), diff --git a/apps/search/utils.py b/kitsune/search/utils.py similarity index 99% rename from apps/search/utils.py rename to kitsune/search/utils.py index 020db2903c8..8976da855c4 100644 --- a/apps/search/utils.py +++ b/kitsune/search/utils.py @@ -2,11 +2,11 @@ import time from itertools import islice -import bleach - from django.conf import settings -from sumo_locales import LOCALES +import bleach + +from kitsune.lib.sumo_locales import LOCALES call = lambda x: subprocess.Popen(x, stdout=subprocess.PIPE).communicate() diff --git a/apps/search/views.py b/kitsune/search/views.py similarity index 96% rename from apps/search/views.py rename to kitsune/search/views.py index f3838535cea..5bc3e0357d5 100644 --- a/apps/search/views.py +++ b/kitsune/search/views.py @@ -1,8 +1,8 @@ -from datetime import datetime, timedelta -from itertools import chain import json import re import time +from datetime import datetime, timedelta +from itertools import chain from django.conf import settings from django.contrib.sites.models import Site @@ -20,18 +20,18 @@ from statsd import statsd from tower import ugettext as _, ugettext_lazy as _lazy -from forums.models import ThreadMappingType -from products.models import Product -from search.models import get_mapping_types -from search.utils import locale_or_default, clean_excerpt, ComposedList -from questions.models import Question, QuestionMappingType -import search as constants -from search import es_utils -from search.forms import SearchForm -from search.es_utils import ES_EXCEPTIONS, Sphilastic, F -from sumo.utils import paginate, smart_int -from wiki.facets import documents_for -from wiki.models import Document, DocumentMappingType +from kitsune import search as constants +from kitsune.forums.models import ThreadMappingType +from kitsune.products.models import Product +from kitsune.questions.models import Question, QuestionMappingType +from kitsune.search.models import get_mapping_types +from kitsune.search.utils import locale_or_default, clean_excerpt, ComposedList +from kitsune.search import es_utils +from kitsune.search.forms import SearchForm +from kitsune.search.es_utils import ES_EXCEPTIONS, Sphilastic, F +from kitsune.sumo.utils import paginate, smart_int +from kitsune.wiki.facets import documents_for +from kitsune.wiki.models import Document, DocumentMappingType EXCERPT_JOINER = _lazy(u'...', 'between search excerpts') diff --git a/kitsune/settings.py b/kitsune/settings.py index 37c6cdb3079..d4942afbb8e 100644 --- a/kitsune/settings.py +++ b/kitsune/settings.py @@ -5,7 +5,7 @@ import platform from bundles import MINIFY_BUNDLES -from sumo_locales import LOCALES +from kitsune.lib.sumo_locales import LOCALES DEBUG = True TEMPLATE_DEBUG = DEBUG @@ -220,18 +220,18 @@ USE_L10N = True DB_LOCALIZE = { - 'karma': { + 'kitsune.karma': { 'Title': { 'attrs': ['name'], 'comments': ['This is a karma title.'], } }, - 'products': { + 'kitsune.products': { 'Product': { 'attrs': ['title', 'description'], } }, - 'topics': { + 'kitsune.topics': { 'Topic': { 'attrs': ['title', 'description'], } @@ -261,7 +261,7 @@ STATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', - 'sumo.static_finders.WTFinder') + 'kitsune.sumo.static_finders.WTFinder') # Paths that don't require a locale prefix. SUPPORTED_NONLOCALES = ('media', 'admin', 'robots.txt', 'services', '1', @@ -285,7 +285,7 @@ 'admin', 'adminplus', 'authority', - 'kadmin', + 'kitsune.kadmin', 'waffle', ] @@ -299,11 +299,11 @@ 'django.contrib.messages.context_processors.messages', - 'sumo.context_processors.global_settings', - 'sumo.context_processors.for_data', - 'sumo.context_processors.i18n', + 'kitsune.sumo.context_processors.global_settings', + 'kitsune.sumo.context_processors.for_data', + 'kitsune.sumo.context_processors.i18n', 'jingo_minify.helpers.build_ids', - 'messages.context_processors.unread_message_count', + 'kitsune.messages.context_processors.unread_message_count', ) MIDDLEWARE_CLASSES = ( @@ -327,24 +327,24 @@ # LocaleURLMiddleware must be before any middleware that uses # sumo.urlresolvers.reverse() to add locale prefixes to URLs: - 'sumo.middleware.LocaleURLMiddleware', + 'kitsune.sumo.middleware.LocaleURLMiddleware', # Mobile detection should happen in Zeus. 'mobility.middleware.DetectMobileMiddleware', 'mobility.middleware.XMobileMiddleware', - 'sumo.middleware.MobileSwitchMiddleware', + 'kitsune.sumo.middleware.MobileSwitchMiddleware', - 'sumo.middleware.Forbidden403Middleware', + 'kitsune.sumo.middleware.Forbidden403Middleware', 'django.middleware.common.CommonMiddleware', - 'sumo.middleware.RemoveSlashMiddleware', - 'inproduct.middleware.EuBuildMiddleware', - 'sumo.middleware.NoCacheHttpsMiddleware', + 'kitsune.sumo.middleware.RemoveSlashMiddleware', + 'kitsune.inproduct.middleware.EuBuildMiddleware', + 'kitsune.sumo.middleware.NoCacheHttpsMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', - 'sumo.anonymous.AnonymousIdentityMiddleware', + 'kitsune.sumo.anonymous.AnonymousIdentityMiddleware', 'session_csrf.CsrfMiddleware', - 'twitter.middleware.SessionMiddleware', - 'sumo.middleware.PlusToSpaceMiddleware', + 'kitsune.twitter.middleware.SessionMiddleware', + 'kitsune.sumo.middleware.PlusToSpaceMiddleware', 'commonware.middleware.ScrubRequestOnException', 'django_statsd.middleware.GraphiteRequestTimingMiddleware', 'waffle.middleware.WaffleMiddleware', @@ -366,7 +366,7 @@ ACCOUNT_ACTIVATION_DAYS = 30 PASSWORD_HASHERS = ( - 'users.hashers.SHA256PasswordHasher', + 'kitsune.users.hashers.SHA256PasswordHasher', ) USERNAME_BLACKLIST = path('kitsune', 'configs', 'username-blacklist.txt') @@ -377,7 +377,6 @@ # Put strings here, like "/home/html/django_templates" # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths. - path('kitsune', 'templates'), ) # TODO: Figure out why changing the order of apps (for example, moving @@ -390,45 +389,45 @@ 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', - 'users', + 'kitsune.users', 'tower', 'jingo_minify', 'authority', 'timezones', 'waffle', - 'access', - 'sumo', - 'search', - 'forums', + 'kitsune.access', + 'kitsune.sumo', + 'kitsune.search', + 'kitsune.forums', 'djcelery', 'cronjobs', 'tidings', - 'activity', - 'questions', + 'kitsune.activity', + 'kitsune.questions', 'adminplus', - 'kadmin', + 'kitsune.kadmin', 'taggit', - 'flagit', - 'upload', + 'kitsune.flagit', + 'kitsune.upload', 'product_details', - 'wiki', - 'kbforums', - 'dashboards', - 'gallery', - 'customercare', - 'twitter', - 'inproduct', - 'postcrash', - 'landings', - 'announcements', - 'messages', + 'kitsune.wiki', + 'kitsune.kbforums', + 'kitsune.dashboards', + 'kitsune.gallery', + 'kitsune.customercare', + 'kitsune.twitter', + 'kitsune.inproduct', + 'kitsune.postcrash', + 'kitsune.landings', + 'kitsune.announcements', + 'kitsune.messages', 'commonware.response.cookies', - 'groups', - 'karma', - 'tags', - 'kpi', - 'products', - 'topics', + 'kitsune.groups', + 'kitsune.karma', + 'kitsune.tags', + 'kitsune.kpi', + 'kitsune.products', + 'kitsune.topics', # App for Sentry: 'raven.contrib.django', @@ -478,18 +477,16 @@ def JINJA_CONFIG(): tower_python = 'tower.management.commands.extract.extract_tower_python' DOMAIN_METHODS = { 'messages': [ - ('apps/forums/**.py', 'ignore'), - ('apps/forums/**.html', 'ignore'), - ('apps/**/tests/**.py', 'ignore'), - ('apps/**/management/**.py', 'ignore'), - - ('apps/**.py', tower_python), - ('apps/**/templates/**.html', tower_tmpl), - ('templates/**.html', tower_tmpl), + ('kitsune/forums/**.py', 'ignore'), + ('kitsune/forums/**.html', 'ignore'), + ('kitsune/**/tests/**.py', 'ignore'), + ('kitsune/**/management/**.py', 'ignore'), + + ('kitsune/**.py', tower_python), + ('kitsune/**/templates/**.html', tower_tmpl), ], 'lhtml': [ - ('apps/forums/**.lhtml', 'ignore'), - ('apps/questions/**.lhtml', 'ignore'), + ('kitsune/forums/**.lhtml', 'ignore'), ('**/templates/**.lhtml', tower_tmpl) ], @@ -498,9 +495,10 @@ def JINJA_CONFIG(): ], 'javascript': [ # We can't say **.js because that would dive into any libraries. - ('media/js/*-all.js', 'ignore'), - ('media/js/*-min.js', 'ignore'), - ('media/js/*.js', 'javascript'), + ('kitsune/**/static/js/*-all.js', 'ignore'), + ('kitsune/**/static/js/*-min.js', 'ignore'), + + ('kitsune/**/static/js/*.js', 'javascript'), ], } @@ -569,7 +567,7 @@ def JINJA_CONFIG(): MAX_FILENAME_LENGTH = 200 MAX_FILEPATH_LENGTH = 250 # Default storage engine - ours does not preserve filenames -DEFAULT_FILE_STORAGE = 'upload.storage.RenameFileStorage' +DEFAULT_FILE_STORAGE = 'kitsune.upload.storage.RenameFileStorage' # Auth and permissions related constants LOGIN_URL = '/users/login' @@ -617,10 +615,10 @@ def read_only_mode(env): env['DATABASES']['default'] = env['DATABASES'][slave] # No sessions without the database, so disable auth. - env['AUTHENTICATION_BACKENDS'] = ('sumo.readonlyauth.ReadOnlyBackend',) + env['AUTHENTICATION_BACKENDS'] = ('kitsune.sumo.readonlyauth.ReadOnlyBackend',) # Add in the read-only middleware before csrf middleware. - extra = 'sumo.middleware.ReadOnlyMiddleware' + extra = 'kitsune.sumo.middleware.ReadOnlyMiddleware' before = 'session_csrf.CsrfMiddleware' m = list(env['MIDDLEWARE_CLASSES']) m.insert(m.index(before), extra) @@ -696,8 +694,8 @@ def read_only_mode(env): TIDINGS_FROM_ADDRESS = 'notifications@support.mozilla.org' # Anonymous watches must be confirmed. TIDINGS_CONFIRM_ANONYMOUS_WATCHES = True -TIDINGS_MODEL_BASE = 'sumo.models.ModelBase' -TIDINGS_REVERSE = 'sumo.urlresolvers.reverse' +TIDINGS_MODEL_BASE = 'kitsune.sumo.models.ModelBase' +TIDINGS_REVERSE = 'kitsune.sumo.urlresolvers.reverse' # Google Analytics settings. diff --git a/apps/sumo/__init__.py b/kitsune/sumo/__init__.py similarity index 80% rename from apps/sumo/__init__.py rename to kitsune/sumo/__init__.py index 1327c4af079..fa009ec6d4b 100644 --- a/apps/sumo/__init__.py +++ b/kitsune/sumo/__init__.py @@ -1,5 +1,5 @@ # Just importing monkeypatch does the trick - don't remove this line -from sumo import monkeypatch +from kitsune.sumo import monkeypatch class ProgrammingError(Exception): diff --git a/apps/sumo/admin.py b/kitsune/sumo/admin.py similarity index 100% rename from apps/sumo/admin.py rename to kitsune/sumo/admin.py diff --git a/apps/sumo/anonymous.py b/kitsune/sumo/anonymous.py similarity index 100% rename from apps/sumo/anonymous.py rename to kitsune/sumo/anonymous.py diff --git a/apps/sumo/context_processors.py b/kitsune/sumo/context_processors.py similarity index 89% rename from apps/sumo/context_processors.py rename to kitsune/sumo/context_processors.py index f46ece63afd..4f9d62a87dc 100644 --- a/apps/sumo/context_processors.py +++ b/kitsune/sumo/context_processors.py @@ -1,7 +1,7 @@ from django.conf import settings from django.utils import translation -from wiki.config import OPERATING_SYSTEMS, FIREFOX_VERSIONS +from kitsune.wiki.config import OPERATING_SYSTEMS, FIREFOX_VERSIONS def global_settings(request): diff --git a/apps/sumo/db_strings.py b/kitsune/sumo/db_strings.py similarity index 100% rename from apps/sumo/db_strings.py rename to kitsune/sumo/db_strings.py diff --git a/apps/sumo/decorators.py b/kitsune/sumo/decorators.py similarity index 100% rename from apps/sumo/decorators.py rename to kitsune/sumo/decorators.py diff --git a/apps/sumo/email_utils.py b/kitsune/sumo/email_utils.py similarity index 100% rename from apps/sumo/email_utils.py rename to kitsune/sumo/email_utils.py diff --git a/apps/sumo/fixtures/users.json b/kitsune/sumo/fixtures/users.json similarity index 100% rename from apps/sumo/fixtures/users.json rename to kitsune/sumo/fixtures/users.json diff --git a/apps/sumo/form_fields.py b/kitsune/sumo/form_fields.py similarity index 100% rename from apps/sumo/form_fields.py rename to kitsune/sumo/form_fields.py diff --git a/apps/sumo/googleanalytics.py b/kitsune/sumo/googleanalytics.py similarity index 98% rename from apps/sumo/googleanalytics.py rename to kitsune/sumo/googleanalytics.py index 125df479cef..eabbf0946d1 100644 --- a/apps/sumo/googleanalytics.py +++ b/kitsune/sumo/googleanalytics.py @@ -9,8 +9,8 @@ from apiclient.errors import HttpError from oauth2client.client import SignedJwtAssertionCredentials -from questions.models import Question -from wiki.models import Document +from kitsune.questions.models import Question +from kitsune.wiki.models import Document log = logging.getLogger('k.googleanalytics') diff --git a/apps/sumo/helpers.py b/kitsune/sumo/helpers.py similarity index 98% rename from apps/sumo/helpers.py rename to kitsune/sumo/helpers.py index 1301e4f0670..7d205ce9b08 100644 --- a/apps/sumo/helpers.py +++ b/kitsune/sumo/helpers.py @@ -19,9 +19,9 @@ from pytz import timezone from tower import ugettext_lazy as _lazy, ugettext as _, ungettext -import sumo.parser -from sumo.urlresolvers import reverse -from users.models import Profile +from kitsune.sumo import parser +from kitsune.sumo.urlresolvers import reverse +from kitsune.users.models import Profile class DateTimeFormatError(Exception): @@ -104,7 +104,7 @@ def urlparams(url_, hash=None, query_dict=None, **query): def wiki_to_html(wiki_markup, locale=settings.WIKI_DEFAULT_LANGUAGE, nofollow=True): """Wiki Markup -> HTML jinja2.Markup object""" - return jinja2.Markup(sumo.parser.wiki_to_html(wiki_markup, locale=locale, + return jinja2.Markup(parser.wiki_to_html(wiki_markup, locale=locale, nofollow=nofollow)) diff --git a/apps/sumo/management/__init__.py b/kitsune/sumo/management/__init__.py similarity index 100% rename from apps/sumo/management/__init__.py rename to kitsune/sumo/management/__init__.py diff --git a/apps/sumo/management/commands/__init__.py b/kitsune/sumo/management/commands/__init__.py similarity index 100% rename from apps/sumo/management/commands/__init__.py rename to kitsune/sumo/management/commands/__init__.py diff --git a/apps/sumo/management/commands/anonymize.py b/kitsune/sumo/management/commands/anonymize.py similarity index 91% rename from apps/sumo/management/commands/anonymize.py rename to kitsune/sumo/management/commands/anonymize.py index 1c972808e7a..2160c917ef4 100644 --- a/apps/sumo/management/commands/anonymize.py +++ b/kitsune/sumo/management/commands/anonymize.py @@ -1,6 +1,7 @@ from django.db import connection from django.core.management.base import BaseCommand -from manage import path + +from kitsune.manage import path class Command(BaseCommand): diff --git a/apps/sumo/management/commands/extract_db.py b/kitsune/sumo/management/commands/extract_db.py similarity index 100% rename from apps/sumo/management/commands/extract_db.py rename to kitsune/sumo/management/commands/extract_db.py diff --git a/apps/sumo/middleware.py b/kitsune/sumo/middleware.py similarity index 97% rename from apps/sumo/middleware.py rename to kitsune/sumo/middleware.py index 9a8cc29d169..4da30de8ea1 100644 --- a/apps/sumo/middleware.py +++ b/kitsune/sumo/middleware.py @@ -13,9 +13,9 @@ import mobility import tower -from sumo.helpers import urlparams -from sumo.urlresolvers import Prefixer, set_url_prefixer, split_path -from sumo.views import handle403 +from kitsune.sumo.helpers import urlparams +from kitsune.sumo.urlresolvers import Prefixer, set_url_prefixer, split_path +from kitsune.sumo.views import handle403 class LocaleURLMiddleware(object): diff --git a/apps/sumo/models.py b/kitsune/sumo/models.py similarity index 100% rename from apps/sumo/models.py rename to kitsune/sumo/models.py diff --git a/apps/sumo/monkeypatch.py b/kitsune/sumo/monkeypatch.py similarity index 100% rename from apps/sumo/monkeypatch.py rename to kitsune/sumo/monkeypatch.py diff --git a/apps/sumo/paginator.py b/kitsune/sumo/paginator.py similarity index 100% rename from apps/sumo/paginator.py rename to kitsune/sumo/paginator.py diff --git a/apps/sumo/parser.py b/kitsune/sumo/parser.py similarity index 98% rename from apps/sumo/parser.py rename to kitsune/sumo/parser.py index 6ff34a590ed..9913c565122 100644 --- a/apps/sumo/parser.py +++ b/kitsune/sumo/parser.py @@ -7,9 +7,9 @@ from tower import ugettext_lazy as _lazy, ugettext as _ from wikimarkup.parser import Parser, ALLOWED_TAGS as ORIG_ALLOWED_TAGS -from gallery.models import Image, Video -from sumo import email_utils -from sumo.urlresolvers import reverse +from kitsune.gallery.models import Image, Video +from kitsune.sumo import email_utils +from kitsune.sumo.urlresolvers import reverse def _filter_iframe_attrs(name, value): @@ -128,7 +128,7 @@ def _get_wiki_link(title, locale): # Prevent circular import. sumo is conceptually a utils apps and # shouldn't have import-time (or really, any, but that's not going # to happen) dependencies on client apps. - from wiki.models import Document + from kitsune.wiki.models import Document d = get_object_fallback(Document, locale=locale, title=title, is_template=False) @@ -144,7 +144,7 @@ def _get_wiki_link(title, locale): return {'found': True, 'url': url, 'text': d.title} # To avoid circular imports, wiki.models imports wiki_to_html - from sumo.helpers import urlparams + from kitsune.sumo.helpers import urlparams return {'found': False, 'text': title, 'url': urlparams(reverse('wiki.new_document', locale=locale), diff --git a/apps/sumo/readonlyauth.py b/kitsune/sumo/readonlyauth.py similarity index 100% rename from apps/sumo/readonlyauth.py rename to kitsune/sumo/readonlyauth.py diff --git a/apps/sumo/redis_utils.py b/kitsune/sumo/redis_utils.py similarity index 100% rename from apps/sumo/redis_utils.py rename to kitsune/sumo/redis_utils.py diff --git a/apps/sumo/static/css/cannedresponses.css b/kitsune/sumo/static/css/cannedresponses.css similarity index 100% rename from apps/sumo/static/css/cannedresponses.css rename to kitsune/sumo/static/css/cannedresponses.css diff --git a/apps/sumo/static/css/groups.css b/kitsune/sumo/static/css/groups.css similarity index 100% rename from apps/sumo/static/css/groups.css rename to kitsune/sumo/static/css/groups.css diff --git a/apps/sumo/static/css/ie.css b/kitsune/sumo/static/css/ie.css similarity index 100% rename from apps/sumo/static/css/ie.css rename to kitsune/sumo/static/css/ie.css diff --git a/apps/sumo/static/css/ie8.css b/kitsune/sumo/static/css/ie8.css similarity index 100% rename from apps/sumo/static/css/ie8.css rename to kitsune/sumo/static/css/ie8.css diff --git a/apps/sumo/static/css/jqueryui/README b/kitsune/sumo/static/css/jqueryui/README similarity index 100% rename from apps/sumo/static/css/jqueryui/README rename to kitsune/sumo/static/css/jqueryui/README diff --git a/apps/sumo/static/css/jqueryui/images/animated-overlay.gif b/kitsune/sumo/static/css/jqueryui/images/animated-overlay.gif similarity index 100% rename from apps/sumo/static/css/jqueryui/images/animated-overlay.gif rename to kitsune/sumo/static/css/jqueryui/images/animated-overlay.gif diff --git a/apps/sumo/static/css/jqueryui/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/kitsune/sumo/static/css/jqueryui/images/ui-bg_diagonals-thick_18_b81900_40x40.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-bg_diagonals-thick_18_b81900_40x40.png rename to kitsune/sumo/static/css/jqueryui/images/ui-bg_diagonals-thick_18_b81900_40x40.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-bg_diagonals-thick_20_666666_40x40.png b/kitsune/sumo/static/css/jqueryui/images/ui-bg_diagonals-thick_20_666666_40x40.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-bg_diagonals-thick_20_666666_40x40.png rename to kitsune/sumo/static/css/jqueryui/images/ui-bg_diagonals-thick_20_666666_40x40.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-bg_flat_0_aaaaaa_40x100.png b/kitsune/sumo/static/css/jqueryui/images/ui-bg_flat_0_aaaaaa_40x100.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-bg_flat_0_aaaaaa_40x100.png rename to kitsune/sumo/static/css/jqueryui/images/ui-bg_flat_0_aaaaaa_40x100.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-bg_flat_10_000000_40x100.png b/kitsune/sumo/static/css/jqueryui/images/ui-bg_flat_10_000000_40x100.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-bg_flat_10_000000_40x100.png rename to kitsune/sumo/static/css/jqueryui/images/ui-bg_flat_10_000000_40x100.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-bg_flat_30_cccccc_40x100.png b/kitsune/sumo/static/css/jqueryui/images/ui-bg_flat_30_cccccc_40x100.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-bg_flat_30_cccccc_40x100.png rename to kitsune/sumo/static/css/jqueryui/images/ui-bg_flat_30_cccccc_40x100.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-bg_flat_50_5c5c5c_40x100.png b/kitsune/sumo/static/css/jqueryui/images/ui-bg_flat_50_5c5c5c_40x100.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-bg_flat_50_5c5c5c_40x100.png rename to kitsune/sumo/static/css/jqueryui/images/ui-bg_flat_50_5c5c5c_40x100.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-bg_flat_75_ffffff_40x100.png b/kitsune/sumo/static/css/jqueryui/images/ui-bg_flat_75_ffffff_40x100.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-bg_flat_75_ffffff_40x100.png rename to kitsune/sumo/static/css/jqueryui/images/ui-bg_flat_75_ffffff_40x100.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-bg_glass_100_f6f6f6_1x400.png b/kitsune/sumo/static/css/jqueryui/images/ui-bg_glass_100_f6f6f6_1x400.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-bg_glass_100_f6f6f6_1x400.png rename to kitsune/sumo/static/css/jqueryui/images/ui-bg_glass_100_f6f6f6_1x400.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-bg_glass_100_fdf5ce_1x400.png b/kitsune/sumo/static/css/jqueryui/images/ui-bg_glass_100_fdf5ce_1x400.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-bg_glass_100_fdf5ce_1x400.png rename to kitsune/sumo/static/css/jqueryui/images/ui-bg_glass_100_fdf5ce_1x400.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-bg_glass_20_555555_1x400.png b/kitsune/sumo/static/css/jqueryui/images/ui-bg_glass_20_555555_1x400.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-bg_glass_20_555555_1x400.png rename to kitsune/sumo/static/css/jqueryui/images/ui-bg_glass_20_555555_1x400.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-bg_glass_40_0078a3_1x400.png b/kitsune/sumo/static/css/jqueryui/images/ui-bg_glass_40_0078a3_1x400.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-bg_glass_40_0078a3_1x400.png rename to kitsune/sumo/static/css/jqueryui/images/ui-bg_glass_40_0078a3_1x400.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-bg_glass_40_ffc73d_1x400.png b/kitsune/sumo/static/css/jqueryui/images/ui-bg_glass_40_ffc73d_1x400.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-bg_glass_40_ffc73d_1x400.png rename to kitsune/sumo/static/css/jqueryui/images/ui-bg_glass_40_ffc73d_1x400.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-bg_glass_55_fbf9ee_1x400.png b/kitsune/sumo/static/css/jqueryui/images/ui-bg_glass_55_fbf9ee_1x400.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-bg_glass_55_fbf9ee_1x400.png rename to kitsune/sumo/static/css/jqueryui/images/ui-bg_glass_55_fbf9ee_1x400.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-bg_glass_65_ffffff_1x400.png b/kitsune/sumo/static/css/jqueryui/images/ui-bg_glass_65_ffffff_1x400.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-bg_glass_65_ffffff_1x400.png rename to kitsune/sumo/static/css/jqueryui/images/ui-bg_glass_65_ffffff_1x400.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-bg_glass_75_dadada_1x400.png b/kitsune/sumo/static/css/jqueryui/images/ui-bg_glass_75_dadada_1x400.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-bg_glass_75_dadada_1x400.png rename to kitsune/sumo/static/css/jqueryui/images/ui-bg_glass_75_dadada_1x400.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-bg_glass_75_e6e6e6_1x400.png b/kitsune/sumo/static/css/jqueryui/images/ui-bg_glass_75_e6e6e6_1x400.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-bg_glass_75_e6e6e6_1x400.png rename to kitsune/sumo/static/css/jqueryui/images/ui-bg_glass_75_e6e6e6_1x400.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-bg_glass_95_fef1ec_1x400.png b/kitsune/sumo/static/css/jqueryui/images/ui-bg_glass_95_fef1ec_1x400.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-bg_glass_95_fef1ec_1x400.png rename to kitsune/sumo/static/css/jqueryui/images/ui-bg_glass_95_fef1ec_1x400.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-bg_gloss-wave_25_333333_500x100.png b/kitsune/sumo/static/css/jqueryui/images/ui-bg_gloss-wave_25_333333_500x100.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-bg_gloss-wave_25_333333_500x100.png rename to kitsune/sumo/static/css/jqueryui/images/ui-bg_gloss-wave_25_333333_500x100.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-bg_gloss-wave_35_f6a828_500x100.png b/kitsune/sumo/static/css/jqueryui/images/ui-bg_gloss-wave_35_f6a828_500x100.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-bg_gloss-wave_35_f6a828_500x100.png rename to kitsune/sumo/static/css/jqueryui/images/ui-bg_gloss-wave_35_f6a828_500x100.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-bg_highlight-soft_100_eeeeee_1x100.png b/kitsune/sumo/static/css/jqueryui/images/ui-bg_highlight-soft_100_eeeeee_1x100.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-bg_highlight-soft_100_eeeeee_1x100.png rename to kitsune/sumo/static/css/jqueryui/images/ui-bg_highlight-soft_100_eeeeee_1x100.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/kitsune/sumo/static/css/jqueryui/images/ui-bg_highlight-soft_75_cccccc_1x100.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-bg_highlight-soft_75_cccccc_1x100.png rename to kitsune/sumo/static/css/jqueryui/images/ui-bg_highlight-soft_75_cccccc_1x100.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-bg_highlight-soft_75_ffe45c_1x100.png b/kitsune/sumo/static/css/jqueryui/images/ui-bg_highlight-soft_75_ffe45c_1x100.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-bg_highlight-soft_75_ffe45c_1x100.png rename to kitsune/sumo/static/css/jqueryui/images/ui-bg_highlight-soft_75_ffe45c_1x100.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-bg_highlight-soft_80_eeeeee_1x100.png b/kitsune/sumo/static/css/jqueryui/images/ui-bg_highlight-soft_80_eeeeee_1x100.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-bg_highlight-soft_80_eeeeee_1x100.png rename to kitsune/sumo/static/css/jqueryui/images/ui-bg_highlight-soft_80_eeeeee_1x100.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-bg_inset-soft_25_000000_1x100.png b/kitsune/sumo/static/css/jqueryui/images/ui-bg_inset-soft_25_000000_1x100.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-bg_inset-soft_25_000000_1x100.png rename to kitsune/sumo/static/css/jqueryui/images/ui-bg_inset-soft_25_000000_1x100.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-bg_inset-soft_30_f58400_1x100.png b/kitsune/sumo/static/css/jqueryui/images/ui-bg_inset-soft_30_f58400_1x100.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-bg_inset-soft_30_f58400_1x100.png rename to kitsune/sumo/static/css/jqueryui/images/ui-bg_inset-soft_30_f58400_1x100.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-icons_222222_256x240.png b/kitsune/sumo/static/css/jqueryui/images/ui-icons_222222_256x240.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-icons_222222_256x240.png rename to kitsune/sumo/static/css/jqueryui/images/ui-icons_222222_256x240.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-icons_228ef1_256x240.png b/kitsune/sumo/static/css/jqueryui/images/ui-icons_228ef1_256x240.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-icons_228ef1_256x240.png rename to kitsune/sumo/static/css/jqueryui/images/ui-icons_228ef1_256x240.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-icons_2e83ff_256x240.png b/kitsune/sumo/static/css/jqueryui/images/ui-icons_2e83ff_256x240.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-icons_2e83ff_256x240.png rename to kitsune/sumo/static/css/jqueryui/images/ui-icons_2e83ff_256x240.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-icons_454545_256x240.png b/kitsune/sumo/static/css/jqueryui/images/ui-icons_454545_256x240.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-icons_454545_256x240.png rename to kitsune/sumo/static/css/jqueryui/images/ui-icons_454545_256x240.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-icons_4b8e0b_256x240.png b/kitsune/sumo/static/css/jqueryui/images/ui-icons_4b8e0b_256x240.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-icons_4b8e0b_256x240.png rename to kitsune/sumo/static/css/jqueryui/images/ui-icons_4b8e0b_256x240.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-icons_888888_256x240.png b/kitsune/sumo/static/css/jqueryui/images/ui-icons_888888_256x240.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-icons_888888_256x240.png rename to kitsune/sumo/static/css/jqueryui/images/ui-icons_888888_256x240.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-icons_a83300_256x240.png b/kitsune/sumo/static/css/jqueryui/images/ui-icons_a83300_256x240.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-icons_a83300_256x240.png rename to kitsune/sumo/static/css/jqueryui/images/ui-icons_a83300_256x240.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-icons_cccccc_256x240.png b/kitsune/sumo/static/css/jqueryui/images/ui-icons_cccccc_256x240.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-icons_cccccc_256x240.png rename to kitsune/sumo/static/css/jqueryui/images/ui-icons_cccccc_256x240.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-icons_cd0a0a_256x240.png b/kitsune/sumo/static/css/jqueryui/images/ui-icons_cd0a0a_256x240.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-icons_cd0a0a_256x240.png rename to kitsune/sumo/static/css/jqueryui/images/ui-icons_cd0a0a_256x240.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-icons_ef8c08_256x240.png b/kitsune/sumo/static/css/jqueryui/images/ui-icons_ef8c08_256x240.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-icons_ef8c08_256x240.png rename to kitsune/sumo/static/css/jqueryui/images/ui-icons_ef8c08_256x240.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-icons_ffd27a_256x240.png b/kitsune/sumo/static/css/jqueryui/images/ui-icons_ffd27a_256x240.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-icons_ffd27a_256x240.png rename to kitsune/sumo/static/css/jqueryui/images/ui-icons_ffd27a_256x240.png diff --git a/apps/sumo/static/css/jqueryui/images/ui-icons_ffffff_256x240.png b/kitsune/sumo/static/css/jqueryui/images/ui-icons_ffffff_256x240.png similarity index 100% rename from apps/sumo/static/css/jqueryui/images/ui-icons_ffffff_256x240.png rename to kitsune/sumo/static/css/jqueryui/images/ui-icons_ffffff_256x240.png diff --git a/apps/sumo/static/css/jqueryui/jqueryui.css b/kitsune/sumo/static/css/jqueryui/jqueryui.css similarity index 100% rename from apps/sumo/static/css/jqueryui/jqueryui.css rename to kitsune/sumo/static/css/jqueryui/jqueryui.css diff --git a/apps/sumo/static/css/kadmin.css b/kitsune/sumo/static/css/kadmin.css similarity index 100% rename from apps/sumo/static/css/kadmin.css rename to kitsune/sumo/static/css/kadmin.css diff --git a/apps/sumo/static/css/kbox.css b/kitsune/sumo/static/css/kbox.css similarity index 100% rename from apps/sumo/static/css/kbox.css rename to kitsune/sumo/static/css/kbox.css diff --git a/apps/sumo/static/css/landings/.gitignore b/kitsune/sumo/static/css/landings/.gitignore similarity index 100% rename from apps/sumo/static/css/landings/.gitignore rename to kitsune/sumo/static/css/landings/.gitignore diff --git a/apps/sumo/static/css/landings/empty.txt b/kitsune/sumo/static/css/landings/empty.txt similarity index 100% rename from apps/sumo/static/css/landings/empty.txt rename to kitsune/sumo/static/css/landings/empty.txt diff --git a/apps/sumo/static/css/mobile/landings/.gitignore b/kitsune/sumo/static/css/mobile/landings/.gitignore similarity index 100% rename from apps/sumo/static/css/mobile/landings/.gitignore rename to kitsune/sumo/static/css/mobile/landings/.gitignore diff --git a/apps/sumo/static/css/mobile/landings/empty.txt b/kitsune/sumo/static/css/mobile/landings/empty.txt similarity index 100% rename from apps/sumo/static/css/mobile/landings/empty.txt rename to kitsune/sumo/static/css/mobile/landings/empty.txt diff --git a/apps/sumo/static/css/monitor.css b/kitsune/sumo/static/css/monitor.css similarity index 100% rename from apps/sumo/static/css/monitor.css rename to kitsune/sumo/static/css/monitor.css diff --git a/apps/sumo/static/css/normalize.css b/kitsune/sumo/static/css/normalize.css similarity index 100% rename from apps/sumo/static/css/normalize.css rename to kitsune/sumo/static/css/normalize.css diff --git a/apps/sumo/static/css/print.css b/kitsune/sumo/static/css/print.css similarity index 100% rename from apps/sumo/static/css/print.css rename to kitsune/sumo/static/css/print.css diff --git a/apps/sumo/static/css/rickshaw.css b/kitsune/sumo/static/css/rickshaw.css similarity index 100% rename from apps/sumo/static/css/rickshaw.css rename to kitsune/sumo/static/css/rickshaw.css diff --git a/apps/sumo/static/css/screencast.css b/kitsune/sumo/static/css/screencast.css similarity index 100% rename from apps/sumo/static/css/screencast.css rename to kitsune/sumo/static/css/screencast.css diff --git a/apps/sumo/static/css/users.autocomplete.css b/kitsune/sumo/static/css/users.autocomplete.css similarity index 100% rename from apps/sumo/static/css/users.autocomplete.css rename to kitsune/sumo/static/css/users.autocomplete.css diff --git a/apps/sumo/static/css/users.list.css b/kitsune/sumo/static/css/users.list.css similarity index 100% rename from apps/sumo/static/css/users.list.css rename to kitsune/sumo/static/css/users.list.css diff --git a/apps/sumo/static/css/wiki_syntax.css b/kitsune/sumo/static/css/wiki_syntax.css similarity index 100% rename from apps/sumo/static/css/wiki_syntax.css rename to kitsune/sumo/static/css/wiki_syntax.css diff --git a/apps/sumo/static/email/img/mozilla-support.png b/kitsune/sumo/static/email/img/mozilla-support.png similarity index 100% rename from apps/sumo/static/email/img/mozilla-support.png rename to kitsune/sumo/static/email/img/mozilla-support.png diff --git a/apps/sumo/static/fonts/.htaccess b/kitsune/sumo/static/fonts/.htaccess similarity index 100% rename from apps/sumo/static/fonts/.htaccess rename to kitsune/sumo/static/fonts/.htaccess diff --git a/apps/sumo/static/fonts/Komikax-webfont.eot b/kitsune/sumo/static/fonts/Komikax-webfont.eot similarity index 100% rename from apps/sumo/static/fonts/Komikax-webfont.eot rename to kitsune/sumo/static/fonts/Komikax-webfont.eot diff --git a/apps/sumo/static/fonts/Komikax-webfont.svg b/kitsune/sumo/static/fonts/Komikax-webfont.svg similarity index 100% rename from apps/sumo/static/fonts/Komikax-webfont.svg rename to kitsune/sumo/static/fonts/Komikax-webfont.svg diff --git a/apps/sumo/static/fonts/Komikax-webfont.ttf b/kitsune/sumo/static/fonts/Komikax-webfont.ttf similarity index 100% rename from apps/sumo/static/fonts/Komikax-webfont.ttf rename to kitsune/sumo/static/fonts/Komikax-webfont.ttf diff --git a/apps/sumo/static/fonts/Komikax-webfont.woff b/kitsune/sumo/static/fonts/Komikax-webfont.woff similarity index 100% rename from apps/sumo/static/fonts/Komikax-webfont.woff rename to kitsune/sumo/static/fonts/Komikax-webfont.woff diff --git a/apps/sumo/static/fonts/MetaWebPro-Black.eot b/kitsune/sumo/static/fonts/MetaWebPro-Black.eot similarity index 100% rename from apps/sumo/static/fonts/MetaWebPro-Black.eot rename to kitsune/sumo/static/fonts/MetaWebPro-Black.eot diff --git a/apps/sumo/static/fonts/MetaWebPro-Black.woff b/kitsune/sumo/static/fonts/MetaWebPro-Black.woff similarity index 100% rename from apps/sumo/static/fonts/MetaWebPro-Black.woff rename to kitsune/sumo/static/fonts/MetaWebPro-Black.woff diff --git a/apps/sumo/static/fonts/MetaWebPro-Bold.eot b/kitsune/sumo/static/fonts/MetaWebPro-Bold.eot similarity index 100% rename from apps/sumo/static/fonts/MetaWebPro-Bold.eot rename to kitsune/sumo/static/fonts/MetaWebPro-Bold.eot diff --git a/apps/sumo/static/fonts/MetaWebPro-Bold.svg b/kitsune/sumo/static/fonts/MetaWebPro-Bold.svg similarity index 100% rename from apps/sumo/static/fonts/MetaWebPro-Bold.svg rename to kitsune/sumo/static/fonts/MetaWebPro-Bold.svg diff --git a/apps/sumo/static/fonts/MetaWebPro-Bold.ttf b/kitsune/sumo/static/fonts/MetaWebPro-Bold.ttf similarity index 100% rename from apps/sumo/static/fonts/MetaWebPro-Bold.ttf rename to kitsune/sumo/static/fonts/MetaWebPro-Bold.ttf diff --git a/apps/sumo/static/fonts/MetaWebPro-Bold.woff b/kitsune/sumo/static/fonts/MetaWebPro-Bold.woff similarity index 100% rename from apps/sumo/static/fonts/MetaWebPro-Bold.woff rename to kitsune/sumo/static/fonts/MetaWebPro-Bold.woff diff --git a/apps/sumo/static/fonts/MetaWebPro-Medium.eot b/kitsune/sumo/static/fonts/MetaWebPro-Medium.eot similarity index 100% rename from apps/sumo/static/fonts/MetaWebPro-Medium.eot rename to kitsune/sumo/static/fonts/MetaWebPro-Medium.eot diff --git a/apps/sumo/static/fonts/MetaWebPro-Medium.svg b/kitsune/sumo/static/fonts/MetaWebPro-Medium.svg similarity index 100% rename from apps/sumo/static/fonts/MetaWebPro-Medium.svg rename to kitsune/sumo/static/fonts/MetaWebPro-Medium.svg diff --git a/apps/sumo/static/fonts/MetaWebPro-Medium.ttf b/kitsune/sumo/static/fonts/MetaWebPro-Medium.ttf similarity index 100% rename from apps/sumo/static/fonts/MetaWebPro-Medium.ttf rename to kitsune/sumo/static/fonts/MetaWebPro-Medium.ttf diff --git a/apps/sumo/static/fonts/MetaWebPro-Medium.woff b/kitsune/sumo/static/fonts/MetaWebPro-Medium.woff similarity index 100% rename from apps/sumo/static/fonts/MetaWebPro-Medium.woff rename to kitsune/sumo/static/fonts/MetaWebPro-Medium.woff diff --git a/apps/sumo/static/fonts/Moz-Medium-webfont.eot b/kitsune/sumo/static/fonts/Moz-Medium-webfont.eot similarity index 100% rename from apps/sumo/static/fonts/Moz-Medium-webfont.eot rename to kitsune/sumo/static/fonts/Moz-Medium-webfont.eot diff --git a/apps/sumo/static/fonts/Moz-Medium-webfont.svg b/kitsune/sumo/static/fonts/Moz-Medium-webfont.svg similarity index 100% rename from apps/sumo/static/fonts/Moz-Medium-webfont.svg rename to kitsune/sumo/static/fonts/Moz-Medium-webfont.svg diff --git a/apps/sumo/static/fonts/Moz-Medium-webfont.ttf b/kitsune/sumo/static/fonts/Moz-Medium-webfont.ttf similarity index 100% rename from apps/sumo/static/fonts/Moz-Medium-webfont.ttf rename to kitsune/sumo/static/fonts/Moz-Medium-webfont.ttf diff --git a/apps/sumo/static/fonts/Moz-Medium-webfont.woff b/kitsune/sumo/static/fonts/Moz-Medium-webfont.woff similarity index 100% rename from apps/sumo/static/fonts/Moz-Medium-webfont.woff rename to kitsune/sumo/static/fonts/Moz-Medium-webfont.woff diff --git a/apps/sumo/static/fonts/Moz-Regular-webfont.eot b/kitsune/sumo/static/fonts/Moz-Regular-webfont.eot similarity index 100% rename from apps/sumo/static/fonts/Moz-Regular-webfont.eot rename to kitsune/sumo/static/fonts/Moz-Regular-webfont.eot diff --git a/apps/sumo/static/fonts/Moz-Regular-webfont.svg b/kitsune/sumo/static/fonts/Moz-Regular-webfont.svg similarity index 100% rename from apps/sumo/static/fonts/Moz-Regular-webfont.svg rename to kitsune/sumo/static/fonts/Moz-Regular-webfont.svg diff --git a/apps/sumo/static/fonts/Moz-Regular-webfont.ttf b/kitsune/sumo/static/fonts/Moz-Regular-webfont.ttf similarity index 100% rename from apps/sumo/static/fonts/Moz-Regular-webfont.ttf rename to kitsune/sumo/static/fonts/Moz-Regular-webfont.ttf diff --git a/apps/sumo/static/fonts/Moz-Regular-webfont.woff b/kitsune/sumo/static/fonts/Moz-Regular-webfont.woff similarity index 100% rename from apps/sumo/static/fonts/Moz-Regular-webfont.woff rename to kitsune/sumo/static/fonts/Moz-Regular-webfont.woff diff --git a/apps/sumo/static/img/avatar.png b/kitsune/sumo/static/img/avatar.png similarity index 100% rename from apps/sumo/static/img/avatar.png rename to kitsune/sumo/static/img/avatar.png diff --git a/apps/sumo/static/img/background-404.jpg b/kitsune/sumo/static/img/background-404.jpg similarity index 100% rename from apps/sumo/static/img/background-404.jpg rename to kitsune/sumo/static/img/background-404.jpg diff --git a/apps/sumo/static/img/background-feature.jpg b/kitsune/sumo/static/img/background-feature.jpg similarity index 100% rename from apps/sumo/static/img/background-feature.jpg rename to kitsune/sumo/static/img/background-feature.jpg diff --git a/apps/sumo/static/img/background-tile.png b/kitsune/sumo/static/img/background-tile.png similarity index 100% rename from apps/sumo/static/img/background-tile.png rename to kitsune/sumo/static/img/background-tile.png diff --git a/apps/sumo/static/img/blank.png b/kitsune/sumo/static/img/blank.png similarity index 100% rename from apps/sumo/static/img/blank.png rename to kitsune/sumo/static/img/blank.png diff --git a/apps/sumo/static/img/botbar.png b/kitsune/sumo/static/img/botbar.png similarity index 100% rename from apps/sumo/static/img/botbar.png rename to kitsune/sumo/static/img/botbar.png diff --git a/apps/sumo/static/img/btn.search.png b/kitsune/sumo/static/img/btn.search.png similarity index 100% rename from apps/sumo/static/img/btn.search.png rename to kitsune/sumo/static/img/btn.search.png diff --git a/apps/sumo/static/img/cc-ie6.png b/kitsune/sumo/static/img/cc-ie6.png similarity index 100% rename from apps/sumo/static/img/cc-ie6.png rename to kitsune/sumo/static/img/cc-ie6.png diff --git a/apps/sumo/static/img/cc-sa.png b/kitsune/sumo/static/img/cc-sa.png similarity index 100% rename from apps/sumo/static/img/cc-sa.png rename to kitsune/sumo/static/img/cc-sa.png diff --git a/apps/sumo/static/img/cc.png b/kitsune/sumo/static/img/cc.png similarity index 100% rename from apps/sumo/static/img/cc.png rename to kitsune/sumo/static/img/cc.png diff --git a/apps/sumo/static/img/chat/foxkeh-closed.png b/kitsune/sumo/static/img/chat/foxkeh-closed.png similarity index 100% rename from apps/sumo/static/img/chat/foxkeh-closed.png rename to kitsune/sumo/static/img/chat/foxkeh-closed.png diff --git a/apps/sumo/static/img/chat/foxkeh-open.png b/kitsune/sumo/static/img/chat/foxkeh-open.png similarity index 100% rename from apps/sumo/static/img/chat/foxkeh-open.png rename to kitsune/sumo/static/img/chat/foxkeh-open.png diff --git a/apps/sumo/static/img/crumb.gif b/kitsune/sumo/static/img/crumb.gif similarity index 100% rename from apps/sumo/static/img/crumb.gif rename to kitsune/sumo/static/img/crumb.gif diff --git a/apps/sumo/static/img/customercare/bubble.png b/kitsune/sumo/static/img/customercare/bubble.png similarity index 100% rename from apps/sumo/static/img/customercare/bubble.png rename to kitsune/sumo/static/img/customercare/bubble.png diff --git a/apps/sumo/static/img/customercare/bubbles.png b/kitsune/sumo/static/img/customercare/bubbles.png similarity index 100% rename from apps/sumo/static/img/customercare/bubbles.png rename to kitsune/sumo/static/img/customercare/bubbles.png diff --git a/apps/sumo/static/img/customercare/expander-closed.png b/kitsune/sumo/static/img/customercare/expander-closed.png similarity index 100% rename from apps/sumo/static/img/customercare/expander-closed.png rename to kitsune/sumo/static/img/customercare/expander-closed.png diff --git a/apps/sumo/static/img/customercare/expander-open.png b/kitsune/sumo/static/img/customercare/expander-open.png similarity index 100% rename from apps/sumo/static/img/customercare/expander-open.png rename to kitsune/sumo/static/img/customercare/expander-open.png diff --git a/apps/sumo/static/img/customercare/hr-line.png b/kitsune/sumo/static/img/customercare/hr-line.png similarity index 100% rename from apps/sumo/static/img/customercare/hr-line.png rename to kitsune/sumo/static/img/customercare/hr-line.png diff --git a/apps/sumo/static/img/customercare/initial-tweet-arrow.png b/kitsune/sumo/static/img/customercare/initial-tweet-arrow.png similarity index 100% rename from apps/sumo/static/img/customercare/initial-tweet-arrow.png rename to kitsune/sumo/static/img/customercare/initial-tweet-arrow.png diff --git a/apps/sumo/static/img/customercare/notification-error.png b/kitsune/sumo/static/img/customercare/notification-error.png similarity index 100% rename from apps/sumo/static/img/customercare/notification-error.png rename to kitsune/sumo/static/img/customercare/notification-error.png diff --git a/apps/sumo/static/img/customercare/popup-background.png b/kitsune/sumo/static/img/customercare/popup-background.png similarity index 100% rename from apps/sumo/static/img/customercare/popup-background.png rename to kitsune/sumo/static/img/customercare/popup-background.png diff --git a/apps/sumo/static/img/customercare/reply-arrow.png b/kitsune/sumo/static/img/customercare/reply-arrow.png similarity index 100% rename from apps/sumo/static/img/customercare/reply-arrow.png rename to kitsune/sumo/static/img/customercare/reply-arrow.png diff --git a/apps/sumo/static/img/customercare/reply-check.png b/kitsune/sumo/static/img/customercare/reply-check.png similarity index 100% rename from apps/sumo/static/img/customercare/reply-check.png rename to kitsune/sumo/static/img/customercare/reply-check.png diff --git a/apps/sumo/static/img/customercare/spinner.gif b/kitsune/sumo/static/img/customercare/spinner.gif similarity index 100% rename from apps/sumo/static/img/customercare/spinner.gif rename to kitsune/sumo/static/img/customercare/spinner.gif diff --git a/apps/sumo/static/img/customercare/twitter-icon.png b/kitsune/sumo/static/img/customercare/twitter-icon.png similarity index 100% rename from apps/sumo/static/img/customercare/twitter-icon.png rename to kitsune/sumo/static/img/customercare/twitter-icon.png diff --git a/apps/sumo/static/img/favicon.ico b/kitsune/sumo/static/img/favicon.ico similarity index 100% rename from apps/sumo/static/img/favicon.ico rename to kitsune/sumo/static/img/favicon.ico diff --git a/apps/sumo/static/img/ff-logo-16x16.png b/kitsune/sumo/static/img/ff-logo-16x16.png similarity index 100% rename from apps/sumo/static/img/ff-logo-16x16.png rename to kitsune/sumo/static/img/ff-logo-16x16.png diff --git a/apps/sumo/static/img/ff-logo.png b/kitsune/sumo/static/img/ff-logo.png similarity index 100% rename from apps/sumo/static/img/ff-logo.png rename to kitsune/sumo/static/img/ff-logo.png diff --git a/apps/sumo/static/img/firefox-128.png b/kitsune/sumo/static/img/firefox-128.png similarity index 100% rename from apps/sumo/static/img/firefox-128.png rename to kitsune/sumo/static/img/firefox-128.png diff --git a/apps/sumo/static/img/firefox-16.png b/kitsune/sumo/static/img/firefox-16.png similarity index 100% rename from apps/sumo/static/img/firefox-16.png rename to kitsune/sumo/static/img/firefox-16.png diff --git a/apps/sumo/static/img/firefox-256.png b/kitsune/sumo/static/img/firefox-256.png similarity index 100% rename from apps/sumo/static/img/firefox-256.png rename to kitsune/sumo/static/img/firefox-256.png diff --git a/apps/sumo/static/img/firefox-32.png b/kitsune/sumo/static/img/firefox-32.png similarity index 100% rename from apps/sumo/static/img/firefox-32.png rename to kitsune/sumo/static/img/firefox-32.png diff --git a/apps/sumo/static/img/firefox-512.png b/kitsune/sumo/static/img/firefox-512.png similarity index 100% rename from apps/sumo/static/img/firefox-512.png rename to kitsune/sumo/static/img/firefox-512.png diff --git a/apps/sumo/static/img/firefox-54x62.png b/kitsune/sumo/static/img/firefox-54x62.png similarity index 100% rename from apps/sumo/static/img/firefox-54x62.png rename to kitsune/sumo/static/img/firefox-54x62.png diff --git a/apps/sumo/static/img/firefox-64.png b/kitsune/sumo/static/img/firefox-64.png similarity index 100% rename from apps/sumo/static/img/firefox-64.png rename to kitsune/sumo/static/img/firefox-64.png diff --git a/apps/sumo/static/img/firefox-aurora-80x80.png b/kitsune/sumo/static/img/firefox-aurora-80x80.png similarity index 100% rename from apps/sumo/static/img/firefox-aurora-80x80.png rename to kitsune/sumo/static/img/firefox-aurora-80x80.png diff --git a/apps/sumo/static/img/firefox.png b/kitsune/sumo/static/img/firefox.png similarity index 100% rename from apps/sumo/static/img/firefox.png rename to kitsune/sumo/static/img/firefox.png diff --git a/apps/sumo/static/img/footer-border.png b/kitsune/sumo/static/img/footer-border.png similarity index 100% rename from apps/sumo/static/img/footer-border.png rename to kitsune/sumo/static/img/footer-border.png diff --git a/apps/sumo/static/img/forums/arrow.png b/kitsune/sumo/static/img/forums/arrow.png similarity index 100% rename from apps/sumo/static/img/forums/arrow.png rename to kitsune/sumo/static/img/forums/arrow.png diff --git a/apps/sumo/static/img/forums/delete.png b/kitsune/sumo/static/img/forums/delete.png similarity index 100% rename from apps/sumo/static/img/forums/delete.png rename to kitsune/sumo/static/img/forums/delete.png diff --git a/apps/sumo/static/img/forums/down.gif b/kitsune/sumo/static/img/forums/down.gif similarity index 100% rename from apps/sumo/static/img/forums/down.gif rename to kitsune/sumo/static/img/forums/down.gif diff --git a/apps/sumo/static/img/forums/edit.png b/kitsune/sumo/static/img/forums/edit.png similarity index 100% rename from apps/sumo/static/img/forums/edit.png rename to kitsune/sumo/static/img/forums/edit.png diff --git a/apps/sumo/static/img/forums/type/locked.png b/kitsune/sumo/static/img/forums/type/locked.png similarity index 100% rename from apps/sumo/static/img/forums/type/locked.png rename to kitsune/sumo/static/img/forums/type/locked.png diff --git a/apps/sumo/static/img/forums/type/normal.png b/kitsune/sumo/static/img/forums/type/normal.png similarity index 100% rename from apps/sumo/static/img/forums/type/normal.png rename to kitsune/sumo/static/img/forums/type/normal.png diff --git a/apps/sumo/static/img/forums/type/sticky.png b/kitsune/sumo/static/img/forums/type/sticky.png similarity index 100% rename from apps/sumo/static/img/forums/type/sticky.png rename to kitsune/sumo/static/img/forums/type/sticky.png diff --git a/apps/sumo/static/img/forums/up.gif b/kitsune/sumo/static/img/forums/up.gif similarity index 100% rename from apps/sumo/static/img/forums/up.gif rename to kitsune/sumo/static/img/forums/up.gif diff --git a/apps/sumo/static/img/forums/watch.png b/kitsune/sumo/static/img/forums/watch.png similarity index 100% rename from apps/sumo/static/img/forums/watch.png rename to kitsune/sumo/static/img/forums/watch.png diff --git a/apps/sumo/static/img/fpo.png b/kitsune/sumo/static/img/fpo.png similarity index 100% rename from apps/sumo/static/img/fpo.png rename to kitsune/sumo/static/img/fpo.png diff --git a/apps/sumo/static/img/get-involved-icons.png b/kitsune/sumo/static/img/get-involved-icons.png similarity index 100% rename from apps/sumo/static/img/get-involved-icons.png rename to kitsune/sumo/static/img/get-involved-icons.png diff --git a/apps/sumo/static/img/gi-hero-aoa.png b/kitsune/sumo/static/img/gi-hero-aoa.png similarity index 100% rename from apps/sumo/static/img/gi-hero-aoa.png rename to kitsune/sumo/static/img/gi-hero-aoa.png diff --git a/apps/sumo/static/img/gi-hero-butler.png b/kitsune/sumo/static/img/gi-hero-butler.png similarity index 100% rename from apps/sumo/static/img/gi-hero-butler.png rename to kitsune/sumo/static/img/gi-hero-butler.png diff --git a/apps/sumo/static/img/gi-hero-kb.png b/kitsune/sumo/static/img/gi-hero-kb.png similarity index 100% rename from apps/sumo/static/img/gi-hero-kb.png rename to kitsune/sumo/static/img/gi-hero-kb.png diff --git a/apps/sumo/static/img/gi-hero-l10n.png b/kitsune/sumo/static/img/gi-hero-l10n.png similarity index 100% rename from apps/sumo/static/img/gi-hero-l10n.png rename to kitsune/sumo/static/img/gi-hero-l10n.png diff --git a/apps/sumo/static/img/gi-hero-questions.png b/kitsune/sumo/static/img/gi-hero-questions.png similarity index 100% rename from apps/sumo/static/img/gi-hero-questions.png rename to kitsune/sumo/static/img/gi-hero-questions.png diff --git a/apps/sumo/static/img/gi-visual-aoa.png b/kitsune/sumo/static/img/gi-visual-aoa.png similarity index 100% rename from apps/sumo/static/img/gi-visual-aoa.png rename to kitsune/sumo/static/img/gi-visual-aoa.png diff --git a/apps/sumo/static/img/gi-visual-kb.png b/kitsune/sumo/static/img/gi-visual-kb.png similarity index 100% rename from apps/sumo/static/img/gi-visual-kb.png rename to kitsune/sumo/static/img/gi-visual-kb.png diff --git a/apps/sumo/static/img/gi-visual-l10n.png b/kitsune/sumo/static/img/gi-visual-l10n.png similarity index 100% rename from apps/sumo/static/img/gi-visual-l10n.png rename to kitsune/sumo/static/img/gi-visual-l10n.png diff --git a/apps/sumo/static/img/gi-visual-questions.png b/kitsune/sumo/static/img/gi-visual-questions.png similarity index 100% rename from apps/sumo/static/img/gi-visual-questions.png rename to kitsune/sumo/static/img/gi-visual-questions.png diff --git a/apps/sumo/static/img/grain.png b/kitsune/sumo/static/img/grain.png similarity index 100% rename from apps/sumo/static/img/grain.png rename to kitsune/sumo/static/img/grain.png diff --git a/apps/sumo/static/img/header-background.png b/kitsune/sumo/static/img/header-background.png similarity index 100% rename from apps/sumo/static/img/header-background.png rename to kitsune/sumo/static/img/header-background.png diff --git a/apps/sumo/static/img/header-nav-divider.png b/kitsune/sumo/static/img/header-nav-divider.png similarity index 100% rename from apps/sumo/static/img/header-nav-divider.png rename to kitsune/sumo/static/img/header-nav-divider.png diff --git a/apps/sumo/static/img/header-nav-menu-backgrounds.png b/kitsune/sumo/static/img/header-nav-menu-backgrounds.png similarity index 100% rename from apps/sumo/static/img/header-nav-menu-backgrounds.png rename to kitsune/sumo/static/img/header-nav-menu-backgrounds.png diff --git a/apps/sumo/static/img/home-bar.png b/kitsune/sumo/static/img/home-bar.png similarity index 100% rename from apps/sumo/static/img/home-bar.png rename to kitsune/sumo/static/img/home-bar.png diff --git a/apps/sumo/static/img/home.divider.jpg b/kitsune/sumo/static/img/home.divider.jpg similarity index 100% rename from apps/sumo/static/img/home.divider.jpg rename to kitsune/sumo/static/img/home.divider.jpg diff --git a/apps/sumo/static/img/icon.get-community-support.png b/kitsune/sumo/static/img/icon.get-community-support.png similarity index 100% rename from apps/sumo/static/img/icon.get-community-support.png rename to kitsune/sumo/static/img/icon.get-community-support.png diff --git a/apps/sumo/static/img/icon.magic-hat.png b/kitsune/sumo/static/img/icon.magic-hat.png similarity index 100% rename from apps/sumo/static/img/icon.magic-hat.png rename to kitsune/sumo/static/img/icon.magic-hat.png diff --git a/apps/sumo/static/img/icon.quote.png b/kitsune/sumo/static/img/icon.quote.png similarity index 100% rename from apps/sumo/static/img/icon.quote.png rename to kitsune/sumo/static/img/icon.quote.png diff --git a/apps/sumo/static/img/icon.searchloupe.png b/kitsune/sumo/static/img/icon.searchloupe.png similarity index 100% rename from apps/sumo/static/img/icon.searchloupe.png rename to kitsune/sumo/static/img/icon.searchloupe.png diff --git a/apps/sumo/static/img/icon.thunderbird.png b/kitsune/sumo/static/img/icon.thunderbird.png similarity index 100% rename from apps/sumo/static/img/icon.thunderbird.png rename to kitsune/sumo/static/img/icon.thunderbird.png diff --git a/apps/sumo/static/img/icons-sprite.png b/kitsune/sumo/static/img/icons-sprite.png similarity index 100% rename from apps/sumo/static/img/icons-sprite.png rename to kitsune/sumo/static/img/icons-sprite.png diff --git a/apps/sumo/static/img/icons.actions.png b/kitsune/sumo/static/img/icons.actions.png similarity index 100% rename from apps/sumo/static/img/icons.actions.png rename to kitsune/sumo/static/img/icons.actions.png diff --git a/apps/sumo/static/img/icons.apps.png b/kitsune/sumo/static/img/icons.apps.png similarity index 100% rename from apps/sumo/static/img/icons.apps.png rename to kitsune/sumo/static/img/icons.apps.png diff --git a/apps/sumo/static/img/icons/firefox-small.png b/kitsune/sumo/static/img/icons/firefox-small.png similarity index 100% rename from apps/sumo/static/img/icons/firefox-small.png rename to kitsune/sumo/static/img/icons/firefox-small.png diff --git a/apps/sumo/static/img/icons/toleft.gif b/kitsune/sumo/static/img/icons/toleft.gif similarity index 100% rename from apps/sumo/static/img/icons/toleft.gif rename to kitsune/sumo/static/img/icons/toleft.gif diff --git a/apps/sumo/static/img/icons/toright.gif b/kitsune/sumo/static/img/icons/toright.gif similarity index 100% rename from apps/sumo/static/img/icons/toright.gif rename to kitsune/sumo/static/img/icons/toright.gif diff --git a/apps/sumo/static/img/logos.large.sprite.png b/kitsune/sumo/static/img/logos.large.sprite.png similarity index 100% rename from apps/sumo/static/img/logos.large.sprite.png rename to kitsune/sumo/static/img/logos.large.sprite.png diff --git a/apps/sumo/static/img/logos.sprite.png b/kitsune/sumo/static/img/logos.sprite.png similarity index 100% rename from apps/sumo/static/img/logos.sprite.png rename to kitsune/sumo/static/img/logos.sprite.png diff --git a/apps/sumo/static/img/markup.png b/kitsune/sumo/static/img/markup.png similarity index 100% rename from apps/sumo/static/img/markup.png rename to kitsune/sumo/static/img/markup.png diff --git a/apps/sumo/static/img/mobile/answers-sprite-2x.png b/kitsune/sumo/static/img/mobile/answers-sprite-2x.png similarity index 100% rename from apps/sumo/static/img/mobile/answers-sprite-2x.png rename to kitsune/sumo/static/img/mobile/answers-sprite-2x.png diff --git a/apps/sumo/static/img/mobile/answers-sprite.png b/kitsune/sumo/static/img/mobile/answers-sprite.png similarity index 100% rename from apps/sumo/static/img/mobile/answers-sprite.png rename to kitsune/sumo/static/img/mobile/answers-sprite.png diff --git a/apps/sumo/static/img/mobile/arrow.svg b/kitsune/sumo/static/img/mobile/arrow.svg similarity index 100% rename from apps/sumo/static/img/mobile/arrow.svg rename to kitsune/sumo/static/img/mobile/arrow.svg diff --git a/apps/sumo/static/img/mobile/handle-2x.png b/kitsune/sumo/static/img/mobile/handle-2x.png similarity index 100% rename from apps/sumo/static/img/mobile/handle-2x.png rename to kitsune/sumo/static/img/mobile/handle-2x.png diff --git a/apps/sumo/static/img/mobile/handle.png b/kitsune/sumo/static/img/mobile/handle.png similarity index 100% rename from apps/sumo/static/img/mobile/handle.png rename to kitsune/sumo/static/img/mobile/handle.png diff --git a/apps/sumo/static/img/mobile/icons-sprite-2x.png b/kitsune/sumo/static/img/mobile/icons-sprite-2x.png similarity index 100% rename from apps/sumo/static/img/mobile/icons-sprite-2x.png rename to kitsune/sumo/static/img/mobile/icons-sprite-2x.png diff --git a/apps/sumo/static/img/mobile/icons-sprite.png b/kitsune/sumo/static/img/mobile/icons-sprite.png similarity index 100% rename from apps/sumo/static/img/mobile/icons-sprite.png rename to kitsune/sumo/static/img/mobile/icons-sprite.png diff --git a/apps/sumo/static/img/mobile/logos-sprite-2x.png b/kitsune/sumo/static/img/mobile/logos-sprite-2x.png similarity index 100% rename from apps/sumo/static/img/mobile/logos-sprite-2x.png rename to kitsune/sumo/static/img/mobile/logos-sprite-2x.png diff --git a/apps/sumo/static/img/mobile/logos-sprite.png b/kitsune/sumo/static/img/mobile/logos-sprite.png similarity index 100% rename from apps/sumo/static/img/mobile/logos-sprite.png rename to kitsune/sumo/static/img/mobile/logos-sprite.png diff --git a/apps/sumo/static/img/mobile/search-sprite-2x.png b/kitsune/sumo/static/img/mobile/search-sprite-2x.png similarity index 100% rename from apps/sumo/static/img/mobile/search-sprite-2x.png rename to kitsune/sumo/static/img/mobile/search-sprite-2x.png diff --git a/apps/sumo/static/img/mobile/search-sprite.png b/kitsune/sumo/static/img/mobile/search-sprite.png similarity index 100% rename from apps/sumo/static/img/mobile/search-sprite.png rename to kitsune/sumo/static/img/mobile/search-sprite.png diff --git a/apps/sumo/static/img/mobile/topics-sprite-2x.png b/kitsune/sumo/static/img/mobile/topics-sprite-2x.png similarity index 100% rename from apps/sumo/static/img/mobile/topics-sprite-2x.png rename to kitsune/sumo/static/img/mobile/topics-sprite-2x.png diff --git a/apps/sumo/static/img/mobile/topics-sprite.png b/kitsune/sumo/static/img/mobile/topics-sprite.png similarity index 100% rename from apps/sumo/static/img/mobile/topics-sprite.png rename to kitsune/sumo/static/img/mobile/topics-sprite.png diff --git a/apps/sumo/static/img/mobile/wordmark.png b/kitsune/sumo/static/img/mobile/wordmark.png similarity index 100% rename from apps/sumo/static/img/mobile/wordmark.png rename to kitsune/sumo/static/img/mobile/wordmark.png diff --git a/apps/sumo/static/img/moz-heroes.jpg b/kitsune/sumo/static/img/moz-heroes.jpg similarity index 100% rename from apps/sumo/static/img/moz-heroes.jpg rename to kitsune/sumo/static/img/moz-heroes.jpg diff --git a/apps/sumo/static/img/mozilla-logo.png b/kitsune/sumo/static/img/mozilla-logo.png similarity index 100% rename from apps/sumo/static/img/mozilla-logo.png rename to kitsune/sumo/static/img/mozilla-logo.png diff --git a/apps/sumo/static/img/mozilla-support.png b/kitsune/sumo/static/img/mozilla-support.png similarity index 100% rename from apps/sumo/static/img/mozilla-support.png rename to kitsune/sumo/static/img/mozilla-support.png diff --git a/apps/sumo/static/img/mozilla-tab.png b/kitsune/sumo/static/img/mozilla-tab.png similarity index 100% rename from apps/sumo/static/img/mozilla-tab.png rename to kitsune/sumo/static/img/mozilla-tab.png diff --git a/apps/sumo/static/img/notifications-sprite.png b/kitsune/sumo/static/img/notifications-sprite.png similarity index 100% rename from apps/sumo/static/img/notifications-sprite.png rename to kitsune/sumo/static/img/notifications-sprite.png diff --git a/apps/sumo/static/img/nurse.mobile.small.gif b/kitsune/sumo/static/img/nurse.mobile.small.gif similarity index 100% rename from apps/sumo/static/img/nurse.mobile.small.gif rename to kitsune/sumo/static/img/nurse.mobile.small.gif diff --git a/apps/sumo/static/img/nurse.mobile.small.png b/kitsune/sumo/static/img/nurse.mobile.small.png similarity index 100% rename from apps/sumo/static/img/nurse.mobile.small.png rename to kitsune/sumo/static/img/nurse.mobile.small.png diff --git a/apps/sumo/static/img/nurse.small.png b/kitsune/sumo/static/img/nurse.small.png similarity index 100% rename from apps/sumo/static/img/nurse.small.png rename to kitsune/sumo/static/img/nurse.small.png diff --git a/apps/sumo/static/img/page-button-bg.png b/kitsune/sumo/static/img/page-button-bg.png similarity index 100% rename from apps/sumo/static/img/page-button-bg.png rename to kitsune/sumo/static/img/page-button-bg.png diff --git a/apps/sumo/static/img/page-button-ends.png b/kitsune/sumo/static/img/page-button-ends.png similarity index 100% rename from apps/sumo/static/img/page-button-ends.png rename to kitsune/sumo/static/img/page-button-ends.png diff --git a/apps/sumo/static/img/pixel.gif b/kitsune/sumo/static/img/pixel.gif similarity index 100% rename from apps/sumo/static/img/pixel.gif rename to kitsune/sumo/static/img/pixel.gif diff --git a/apps/sumo/static/img/placeholder.gif b/kitsune/sumo/static/img/placeholder.gif similarity index 100% rename from apps/sumo/static/img/placeholder.gif rename to kitsune/sumo/static/img/placeholder.gif diff --git a/apps/sumo/static/img/promo.plugins.png b/kitsune/sumo/static/img/promo.plugins.png similarity index 100% rename from apps/sumo/static/img/promo.plugins.png rename to kitsune/sumo/static/img/promo.plugins.png diff --git a/apps/sumo/static/img/promo.sumo.png b/kitsune/sumo/static/img/promo.sumo.png similarity index 100% rename from apps/sumo/static/img/promo.sumo.png rename to kitsune/sumo/static/img/promo.sumo.png diff --git a/apps/sumo/static/img/questions/bkg.divider.png b/kitsune/sumo/static/img/questions/bkg.divider.png similarity index 100% rename from apps/sumo/static/img/questions/bkg.divider.png rename to kitsune/sumo/static/img/questions/bkg.divider.png diff --git a/apps/sumo/static/img/questions/filter.sprite.png b/kitsune/sumo/static/img/questions/filter.sprite.png similarity index 100% rename from apps/sumo/static/img/questions/filter.sprite.png rename to kitsune/sumo/static/img/questions/filter.sprite.png diff --git a/apps/sumo/static/img/questions/icon.plugin.gif b/kitsune/sumo/static/img/questions/icon.plugin.gif similarity index 100% rename from apps/sumo/static/img/questions/icon.plugin.gif rename to kitsune/sumo/static/img/questions/icon.plugin.gif diff --git a/apps/sumo/static/img/questions/icon.questionmark.png b/kitsune/sumo/static/img/questions/icon.questionmark.png similarity index 100% rename from apps/sumo/static/img/questions/icon.questionmark.png rename to kitsune/sumo/static/img/questions/icon.questionmark.png diff --git a/apps/sumo/static/img/search-icons-sprite.png b/kitsune/sumo/static/img/search-icons-sprite.png similarity index 100% rename from apps/sumo/static/img/search-icons-sprite.png rename to kitsune/sumo/static/img/search-icons-sprite.png diff --git a/apps/sumo/static/img/search/active-tab.png b/kitsune/sumo/static/img/search/active-tab.png similarity index 100% rename from apps/sumo/static/img/search/active-tab.png rename to kitsune/sumo/static/img/search/active-tab.png diff --git a/apps/sumo/static/img/search/icons.png b/kitsune/sumo/static/img/search/icons.png similarity index 100% rename from apps/sumo/static/img/search/icons.png rename to kitsune/sumo/static/img/search/icons.png diff --git a/apps/sumo/static/img/search/submit-button-bg.png b/kitsune/sumo/static/img/search/submit-button-bg.png similarity index 100% rename from apps/sumo/static/img/search/submit-button-bg.png rename to kitsune/sumo/static/img/search/submit-button-bg.png diff --git a/apps/sumo/static/img/search/wait.gif b/kitsune/sumo/static/img/search/wait.gif similarity index 100% rename from apps/sumo/static/img/search/wait.gif rename to kitsune/sumo/static/img/search/wait.gif diff --git a/apps/sumo/static/img/sidebar-arrow.gif b/kitsune/sumo/static/img/sidebar-arrow.gif similarity index 100% rename from apps/sumo/static/img/sidebar-arrow.gif rename to kitsune/sumo/static/img/sidebar-arrow.gif diff --git a/apps/sumo/static/img/sumo-logo.png b/kitsune/sumo/static/img/sumo-logo.png similarity index 100% rename from apps/sumo/static/img/sumo-logo.png rename to kitsune/sumo/static/img/sumo-logo.png diff --git a/apps/sumo/static/img/topbar.png b/kitsune/sumo/static/img/topbar.png similarity index 100% rename from apps/sumo/static/img/topbar.png rename to kitsune/sumo/static/img/topbar.png diff --git a/apps/sumo/static/img/video-thumb.png b/kitsune/sumo/static/img/video-thumb.png similarity index 100% rename from apps/sumo/static/img/video-thumb.png rename to kitsune/sumo/static/img/video-thumb.png diff --git a/apps/sumo/static/img/wait-trans.gif b/kitsune/sumo/static/img/wait-trans.gif similarity index 100% rename from apps/sumo/static/img/wait-trans.gif rename to kitsune/sumo/static/img/wait-trans.gif diff --git a/apps/sumo/static/img/warning-stripes.png b/kitsune/sumo/static/img/warning-stripes.png similarity index 100% rename from apps/sumo/static/img/warning-stripes.png rename to kitsune/sumo/static/img/warning-stripes.png diff --git a/apps/sumo/static/img/wiki/aoa.banner.nurse.png b/kitsune/sumo/static/img/wiki/aoa.banner.nurse.png similarity index 100% rename from apps/sumo/static/img/wiki/aoa.banner.nurse.png rename to kitsune/sumo/static/img/wiki/aoa.banner.nurse.png diff --git a/apps/sumo/static/img/wiki/bkg.article.jpg b/kitsune/sumo/static/img/wiki/bkg.article.jpg similarity index 100% rename from apps/sumo/static/img/wiki/bkg.article.jpg rename to kitsune/sumo/static/img/wiki/bkg.article.jpg diff --git a/apps/sumo/static/img/wiki/bkg.article.rtl.jpg b/kitsune/sumo/static/img/wiki/bkg.article.rtl.jpg similarity index 100% rename from apps/sumo/static/img/wiki/bkg.article.rtl.jpg rename to kitsune/sumo/static/img/wiki/bkg.article.rtl.jpg diff --git a/apps/sumo/static/img/wiki/bkg.collapsibles.png b/kitsune/sumo/static/img/wiki/bkg.collapsibles.png similarity index 100% rename from apps/sumo/static/img/wiki/bkg.collapsibles.png rename to kitsune/sumo/static/img/wiki/bkg.collapsibles.png diff --git a/apps/sumo/static/img/wiki/bkg.main.top.png b/kitsune/sumo/static/img/wiki/bkg.main.top.png similarity index 100% rename from apps/sumo/static/img/wiki/bkg.main.top.png rename to kitsune/sumo/static/img/wiki/bkg.main.top.png diff --git a/apps/sumo/static/img/wiki/bkg.main.top.rtl.png b/kitsune/sumo/static/img/wiki/bkg.main.top.rtl.png similarity index 100% rename from apps/sumo/static/img/wiki/bkg.main.top.rtl.png rename to kitsune/sumo/static/img/wiki/bkg.main.top.rtl.png diff --git a/apps/sumo/static/img/wiki/bkg.showfor.selector.gif b/kitsune/sumo/static/img/wiki/bkg.showfor.selector.gif similarity index 100% rename from apps/sumo/static/img/wiki/bkg.showfor.selector.gif rename to kitsune/sumo/static/img/wiki/bkg.showfor.selector.gif diff --git a/apps/sumo/static/img/wiki/bkg.warning.png b/kitsune/sumo/static/img/wiki/bkg.warning.png similarity index 100% rename from apps/sumo/static/img/wiki/bkg.warning.png rename to kitsune/sumo/static/img/wiki/bkg.warning.png diff --git a/apps/sumo/static/img/wiki/compare.arrows.png b/kitsune/sumo/static/img/wiki/compare.arrows.png similarity index 100% rename from apps/sumo/static/img/wiki/compare.arrows.png rename to kitsune/sumo/static/img/wiki/compare.arrows.png diff --git a/apps/sumo/static/img/wiki/document.divider.jpg b/kitsune/sumo/static/img/wiki/document.divider.jpg similarity index 100% rename from apps/sumo/static/img/wiki/document.divider.jpg rename to kitsune/sumo/static/img/wiki/document.divider.jpg diff --git a/apps/sumo/static/img/wiki/icon-no.gif b/kitsune/sumo/static/img/wiki/icon-no.gif similarity index 100% rename from apps/sumo/static/img/wiki/icon-no.gif rename to kitsune/sumo/static/img/wiki/icon-no.gif diff --git a/apps/sumo/static/img/wiki/icon-yes.gif b/kitsune/sumo/static/img/wiki/icon-yes.gif similarity index 100% rename from apps/sumo/static/img/wiki/icon-yes.gif rename to kitsune/sumo/static/img/wiki/icon-yes.gif diff --git a/apps/sumo/static/img/wiki/icons.quicklinks.png b/kitsune/sumo/static/img/wiki/icons.quicklinks.png similarity index 100% rename from apps/sumo/static/img/wiki/icons.quicklinks.png rename to kitsune/sumo/static/img/wiki/icons.quicklinks.png diff --git a/apps/sumo/static/img/wiki/list.divider.png b/kitsune/sumo/static/img/wiki/list.divider.png similarity index 100% rename from apps/sumo/static/img/wiki/list.divider.png rename to kitsune/sumo/static/img/wiki/list.divider.png diff --git a/apps/sumo/static/img/wiki/morehelp.nurse.gif b/kitsune/sumo/static/img/wiki/morehelp.nurse.gif similarity index 100% rename from apps/sumo/static/img/wiki/morehelp.nurse.gif rename to kitsune/sumo/static/img/wiki/morehelp.nurse.gif diff --git a/apps/sumo/static/img/wiki/morehelp.nurse.png b/kitsune/sumo/static/img/wiki/morehelp.nurse.png similarity index 100% rename from apps/sumo/static/img/wiki/morehelp.nurse.png rename to kitsune/sumo/static/img/wiki/morehelp.nurse.png diff --git a/apps/sumo/static/js/aaq.js b/kitsune/sumo/static/js/aaq.js similarity index 100% rename from apps/sumo/static/js/aaq.js rename to kitsune/sumo/static/js/aaq.js diff --git a/apps/sumo/static/js/ace.mode-sumo.js b/kitsune/sumo/static/js/ace.mode-sumo.js similarity index 100% rename from apps/sumo/static/js/ace.mode-sumo.js rename to kitsune/sumo/static/js/ace.mode-sumo.js diff --git a/apps/sumo/static/js/ajaxform.js b/kitsune/sumo/static/js/ajaxform.js similarity index 100% rename from apps/sumo/static/js/ajaxform.js rename to kitsune/sumo/static/js/ajaxform.js diff --git a/apps/sumo/static/js/ajaxpreview.js b/kitsune/sumo/static/js/ajaxpreview.js similarity index 100% rename from apps/sumo/static/js/ajaxpreview.js rename to kitsune/sumo/static/js/ajaxpreview.js diff --git a/apps/sumo/static/js/ajaxvote.js b/kitsune/sumo/static/js/ajaxvote.js similarity index 100% rename from apps/sumo/static/js/ajaxvote.js rename to kitsune/sumo/static/js/ajaxvote.js diff --git a/apps/sumo/static/js/analytics.js b/kitsune/sumo/static/js/analytics.js similarity index 100% rename from apps/sumo/static/js/analytics.js rename to kitsune/sumo/static/js/analytics.js diff --git a/apps/sumo/static/js/browserdetect.js b/kitsune/sumo/static/js/browserdetect.js similarity index 100% rename from apps/sumo/static/js/browserdetect.js rename to kitsune/sumo/static/js/browserdetect.js diff --git a/apps/sumo/static/js/customercare.js b/kitsune/sumo/static/js/customercare.js similarity index 100% rename from apps/sumo/static/js/customercare.js rename to kitsune/sumo/static/js/customercare.js diff --git a/apps/sumo/static/js/dashboards.js b/kitsune/sumo/static/js/dashboards.js similarity index 100% rename from apps/sumo/static/js/dashboards.js rename to kitsune/sumo/static/js/dashboards.js diff --git a/apps/sumo/static/js/diff.js b/kitsune/sumo/static/js/diff.js similarity index 100% rename from apps/sumo/static/js/diff.js rename to kitsune/sumo/static/js/diff.js diff --git a/apps/sumo/static/js/editable.js b/kitsune/sumo/static/js/editable.js similarity index 100% rename from apps/sumo/static/js/editable.js rename to kitsune/sumo/static/js/editable.js diff --git a/apps/sumo/static/js/format.js b/kitsune/sumo/static/js/format.js similarity index 100% rename from apps/sumo/static/js/format.js rename to kitsune/sumo/static/js/format.js diff --git a/apps/sumo/static/js/forums.js b/kitsune/sumo/static/js/forums.js similarity index 100% rename from apps/sumo/static/js/forums.js rename to kitsune/sumo/static/js/forums.js diff --git a/apps/sumo/static/js/gallery.js b/kitsune/sumo/static/js/gallery.js similarity index 100% rename from apps/sumo/static/js/gallery.js rename to kitsune/sumo/static/js/gallery.js diff --git a/apps/sumo/static/js/groups.js b/kitsune/sumo/static/js/groups.js similarity index 100% rename from apps/sumo/static/js/groups.js rename to kitsune/sumo/static/js/groups.js diff --git a/apps/sumo/static/js/historycharts.js b/kitsune/sumo/static/js/historycharts.js similarity index 100% rename from apps/sumo/static/js/historycharts.js rename to kitsune/sumo/static/js/historycharts.js diff --git a/apps/sumo/static/js/i18n.js b/kitsune/sumo/static/js/i18n.js similarity index 100% rename from apps/sumo/static/js/i18n.js rename to kitsune/sumo/static/js/i18n.js diff --git a/apps/sumo/static/js/karma.dashboard.js b/kitsune/sumo/static/js/karma.dashboard.js similarity index 100% rename from apps/sumo/static/js/karma.dashboard.js rename to kitsune/sumo/static/js/karma.dashboard.js diff --git a/apps/sumo/static/js/kbox.js b/kitsune/sumo/static/js/kbox.js similarity index 100% rename from apps/sumo/static/js/kbox.js rename to kitsune/sumo/static/js/kbox.js diff --git a/apps/sumo/static/js/kpi.dashboard.js b/kitsune/sumo/static/js/kpi.dashboard.js similarity index 100% rename from apps/sumo/static/js/kpi.dashboard.js rename to kitsune/sumo/static/js/kpi.dashboard.js diff --git a/apps/sumo/static/js/libs/backbone.js b/kitsune/sumo/static/js/libs/backbone.js similarity index 100% rename from apps/sumo/static/js/libs/backbone.js rename to kitsune/sumo/static/js/libs/backbone.js diff --git a/apps/sumo/static/js/libs/d3.js b/kitsune/sumo/static/js/libs/d3.js similarity index 100% rename from apps/sumo/static/js/libs/d3.js rename to kitsune/sumo/static/js/libs/d3.js diff --git a/apps/sumo/static/js/libs/d3.layout.min.js b/kitsune/sumo/static/js/libs/d3.layout.min.js similarity index 100% rename from apps/sumo/static/js/libs/d3.layout.min.js rename to kitsune/sumo/static/js/libs/d3.layout.min.js diff --git a/apps/sumo/static/js/libs/diff_match_patch_uncompressed.js b/kitsune/sumo/static/js/libs/diff_match_patch_uncompressed.js similarity index 100% rename from apps/sumo/static/js/libs/diff_match_patch_uncompressed.js rename to kitsune/sumo/static/js/libs/diff_match_patch_uncompressed.js diff --git a/apps/sumo/static/js/libs/django/prepopulate.js b/kitsune/sumo/static/js/libs/django/prepopulate.js similarity index 100% rename from apps/sumo/static/js/libs/django/prepopulate.js rename to kitsune/sumo/static/js/libs/django/prepopulate.js diff --git a/apps/sumo/static/js/libs/django/urlify.js b/kitsune/sumo/static/js/libs/django/urlify.js similarity index 100% rename from apps/sumo/static/js/libs/django/urlify.js rename to kitsune/sumo/static/js/libs/django/urlify.js diff --git a/apps/sumo/static/js/libs/html5-shiv.js b/kitsune/sumo/static/js/libs/html5-shiv.js similarity index 100% rename from apps/sumo/static/js/libs/html5-shiv.js rename to kitsune/sumo/static/js/libs/html5-shiv.js diff --git a/apps/sumo/static/js/libs/jquery-1.7.1.min.js b/kitsune/sumo/static/js/libs/jquery-1.7.1.min.js similarity index 100% rename from apps/sumo/static/js/libs/jquery-1.7.1.min.js rename to kitsune/sumo/static/js/libs/jquery-1.7.1.min.js diff --git a/apps/sumo/static/js/libs/jquery-1.8.2.min.js b/kitsune/sumo/static/js/libs/jquery-1.8.2.min.js similarity index 100% rename from apps/sumo/static/js/libs/jquery-1.8.2.min.js rename to kitsune/sumo/static/js/libs/jquery-1.8.2.min.js diff --git a/apps/sumo/static/js/libs/jquery.NobleCount.js b/kitsune/sumo/static/js/libs/jquery.NobleCount.js similarity index 100% rename from apps/sumo/static/js/libs/jquery.NobleCount.js rename to kitsune/sumo/static/js/libs/jquery.NobleCount.js diff --git a/apps/sumo/static/js/libs/jquery.ajaxupload.js b/kitsune/sumo/static/js/libs/jquery.ajaxupload.js similarity index 100% rename from apps/sumo/static/js/libs/jquery.ajaxupload.js rename to kitsune/sumo/static/js/libs/jquery.ajaxupload.js diff --git a/apps/sumo/static/js/libs/jquery.autoresize.js b/kitsune/sumo/static/js/libs/jquery.autoresize.js similarity index 100% rename from apps/sumo/static/js/libs/jquery.autoresize.js rename to kitsune/sumo/static/js/libs/jquery.autoresize.js diff --git a/apps/sumo/static/js/libs/jquery.bullseye-1.0.min.js b/kitsune/sumo/static/js/libs/jquery.bullseye-1.0.min.js similarity index 100% rename from apps/sumo/static/js/libs/jquery.bullseye-1.0.min.js rename to kitsune/sumo/static/js/libs/jquery.bullseye-1.0.min.js diff --git a/apps/sumo/static/js/libs/jquery.cookie.js b/kitsune/sumo/static/js/libs/jquery.cookie.js similarity index 100% rename from apps/sumo/static/js/libs/jquery.cookie.js rename to kitsune/sumo/static/js/libs/jquery.cookie.js diff --git a/apps/sumo/static/js/libs/jquery.lazyload.js b/kitsune/sumo/static/js/libs/jquery.lazyload.js similarity index 100% rename from apps/sumo/static/js/libs/jquery.lazyload.js rename to kitsune/sumo/static/js/libs/jquery.lazyload.js diff --git a/apps/sumo/static/js/libs/jquery.min.js b/kitsune/sumo/static/js/libs/jquery.min.js similarity index 100% rename from apps/sumo/static/js/libs/jquery.min.js rename to kitsune/sumo/static/js/libs/jquery.min.js diff --git a/apps/sumo/static/js/libs/jquery.mockjax.js b/kitsune/sumo/static/js/libs/jquery.mockjax.js similarity index 100% rename from apps/sumo/static/js/libs/jquery.mockjax.js rename to kitsune/sumo/static/js/libs/jquery.mockjax.js diff --git a/apps/sumo/static/js/libs/jquery.placeholder.js b/kitsune/sumo/static/js/libs/jquery.placeholder.js similarity index 100% rename from apps/sumo/static/js/libs/jquery.placeholder.js rename to kitsune/sumo/static/js/libs/jquery.placeholder.js diff --git a/apps/sumo/static/js/libs/jquery.selectbox-1.2.js b/kitsune/sumo/static/js/libs/jquery.selectbox-1.2.js similarity index 100% rename from apps/sumo/static/js/libs/jquery.selectbox-1.2.js rename to kitsune/sumo/static/js/libs/jquery.selectbox-1.2.js diff --git a/apps/sumo/static/js/libs/jquery.tokeninput.js b/kitsune/sumo/static/js/libs/jquery.tokeninput.js similarity index 100% rename from apps/sumo/static/js/libs/jquery.tokeninput.js rename to kitsune/sumo/static/js/libs/jquery.tokeninput.js diff --git a/apps/sumo/static/js/libs/jqueryui.js b/kitsune/sumo/static/js/libs/jqueryui.js similarity index 100% rename from apps/sumo/static/js/libs/jqueryui.js rename to kitsune/sumo/static/js/libs/jqueryui.js diff --git a/apps/sumo/static/js/libs/jstestnet.js b/kitsune/sumo/static/js/libs/jstestnet.js similarity index 100% rename from apps/sumo/static/js/libs/jstestnet.js rename to kitsune/sumo/static/js/libs/jstestnet.js diff --git a/apps/sumo/static/js/libs/modernizr-2.6.1.js b/kitsune/sumo/static/js/libs/modernizr-2.6.1.js similarity index 100% rename from apps/sumo/static/js/libs/modernizr-2.6.1.js rename to kitsune/sumo/static/js/libs/modernizr-2.6.1.js diff --git a/apps/sumo/static/js/libs/nwmatcher-1.2.5.js b/kitsune/sumo/static/js/libs/nwmatcher-1.2.5.js similarity index 100% rename from apps/sumo/static/js/libs/nwmatcher-1.2.5.js rename to kitsune/sumo/static/js/libs/nwmatcher-1.2.5.js diff --git a/apps/sumo/static/js/libs/rickshaw.js b/kitsune/sumo/static/js/libs/rickshaw.js similarity index 100% rename from apps/sumo/static/js/libs/rickshaw.js rename to kitsune/sumo/static/js/libs/rickshaw.js diff --git a/apps/sumo/static/js/libs/selectivizr-1.0.2.js b/kitsune/sumo/static/js/libs/selectivizr-1.0.2.js similarity index 100% rename from apps/sumo/static/js/libs/selectivizr-1.0.2.js rename to kitsune/sumo/static/js/libs/selectivizr-1.0.2.js diff --git a/apps/sumo/static/js/libs/swfobject.js b/kitsune/sumo/static/js/libs/swfobject.js similarity index 100% rename from apps/sumo/static/js/libs/swfobject.js rename to kitsune/sumo/static/js/libs/swfobject.js diff --git a/apps/sumo/static/js/libs/underscore.js b/kitsune/sumo/static/js/libs/underscore.js similarity index 100% rename from apps/sumo/static/js/libs/underscore.js rename to kitsune/sumo/static/js/libs/underscore.js diff --git a/apps/sumo/static/js/main.js b/kitsune/sumo/static/js/main.js similarity index 100% rename from apps/sumo/static/js/main.js rename to kitsune/sumo/static/js/main.js diff --git a/apps/sumo/static/js/markup.js b/kitsune/sumo/static/js/markup.js similarity index 100% rename from apps/sumo/static/js/markup.js rename to kitsune/sumo/static/js/markup.js diff --git a/apps/sumo/static/js/messages.js b/kitsune/sumo/static/js/messages.js similarity index 100% rename from apps/sumo/static/js/messages.js rename to kitsune/sumo/static/js/messages.js diff --git a/apps/sumo/static/js/mobile/questions.js b/kitsune/sumo/static/js/mobile/questions.js similarity index 100% rename from apps/sumo/static/js/mobile/questions.js rename to kitsune/sumo/static/js/mobile/questions.js diff --git a/apps/sumo/static/js/mobile/ui.js b/kitsune/sumo/static/js/mobile/ui.js similarity index 100% rename from apps/sumo/static/js/mobile/ui.js rename to kitsune/sumo/static/js/mobile/ui.js diff --git a/apps/sumo/static/js/mobile/wiki.js b/kitsune/sumo/static/js/mobile/wiki.js similarity index 100% rename from apps/sumo/static/js/mobile/wiki.js rename to kitsune/sumo/static/js/mobile/wiki.js diff --git a/apps/sumo/static/js/questions.js b/kitsune/sumo/static/js/questions.js similarity index 100% rename from apps/sumo/static/js/questions.js rename to kitsune/sumo/static/js/questions.js diff --git a/apps/sumo/static/js/questions.metrics.js b/kitsune/sumo/static/js/questions.metrics.js similarity index 100% rename from apps/sumo/static/js/questions.metrics.js rename to kitsune/sumo/static/js/questions.metrics.js diff --git a/apps/sumo/static/js/questions.stats.js b/kitsune/sumo/static/js/questions.stats.js similarity index 100% rename from apps/sumo/static/js/questions.stats.js rename to kitsune/sumo/static/js/questions.stats.js diff --git a/apps/sumo/static/js/readtracker.js b/kitsune/sumo/static/js/readtracker.js similarity index 100% rename from apps/sumo/static/js/readtracker.js rename to kitsune/sumo/static/js/readtracker.js diff --git a/apps/sumo/static/js/reportabuse.js b/kitsune/sumo/static/js/reportabuse.js similarity index 100% rename from apps/sumo/static/js/reportabuse.js rename to kitsune/sumo/static/js/reportabuse.js diff --git a/apps/sumo/static/js/rickshaw_utils.js b/kitsune/sumo/static/js/rickshaw_utils.js similarity index 100% rename from apps/sumo/static/js/rickshaw_utils.js rename to kitsune/sumo/static/js/rickshaw_utils.js diff --git a/apps/sumo/static/js/screencast.js b/kitsune/sumo/static/js/screencast.js similarity index 100% rename from apps/sumo/static/js/screencast.js rename to kitsune/sumo/static/js/screencast.js diff --git a/apps/sumo/static/js/search.js b/kitsune/sumo/static/js/search.js similarity index 100% rename from apps/sumo/static/js/search.js rename to kitsune/sumo/static/js/search.js diff --git a/apps/sumo/static/js/showfor.js b/kitsune/sumo/static/js/showfor.js similarity index 100% rename from apps/sumo/static/js/showfor.js rename to kitsune/sumo/static/js/showfor.js diff --git a/apps/sumo/static/js/surveygizmo.js b/kitsune/sumo/static/js/surveygizmo.js similarity index 100% rename from apps/sumo/static/js/surveygizmo.js rename to kitsune/sumo/static/js/surveygizmo.js diff --git a/apps/sumo/static/js/tags.filter.js b/kitsune/sumo/static/js/tags.filter.js similarity index 100% rename from apps/sumo/static/js/tags.filter.js rename to kitsune/sumo/static/js/tags.filter.js diff --git a/apps/sumo/static/js/tags.js b/kitsune/sumo/static/js/tags.js similarity index 100% rename from apps/sumo/static/js/tags.js rename to kitsune/sumo/static/js/tags.js diff --git a/apps/sumo/static/js/tests/ajaxpreviewtests.js b/kitsune/sumo/static/js/tests/ajaxpreviewtests.js similarity index 100% rename from apps/sumo/static/js/tests/ajaxpreviewtests.js rename to kitsune/sumo/static/js/tests/ajaxpreviewtests.js diff --git a/apps/sumo/static/js/tests/ajaxvotetests.js b/kitsune/sumo/static/js/tests/ajaxvotetests.js similarity index 100% rename from apps/sumo/static/js/tests/ajaxvotetests.js rename to kitsune/sumo/static/js/tests/ajaxvotetests.js diff --git a/apps/sumo/static/js/tests/browserdetecttests.js b/kitsune/sumo/static/js/tests/browserdetecttests.js similarity index 100% rename from apps/sumo/static/js/tests/browserdetecttests.js rename to kitsune/sumo/static/js/tests/browserdetecttests.js diff --git a/apps/sumo/static/js/tests/commonutilstests.js b/kitsune/sumo/static/js/tests/commonutilstests.js similarity index 100% rename from apps/sumo/static/js/tests/commonutilstests.js rename to kitsune/sumo/static/js/tests/commonutilstests.js diff --git a/apps/sumo/static/js/tests/crashidtests.js b/kitsune/sumo/static/js/tests/crashidtests.js similarity index 100% rename from apps/sumo/static/js/tests/crashidtests.js rename to kitsune/sumo/static/js/tests/crashidtests.js diff --git a/apps/sumo/static/js/tests/kboxtests.js b/kitsune/sumo/static/js/tests/kboxtests.js similarity index 100% rename from apps/sumo/static/js/tests/kboxtests.js rename to kitsune/sumo/static/js/tests/kboxtests.js diff --git a/apps/sumo/static/js/tests/lazyloadtests.js b/kitsune/sumo/static/js/tests/lazyloadtests.js similarity index 100% rename from apps/sumo/static/js/tests/lazyloadtests.js rename to kitsune/sumo/static/js/tests/lazyloadtests.js diff --git a/apps/sumo/static/js/tests/showfortests.js b/kitsune/sumo/static/js/tests/showfortests.js similarity index 100% rename from apps/sumo/static/js/tests/showfortests.js rename to kitsune/sumo/static/js/tests/showfortests.js diff --git a/apps/sumo/static/js/tests/suite.json b/kitsune/sumo/static/js/tests/suite.json similarity index 100% rename from apps/sumo/static/js/tests/suite.json rename to kitsune/sumo/static/js/tests/suite.json diff --git a/apps/sumo/static/js/tests/tagsfiltertests.js b/kitsune/sumo/static/js/tests/tagsfiltertests.js similarity index 100% rename from apps/sumo/static/js/tests/tagsfiltertests.js rename to kitsune/sumo/static/js/tests/tagsfiltertests.js diff --git a/apps/sumo/static/js/testutils.js b/kitsune/sumo/static/js/testutils.js similarity index 100% rename from apps/sumo/static/js/testutils.js rename to kitsune/sumo/static/js/testutils.js diff --git a/apps/sumo/static/js/ui.js b/kitsune/sumo/static/js/ui.js similarity index 100% rename from apps/sumo/static/js/ui.js rename to kitsune/sumo/static/js/ui.js diff --git a/apps/sumo/static/js/upload.js b/kitsune/sumo/static/js/upload.js similarity index 100% rename from apps/sumo/static/js/upload.js rename to kitsune/sumo/static/js/upload.js diff --git a/apps/sumo/static/js/users.autocomplete.js b/kitsune/sumo/static/js/users.autocomplete.js similarity index 100% rename from apps/sumo/static/js/users.autocomplete.js rename to kitsune/sumo/static/js/users.autocomplete.js diff --git a/apps/sumo/static/js/users.js b/kitsune/sumo/static/js/users.js similarity index 100% rename from apps/sumo/static/js/users.js rename to kitsune/sumo/static/js/users.js diff --git a/apps/sumo/static/js/wiki.dashboard.js b/kitsune/sumo/static/js/wiki.dashboard.js similarity index 100% rename from apps/sumo/static/js/wiki.dashboard.js rename to kitsune/sumo/static/js/wiki.dashboard.js diff --git a/apps/sumo/static/js/wiki.js b/kitsune/sumo/static/js/wiki.js similarity index 100% rename from apps/sumo/static/js/wiki.js rename to kitsune/sumo/static/js/wiki.js diff --git a/apps/sumo/static/js/wiki.metrics.js b/kitsune/sumo/static/js/wiki.metrics.js similarity index 100% rename from apps/sumo/static/js/wiki.metrics.js rename to kitsune/sumo/static/js/wiki.metrics.js diff --git a/apps/sumo/static/less/customercare.less b/kitsune/sumo/static/less/customercare.less similarity index 100% rename from apps/sumo/static/less/customercare.less rename to kitsune/sumo/static/less/customercare.less diff --git a/apps/sumo/static/less/fonts.less b/kitsune/sumo/static/less/fonts.less similarity index 100% rename from apps/sumo/static/less/fonts.less rename to kitsune/sumo/static/less/fonts.less diff --git a/apps/sumo/static/less/forums.less b/kitsune/sumo/static/less/forums.less similarity index 100% rename from apps/sumo/static/less/forums.less rename to kitsune/sumo/static/less/forums.less diff --git a/apps/sumo/static/less/gallery.less b/kitsune/sumo/static/less/gallery.less similarity index 100% rename from apps/sumo/static/less/gallery.less rename to kitsune/sumo/static/less/gallery.less diff --git a/apps/sumo/static/less/grid.less b/kitsune/sumo/static/less/grid.less similarity index 100% rename from apps/sumo/static/less/grid.less rename to kitsune/sumo/static/less/grid.less diff --git a/apps/sumo/static/less/home.less b/kitsune/sumo/static/less/home.less similarity index 100% rename from apps/sumo/static/less/home.less rename to kitsune/sumo/static/less/home.less diff --git a/apps/sumo/static/less/includes/details.less b/kitsune/sumo/static/less/includes/details.less similarity index 100% rename from apps/sumo/static/less/includes/details.less rename to kitsune/sumo/static/less/includes/details.less diff --git a/apps/sumo/static/less/includes/editor-tools.less b/kitsune/sumo/static/less/includes/editor-tools.less similarity index 100% rename from apps/sumo/static/less/includes/editor-tools.less rename to kitsune/sumo/static/less/includes/editor-tools.less diff --git a/apps/sumo/static/less/includes/for-contributors-hot-topics.less b/kitsune/sumo/static/less/includes/for-contributors-hot-topics.less similarity index 100% rename from apps/sumo/static/less/includes/for-contributors-hot-topics.less rename to kitsune/sumo/static/less/includes/for-contributors-hot-topics.less diff --git a/apps/sumo/static/less/includes/help-topics.less b/kitsune/sumo/static/less/includes/help-topics.less similarity index 100% rename from apps/sumo/static/less/includes/help-topics.less rename to kitsune/sumo/static/less/includes/help-topics.less diff --git a/apps/sumo/static/less/includes/kbox.less b/kitsune/sumo/static/less/includes/kbox.less similarity index 100% rename from apps/sumo/static/less/includes/kbox.less rename to kitsune/sumo/static/less/includes/kbox.less diff --git a/apps/sumo/static/less/includes/product-title.less b/kitsune/sumo/static/less/includes/product-title.less similarity index 100% rename from apps/sumo/static/less/includes/product-title.less rename to kitsune/sumo/static/less/includes/product-title.less diff --git a/apps/sumo/static/less/includes/search-result.less b/kitsune/sumo/static/less/includes/search-result.less similarity index 100% rename from apps/sumo/static/less/includes/search-result.less rename to kitsune/sumo/static/less/includes/search-result.less diff --git a/apps/sumo/static/less/includes/wiki-common.less b/kitsune/sumo/static/less/includes/wiki-common.less similarity index 100% rename from apps/sumo/static/less/includes/wiki-common.less rename to kitsune/sumo/static/less/includes/wiki-common.less diff --git a/apps/sumo/static/less/karma.dashboard.less b/kitsune/sumo/static/less/karma.dashboard.less similarity index 100% rename from apps/sumo/static/less/karma.dashboard.less rename to kitsune/sumo/static/less/karma.dashboard.less diff --git a/apps/sumo/static/less/kbdashboards.less b/kitsune/sumo/static/less/kbdashboards.less similarity index 100% rename from apps/sumo/static/less/kbdashboards.less rename to kitsune/sumo/static/less/kbdashboards.less diff --git a/apps/sumo/static/less/kpi.dashboard.less b/kitsune/sumo/static/less/kpi.dashboard.less similarity index 100% rename from apps/sumo/static/less/kpi.dashboard.less rename to kitsune/sumo/static/less/kpi.dashboard.less diff --git a/apps/sumo/static/less/landings/get-involved.less b/kitsune/sumo/static/less/landings/get-involved.less similarity index 100% rename from apps/sumo/static/less/landings/get-involved.less rename to kitsune/sumo/static/less/landings/get-involved.less diff --git a/apps/sumo/static/less/locale-switcher.less b/kitsune/sumo/static/less/locale-switcher.less similarity index 100% rename from apps/sumo/static/less/locale-switcher.less rename to kitsune/sumo/static/less/locale-switcher.less diff --git a/apps/sumo/static/less/main.less b/kitsune/sumo/static/less/main.less similarity index 100% rename from apps/sumo/static/less/main.less rename to kitsune/sumo/static/less/main.less diff --git a/apps/sumo/static/less/messages.less b/kitsune/sumo/static/less/messages.less similarity index 100% rename from apps/sumo/static/less/messages.less rename to kitsune/sumo/static/less/messages.less diff --git a/apps/sumo/static/less/mobile/aaq.less b/kitsune/sumo/static/less/mobile/aaq.less similarity index 100% rename from apps/sumo/static/less/mobile/aaq.less rename to kitsune/sumo/static/less/mobile/aaq.less diff --git a/apps/sumo/static/less/mobile/includes/product-switcher.less b/kitsune/sumo/static/less/mobile/includes/product-switcher.less similarity index 100% rename from apps/sumo/static/less/mobile/includes/product-switcher.less rename to kitsune/sumo/static/less/mobile/includes/product-switcher.less diff --git a/apps/sumo/static/less/mobile/landings/get-involved.less b/kitsune/sumo/static/less/mobile/landings/get-involved.less similarity index 100% rename from apps/sumo/static/less/mobile/landings/get-involved.less rename to kitsune/sumo/static/less/mobile/landings/get-involved.less diff --git a/apps/sumo/static/less/mobile/locales.less b/kitsune/sumo/static/less/mobile/locales.less similarity index 100% rename from apps/sumo/static/less/mobile/locales.less rename to kitsune/sumo/static/less/mobile/locales.less diff --git a/apps/sumo/static/less/mobile/main.less b/kitsune/sumo/static/less/mobile/main.less similarity index 100% rename from apps/sumo/static/less/mobile/main.less rename to kitsune/sumo/static/less/mobile/main.less diff --git a/apps/sumo/static/less/mobile/messages.less b/kitsune/sumo/static/less/mobile/messages.less similarity index 100% rename from apps/sumo/static/less/mobile/messages.less rename to kitsune/sumo/static/less/mobile/messages.less diff --git a/apps/sumo/static/less/mobile/mixins.less b/kitsune/sumo/static/less/mobile/mixins.less similarity index 100% rename from apps/sumo/static/less/mobile/mixins.less rename to kitsune/sumo/static/less/mobile/mixins.less diff --git a/apps/sumo/static/less/mobile/products.less b/kitsune/sumo/static/less/mobile/products.less similarity index 100% rename from apps/sumo/static/less/mobile/products.less rename to kitsune/sumo/static/less/mobile/products.less diff --git a/apps/sumo/static/less/mobile/questions.less b/kitsune/sumo/static/less/mobile/questions.less similarity index 100% rename from apps/sumo/static/less/mobile/questions.less rename to kitsune/sumo/static/less/mobile/questions.less diff --git a/apps/sumo/static/less/mobile/search.less b/kitsune/sumo/static/less/mobile/search.less similarity index 100% rename from apps/sumo/static/less/mobile/search.less rename to kitsune/sumo/static/less/mobile/search.less diff --git a/apps/sumo/static/less/mobile/users.less b/kitsune/sumo/static/less/mobile/users.less similarity index 100% rename from apps/sumo/static/less/mobile/users.less rename to kitsune/sumo/static/less/mobile/users.less diff --git a/apps/sumo/static/less/mobile/wiki.less b/kitsune/sumo/static/less/mobile/wiki.less similarity index 100% rename from apps/sumo/static/less/mobile/wiki.less rename to kitsune/sumo/static/less/mobile/wiki.less diff --git a/apps/sumo/static/less/products.less b/kitsune/sumo/static/less/products.less similarity index 100% rename from apps/sumo/static/less/products.less rename to kitsune/sumo/static/less/products.less diff --git a/apps/sumo/static/less/questions.less b/kitsune/sumo/static/less/questions.less similarity index 100% rename from apps/sumo/static/less/questions.less rename to kitsune/sumo/static/less/questions.less diff --git a/apps/sumo/static/less/reportabuse.less b/kitsune/sumo/static/less/reportabuse.less similarity index 100% rename from apps/sumo/static/less/reportabuse.less rename to kitsune/sumo/static/less/reportabuse.less diff --git a/apps/sumo/static/less/rickshaw.sumo.less b/kitsune/sumo/static/less/rickshaw.sumo.less similarity index 100% rename from apps/sumo/static/less/rickshaw.sumo.less rename to kitsune/sumo/static/less/rickshaw.sumo.less diff --git a/apps/sumo/static/less/search.less b/kitsune/sumo/static/less/search.less similarity index 100% rename from apps/sumo/static/less/search.less rename to kitsune/sumo/static/less/search.less diff --git a/apps/sumo/static/less/ui.less b/kitsune/sumo/static/less/ui.less similarity index 100% rename from apps/sumo/static/less/ui.less rename to kitsune/sumo/static/less/ui.less diff --git a/apps/sumo/static/less/users.less b/kitsune/sumo/static/less/users.less similarity index 100% rename from apps/sumo/static/less/users.less rename to kitsune/sumo/static/less/users.less diff --git a/apps/sumo/static/less/variables.less b/kitsune/sumo/static/less/variables.less similarity index 100% rename from apps/sumo/static/less/variables.less rename to kitsune/sumo/static/less/variables.less diff --git a/apps/sumo/static/less/vendors.less b/kitsune/sumo/static/less/vendors.less similarity index 100% rename from apps/sumo/static/less/vendors.less rename to kitsune/sumo/static/less/vendors.less diff --git a/apps/sumo/static/less/wiki.less b/kitsune/sumo/static/less/wiki.less similarity index 100% rename from apps/sumo/static/less/wiki.less rename to kitsune/sumo/static/less/wiki.less diff --git a/apps/sumo/static_finders.py b/kitsune/sumo/static_finders.py similarity index 100% rename from apps/sumo/static_finders.py rename to kitsune/sumo/static_finders.py diff --git a/apps/sumo/templates/admin/change_list.html b/kitsune/sumo/templates/admin/change_list.html similarity index 100% rename from apps/sumo/templates/admin/change_list.html rename to kitsune/sumo/templates/admin/change_list.html diff --git a/apps/sumo/templates/base.html b/kitsune/sumo/templates/base.html similarity index 100% rename from apps/sumo/templates/base.html rename to kitsune/sumo/templates/base.html diff --git a/apps/sumo/templates/email/base.html b/kitsune/sumo/templates/email/base.html similarity index 100% rename from apps/sumo/templates/email/base.html rename to kitsune/sumo/templates/email/base.html diff --git a/apps/sumo/templates/handlers/400.html b/kitsune/sumo/templates/handlers/400.html similarity index 100% rename from apps/sumo/templates/handlers/400.html rename to kitsune/sumo/templates/handlers/400.html diff --git a/apps/sumo/templates/handlers/403.html b/kitsune/sumo/templates/handlers/403.html similarity index 100% rename from apps/sumo/templates/handlers/403.html rename to kitsune/sumo/templates/handlers/403.html diff --git a/apps/sumo/templates/handlers/404.html b/kitsune/sumo/templates/handlers/404.html similarity index 100% rename from apps/sumo/templates/handlers/404.html rename to kitsune/sumo/templates/handlers/404.html diff --git a/apps/sumo/templates/handlers/500.html b/kitsune/sumo/templates/handlers/500.html similarity index 100% rename from apps/sumo/templates/handlers/500.html rename to kitsune/sumo/templates/handlers/500.html diff --git a/apps/sumo/templates/includes/common_macros.html b/kitsune/sumo/templates/includes/common_macros.html similarity index 100% rename from apps/sumo/templates/includes/common_macros.html rename to kitsune/sumo/templates/includes/common_macros.html diff --git a/apps/sumo/templates/includes/lang_form.html b/kitsune/sumo/templates/includes/lang_form.html similarity index 100% rename from apps/sumo/templates/includes/lang_form.html rename to kitsune/sumo/templates/includes/lang_form.html diff --git a/apps/sumo/templates/includes/mobile/common_macros.html b/kitsune/sumo/templates/includes/mobile/common_macros.html similarity index 100% rename from apps/sumo/templates/includes/mobile/common_macros.html rename to kitsune/sumo/templates/includes/mobile/common_macros.html diff --git a/apps/sumo/templates/includes/mobile/paginator.html b/kitsune/sumo/templates/includes/mobile/paginator.html similarity index 100% rename from apps/sumo/templates/includes/mobile/paginator.html rename to kitsune/sumo/templates/includes/mobile/paginator.html diff --git a/apps/sumo/templates/includes/quick_paginator.html b/kitsune/sumo/templates/includes/quick_paginator.html similarity index 100% rename from apps/sumo/templates/includes/quick_paginator.html rename to kitsune/sumo/templates/includes/quick_paginator.html diff --git a/apps/sumo/templates/includes/simple_paginator.html b/kitsune/sumo/templates/includes/simple_paginator.html similarity index 100% rename from apps/sumo/templates/includes/simple_paginator.html rename to kitsune/sumo/templates/includes/simple_paginator.html diff --git a/apps/sumo/templates/includes/unsubscribe_text.ltxt b/kitsune/sumo/templates/includes/unsubscribe_text.ltxt similarity index 100% rename from apps/sumo/templates/includes/unsubscribe_text.ltxt rename to kitsune/sumo/templates/includes/unsubscribe_text.ltxt diff --git a/apps/sumo/templates/layout/breadcrumbs.html b/kitsune/sumo/templates/layout/breadcrumbs.html similarity index 100% rename from apps/sumo/templates/layout/breadcrumbs.html rename to kitsune/sumo/templates/layout/breadcrumbs.html diff --git a/apps/sumo/templates/layout/errorlist.html b/kitsune/sumo/templates/layout/errorlist.html similarity index 100% rename from apps/sumo/templates/layout/errorlist.html rename to kitsune/sumo/templates/layout/errorlist.html diff --git a/apps/sumo/templates/layout/paginator.html b/kitsune/sumo/templates/layout/paginator.html similarity index 100% rename from apps/sumo/templates/layout/paginator.html rename to kitsune/sumo/templates/layout/paginator.html diff --git a/apps/sumo/templates/mobile/base.html b/kitsune/sumo/templates/mobile/base.html similarity index 100% rename from apps/sumo/templates/mobile/base.html rename to kitsune/sumo/templates/mobile/base.html diff --git a/apps/sumo/templates/services/monitor.html b/kitsune/sumo/templates/services/monitor.html similarity index 100% rename from apps/sumo/templates/services/monitor.html rename to kitsune/sumo/templates/services/monitor.html diff --git a/apps/sumo/templates/sumo/deprecated.html b/kitsune/sumo/templates/sumo/deprecated.html similarity index 100% rename from apps/sumo/templates/sumo/deprecated.html rename to kitsune/sumo/templates/sumo/deprecated.html diff --git a/apps/sumo/templates/sumo/locales.html b/kitsune/sumo/templates/sumo/locales.html similarity index 100% rename from apps/sumo/templates/sumo/locales.html rename to kitsune/sumo/templates/sumo/locales.html diff --git a/apps/sumo/templates/sumo/mobile/locales.html b/kitsune/sumo/templates/sumo/mobile/locales.html similarity index 100% rename from apps/sumo/templates/sumo/mobile/locales.html rename to kitsune/sumo/templates/sumo/mobile/locales.html diff --git a/apps/sumo/templates/sumo/read-only.html b/kitsune/sumo/templates/sumo/read-only.html similarity index 100% rename from apps/sumo/templates/sumo/read-only.html rename to kitsune/sumo/templates/sumo/read-only.html diff --git a/apps/sumo/templates/sumo/robots.html b/kitsune/sumo/templates/sumo/robots.html similarity index 100% rename from apps/sumo/templates/sumo/robots.html rename to kitsune/sumo/templates/sumo/robots.html diff --git a/apps/sumo/templates/tests/qunit.html b/kitsune/sumo/templates/tests/qunit.html similarity index 100% rename from apps/sumo/templates/tests/qunit.html rename to kitsune/sumo/templates/tests/qunit.html diff --git a/apps/sumo/templates/wikiparser/hook_image.html b/kitsune/sumo/templates/wikiparser/hook_image.html similarity index 100% rename from apps/sumo/templates/wikiparser/hook_image.html rename to kitsune/sumo/templates/wikiparser/hook_image.html diff --git a/apps/sumo/templates/wikiparser/hook_image_lazy.html b/kitsune/sumo/templates/wikiparser/hook_image_lazy.html similarity index 100% rename from apps/sumo/templates/wikiparser/hook_image_lazy.html rename to kitsune/sumo/templates/wikiparser/hook_image_lazy.html diff --git a/apps/sumo/tests/__init__.py b/kitsune/sumo/tests/__init__.py similarity index 98% rename from apps/sumo/tests/__init__.py rename to kitsune/sumo/tests/__init__.py index 4c1e33a2133..a40efc12d69 100644 --- a/apps/sumo/tests/__init__.py +++ b/kitsune/sumo/tests/__init__.py @@ -1,7 +1,7 @@ +import re from functools import wraps from os import listdir from os.path import join, dirname -import re from smtplib import SMTPRecipientsRefused from django.conf import settings @@ -11,8 +11,8 @@ from nose.tools import eq_ from test_utils import TestCase as OriginalTestCase -from sumo.urlresolvers import reverse, split_path -import sumo +from kitsune import sumo +from kitsune.sumo.urlresolvers import reverse, split_path get = lambda c, v, **kw: c.get(reverse(v, **kw), follow=True) diff --git a/apps/sumo/tests/test__utils.py b/kitsune/sumo/tests/test__utils.py similarity index 96% rename from apps/sumo/tests/test__utils.py rename to kitsune/sumo/tests/test__utils.py index d042465a959..3514c7bb1ce 100644 --- a/apps/sumo/tests/test__utils.py +++ b/kitsune/sumo/tests/test__utils.py @@ -4,8 +4,8 @@ from nose.tools import eq_ from test_utils import RequestFactory -from sumo.utils import smart_int, get_next_url, truncated_json_dumps -from sumo.tests import TestCase +from kitsune.sumo.utils import smart_int, get_next_url, truncated_json_dumps +from kitsune.sumo.tests import TestCase class SmartIntTestCase(TestCase): diff --git a/apps/sumo/tests/test_anonymous_middleware.py b/kitsune/sumo/tests/test_anonymous_middleware.py similarity index 96% rename from apps/sumo/tests/test_anonymous_middleware.py rename to kitsune/sumo/tests/test_anonymous_middleware.py index 1221b7d45bf..75aad0e3f85 100644 --- a/apps/sumo/tests/test_anonymous_middleware.py +++ b/kitsune/sumo/tests/test_anonymous_middleware.py @@ -5,8 +5,8 @@ import test_utils -from sumo.anonymous import AnonymousIdentityMiddleware -from sumo.tests import TestCase +from kitsune.sumo.anonymous import AnonymousIdentityMiddleware +from kitsune.sumo.tests import TestCase class TestAnonymousMiddleware(TestCase): diff --git a/apps/sumo/tests/test_email_utils.py b/kitsune/sumo/tests/test_email_utils.py similarity index 95% rename from apps/sumo/tests/test_email_utils.py rename to kitsune/sumo/tests/test_email_utils.py index 5010846f2c9..a859afddaab 100644 --- a/apps/sumo/tests/test_email_utils.py +++ b/kitsune/sumo/tests/test_email_utils.py @@ -6,10 +6,10 @@ from django.utils.translation import get_language from django.utils.functional import lazy -from sumo.email_utils import (uselocale, safe_translation, - emails_with_users_and_watches) -from sumo.tests import TestCase -from users.tests import user +from kitsune.sumo.email_utils import ( + uselocale, safe_translation, emails_with_users_and_watches) +from kitsune.sumo.tests import TestCase +from kitsune.users.tests import user mock_translations = { @@ -93,7 +93,7 @@ def bad_trans(locale): eq_(bad_trans('es'), 'Hola Mike') @mock_gettext - @patch('sumo.email_utils.log') + @patch('kitsune.sumo.email_utils.log') def test_safe_translation_logging(self, mocked_log): """Logging translation errors is really important, so test it.""" # Import tower now so it is affected by the mock. diff --git a/apps/sumo/tests/test_form_fields.py b/kitsune/sumo/tests/test_form_fields.py similarity index 97% rename from apps/sumo/tests/test_form_fields.py rename to kitsune/sumo/tests/test_form_fields.py index 8538a04ce59..30bdd452eef 100644 --- a/apps/sumo/tests/test_form_fields.py +++ b/kitsune/sumo/tests/test_form_fields.py @@ -3,8 +3,8 @@ from nose.tools import eq_ -from sumo.form_fields import _format_decimal, TypedMultipleChoiceField -from sumo.tests import TestCase +from kitsune.sumo.form_fields import _format_decimal, TypedMultipleChoiceField +from kitsune.sumo.tests import TestCase class TestFormatDecimal(TestCase): diff --git a/apps/sumo/tests/test_forms.py b/kitsune/sumo/tests/test_forms.py similarity index 96% rename from apps/sumo/tests/test_forms.py rename to kitsune/sumo/tests/test_forms.py index 6863971bfa4..03f2d402084 100644 --- a/apps/sumo/tests/test_forms.py +++ b/kitsune/sumo/tests/test_forms.py @@ -3,8 +3,8 @@ from nose.tools import eq_ from pyquery import PyQuery as pq -from sumo.form_fields import StrippedCharField -from sumo.tests import TestCase +from kitsune.sumo.form_fields import StrippedCharField +from kitsune.sumo.tests import TestCase class ExampleForm(forms.Form): diff --git a/apps/sumo/tests/test_generatedata.py b/kitsune/sumo/tests/test_generatedata.py similarity index 84% rename from apps/sumo/tests/test_generatedata.py rename to kitsune/sumo/tests/test_generatedata.py index fe8ece069b9..5ca4c56b109 100644 --- a/apps/sumo/tests/test_generatedata.py +++ b/kitsune/sumo/tests/test_generatedata.py @@ -1,6 +1,6 @@ from django.core.management import call_command -from sumo.tests import TestCase +from kitsune.sumo.tests import TestCase class TestGenerateData(TestCase): diff --git a/apps/sumo/tests/test_googleanalytics.py b/kitsune/sumo/tests/test_googleanalytics.py similarity index 98% rename from apps/sumo/tests/test_googleanalytics.py rename to kitsune/sumo/tests/test_googleanalytics.py index 1dc3dfc7ae4..051d97230dc 100644 --- a/apps/sumo/tests/test_googleanalytics.py +++ b/kitsune/sumo/tests/test_googleanalytics.py @@ -3,9 +3,9 @@ from mock import patch from nose.tools import eq_ -from sumo.tests import TestCase -from sumo import googleanalytics -from wiki.tests import document, revision +from kitsune.sumo import googleanalytics +from kitsune.sumo.tests import TestCase +from kitsune.wiki.tests import document, revision class GoogleAnalyticsTests(TestCase): diff --git a/apps/sumo/tests/test_helpers.py b/kitsune/sumo/tests/test_helpers.py similarity index 95% rename from apps/sumo/tests/test_helpers.py rename to kitsune/sumo/tests/test_helpers.py index eeda277563e..64a2abf3258 100644 --- a/apps/sumo/tests/test_helpers.py +++ b/kitsune/sumo/tests/test_helpers.py @@ -4,23 +4,22 @@ from django.forms.fields import CharField -from babel.dates import format_date, format_time, format_datetime import jingo +import test_utils +from babel.dates import format_date, format_time, format_datetime from mock import Mock from nose.tools import eq_, assert_raises -from pytz import timezone from pyquery import PyQuery as pq -import test_utils +from pytz import timezone -from sumo.helpers import (datetimeformat, DateTimeFormatError, - collapse_linebreaks, url, json, timesince, - label_with_help, urlparams, yesno, number, remove, - is_idevice) -from sumo.tests import TestCase -from sumo.urlresolvers import reverse +from kitsune.sumo.helpers import ( + datetimeformat, DateTimeFormatError, collapse_linebreaks, url, json, + timesince, label_with_help, urlparams, yesno, number, remove, is_idevice) +from kitsune.sumo.tests import TestCase +from kitsune.sumo.urlresolvers import reverse -from users.models import RegistrationProfile, Setting -from users.tests import user, profile +from kitsune.users.models import RegistrationProfile, Setting +from kitsune.users.tests import user, profile def render(s, context={}): diff --git a/apps/sumo/tests/test_json_decorator.py b/kitsune/sumo/tests/test_json_decorator.py similarity index 97% rename from apps/sumo/tests/test_json_decorator.py rename to kitsune/sumo/tests/test_json_decorator.py index f717cd31d8d..ac3cb2417e5 100644 --- a/apps/sumo/tests/test_json_decorator.py +++ b/kitsune/sumo/tests/test_json_decorator.py @@ -6,7 +6,7 @@ from nose.tools import eq_ -from sumo.decorators import json_view +from kitsune.sumo.decorators import json_view rf = RequestFactory() diff --git a/apps/sumo/tests/test_locale_middleware.py b/kitsune/sumo/tests/test_locale_middleware.py similarity index 97% rename from apps/sumo/tests/test_locale_middleware.py rename to kitsune/sumo/tests/test_locale_middleware.py index 9a032e0efb7..165a1b4d291 100644 --- a/apps/sumo/tests/test_locale_middleware.py +++ b/kitsune/sumo/tests/test_locale_middleware.py @@ -3,9 +3,9 @@ import mock from nose.tools import eq_ -from users.tests import user, profile -from sumo.tests import TestCase -from sumo.urlresolvers import get_best_language, get_non_supported +from kitsune.sumo.tests import TestCase +from kitsune.sumo.urlresolvers import get_best_language, get_non_supported +from kitsune.users.tests import user, profile class TestLocaleMiddleware(TestCase): diff --git a/apps/sumo/tests/test_middleware.py b/kitsune/sumo/tests/test_middleware.py similarity index 95% rename from apps/sumo/tests/test_middleware.py rename to kitsune/sumo/tests/test_middleware.py index e0eacd560b0..e68db3b0463 100644 --- a/apps/sumo/tests/test_middleware.py +++ b/kitsune/sumo/tests/test_middleware.py @@ -4,8 +4,9 @@ from nose.tools import eq_ from test_utils import RequestFactory -from sumo.middleware import PlusToSpaceMiddleware, MobileSwitchMiddleware -from sumo.tests import TestCase +from kitsune.sumo.middleware import ( + PlusToSpaceMiddleware, MobileSwitchMiddleware) +from kitsune.sumo.tests import TestCase class TrailingSlashMiddlewareTestCase(TestCase): diff --git a/apps/sumo/tests/test_pagination.py b/kitsune/sumo/tests/test_pagination.py similarity index 92% rename from apps/sumo/tests/test_pagination.py rename to kitsune/sumo/tests/test_pagination.py index b397e5676a2..2d9390084e0 100644 --- a/apps/sumo/tests/test_pagination.py +++ b/kitsune/sumo/tests/test_pagination.py @@ -1,12 +1,12 @@ -from nose.tools import eq_, raises import test_utils import pyquery +from nose.tools import eq_, raises -from sumo.paginator import EmptyPage, PageNotAnInteger -from sumo.urlresolvers import reverse -from sumo.utils import paginate, simple_paginate -from sumo.helpers import paginator -from sumo.tests import TestCase +from kitsune.sumo.helpers import paginator +from kitsune.sumo.paginator import EmptyPage, PageNotAnInteger +from kitsune.sumo.tests import TestCase +from kitsune.sumo.urlresolvers import reverse +from kitsune.sumo.utils import paginate, simple_paginate def test_paginated_url(): diff --git a/apps/sumo/tests/test_parser.py b/kitsune/sumo/tests/test_parser.py similarity index 98% rename from apps/sumo/tests/test_parser.py rename to kitsune/sumo/tests/test_parser.py index ca81b51be88..2d1af15c4dc 100644 --- a/apps/sumo/tests/test_parser.py +++ b/kitsune/sumo/tests/test_parser.py @@ -5,12 +5,13 @@ from nose.tools import eq_ from pyquery import PyQuery as pq -from gallery.tests import image -from sumo.parser import (WikiParser, build_hook_params, _get_wiki_link, - get_object_fallback, IMAGE_PARAMS, IMAGE_PARAM_VALUES) -from sumo.tests import TestCase -from wiki.models import Document -from wiki.tests import document, revision +from kitsune.gallery.tests import image +from kitsune.sumo.parser import ( + WikiParser, build_hook_params, _get_wiki_link, get_object_fallback, + IMAGE_PARAMS, IMAGE_PARAM_VALUES) +from kitsune.sumo.tests import TestCase +from kitsune.wiki.models import Document +from kitsune.wiki.tests import document, revision def pq_link(p, text): diff --git a/apps/sumo/tests/test_readonly.py b/kitsune/sumo/tests/test_readonly.py similarity index 90% rename from apps/sumo/tests/test_readonly.py rename to kitsune/sumo/tests/test_readonly.py index 992c80de2be..f3e62c581cf 100644 --- a/apps/sumo/tests/test_readonly.py +++ b/kitsune/sumo/tests/test_readonly.py @@ -9,13 +9,13 @@ from nose.tools import assert_raises, eq_ from pyquery import PyQuery as pq -from questions.models import Question -from users.tests import user -from sumo.urlresolvers import reverse +from kitsune.questions.models import Question +from kitsune.sumo.urlresolvers import reverse +from kitsune.users.tests import user class ReadOnlyModeTest(test_utils.TestCase): - extra = ('sumo.middleware.ReadOnlyMiddleware',) + extra = ('kitsune.sumo.middleware.ReadOnlyMiddleware',) def setUp(self): # This has to be done before the db goes into read only mode. diff --git a/apps/sumo/tests/test_templates.py b/kitsune/sumo/tests/test_templates.py similarity index 97% rename from apps/sumo/tests/test_templates.py rename to kitsune/sumo/tests/test_templates.py index 543ce1e9239..ac954bac65c 100644 --- a/apps/sumo/tests/test_templates.py +++ b/kitsune/sumo/tests/test_templates.py @@ -7,8 +7,8 @@ from pyquery import PyQuery as pq from test_utils import RequestFactory -from sumo.tests import LocalizingClient, TestCase -from sumo.urlresolvers import reverse +from kitsune.sumo.tests import LocalizingClient, TestCase +from kitsune.sumo.urlresolvers import reverse def setup(): diff --git a/apps/sumo/tests/test_tests.py b/kitsune/sumo/tests/test_tests.py similarity index 94% rename from apps/sumo/tests/test_tests.py rename to kitsune/sumo/tests/test_tests.py index 7a3c5541310..c8d1c35cfb8 100644 --- a/apps/sumo/tests/test_tests.py +++ b/kitsune/sumo/tests/test_tests.py @@ -4,7 +4,7 @@ from nose.tools import eq_ -from sumo.tests import TestCase +from kitsune.sumo.tests import TestCase CACHE_KEY = 'sumo_cache_flushing_test' diff --git a/apps/sumo/tests/test_vanity.py b/kitsune/sumo/tests/test_vanity.py similarity index 92% rename from apps/sumo/tests/test_vanity.py rename to kitsune/sumo/tests/test_vanity.py index c1a9a93f30b..ec3d3cc6150 100644 --- a/apps/sumo/tests/test_vanity.py +++ b/kitsune/sumo/tests/test_vanity.py @@ -1,6 +1,6 @@ from nose.tools import eq_ -from sumo.tests import TestCase +from kitsune.sumo.tests import TestCase class TestVanityURLs(TestCase): diff --git a/apps/sumo/tests/test_views.py b/kitsune/sumo/tests/test_views.py similarity index 93% rename from apps/sumo/tests/test_views.py rename to kitsune/sumo/tests/test_views.py index 16c21218b78..25341cb4dbd 100644 --- a/apps/sumo/tests/test_views.py +++ b/kitsune/sumo/tests/test_views.py @@ -10,11 +10,11 @@ from pyquery import PyQuery as pq from test_utils import RequestFactory -from sumo.helpers import urlparams -from sumo.middleware import LocaleURLMiddleware -from sumo.tests import TestCase -from sumo.urlresolvers import reverse -from sumo.views import deprecated_redirect, redirect_to +from kitsune.sumo.helpers import urlparams +from kitsune.sumo.middleware import LocaleURLMiddleware +from kitsune.sumo.tests import TestCase +from kitsune.sumo.urlresolvers import reverse +from kitsune.sumo.views import deprecated_redirect, redirect_to class RedirectTests(TestCase): diff --git a/apps/sumo/urlresolvers.py b/kitsune/sumo/urlresolvers.py similarity index 99% rename from apps/sumo/urlresolvers.py rename to kitsune/sumo/urlresolvers.py index f7dfa9f259e..03e1c3111ab 100644 --- a/apps/sumo/urlresolvers.py +++ b/kitsune/sumo/urlresolvers.py @@ -125,7 +125,7 @@ class Prefixer(object): def __init__(self, request=None, locale=None): """If request is omitted, fall back to a default locale.""" # to avoid circular imports - from users.models import Profile + from kitsune.users.models import Profile self.request = request or WSGIRequest({'REQUEST_METHOD': 'bogus', 'wsgi.input': None}) diff --git a/apps/sumo/urls.py b/kitsune/sumo/urls.py similarity index 97% rename from apps/sumo/urls.py rename to kitsune/sumo/urls.py index f30ca28a893..a41a8b4e399 100644 --- a/apps/sumo/urls.py +++ b/kitsune/sumo/urls.py @@ -2,7 +2,7 @@ from django.conf.urls import patterns, url, include from django.views.generic.base import RedirectView -from sumo import views +from kitsune.sumo import views services_patterns = patterns('', diff --git a/apps/sumo/utils.py b/kitsune/sumo/utils.py similarity index 99% rename from apps/sumo/utils.py rename to kitsune/sumo/utils.py index ef3afdbcd0b..84d72e708de 100644 --- a/apps/sumo/utils.py +++ b/kitsune/sumo/utils.py @@ -5,7 +5,7 @@ from django.db.models.signals import pre_delete from django.utils.http import urlencode, is_safe_url -from sumo import paginator +from kitsune.sumo import paginator def paginate(request, queryset, per_page=20, count=None): diff --git a/apps/sumo/views.py b/kitsune/sumo/views.py similarity index 97% rename from apps/sumo/views.py rename to kitsune/sumo/views.py index 6d7da2f0235..d59ab023f91 100644 --- a/apps/sumo/views.py +++ b/kitsune/sumo/views.py @@ -21,11 +21,11 @@ from PIL import Image from session_csrf import anonymous_csrf -from search import es_utils -from sumo.redis_utils import redis_client, RedisError -from sumo.urlresolvers import reverse -from sumo.utils import get_next_url -from users.forms import AuthenticationForm +from kitsune.search import es_utils +from kitsune.sumo.redis_utils import redis_client, RedisError +from kitsune.sumo.urlresolvers import reverse +from kitsune.sumo.utils import get_next_url +from kitsune.users.forms import AuthenticationForm log = logging.getLogger('k.services') diff --git a/apps/sumo/widgets.py b/kitsune/sumo/widgets.py similarity index 100% rename from apps/sumo/widgets.py rename to kitsune/sumo/widgets.py diff --git a/apps/tags/__init__.py b/kitsune/tags/__init__.py similarity index 100% rename from apps/tags/__init__.py rename to kitsune/tags/__init__.py diff --git a/apps/tags/forms.py b/kitsune/tags/forms.py similarity index 99% rename from apps/tags/forms.py rename to kitsune/tags/forms.py index dcb966b49fe..40b9ae118ca 100644 --- a/apps/tags/forms.py +++ b/kitsune/tags/forms.py @@ -7,9 +7,8 @@ from django.utils.html import escape from django.utils.safestring import mark_safe -from tower import ugettext as _ - from taggit.models import Tag +from tower import ugettext as _ # TODO: Factor out dependency on taggit so it can be a generic large-vocab diff --git a/apps/tags/helpers.py b/kitsune/tags/helpers.py similarity index 100% rename from apps/tags/helpers.py rename to kitsune/tags/helpers.py diff --git a/apps/tags/models.py b/kitsune/tags/models.py similarity index 95% rename from apps/tags/models.py rename to kitsune/tags/models.py index fbb4f98fcd9..9ac380a1ab1 100644 --- a/apps/tags/models.py +++ b/kitsune/tags/models.py @@ -2,7 +2,7 @@ from taggit.managers import TaggableManager -from tags.forms import TagField +from kitsune.tags.forms import TagField class BigVocabTaggableManager(TaggableManager): diff --git a/apps/tags/tests/__init__.py b/kitsune/tags/tests/__init__.py similarity index 100% rename from apps/tags/tests/__init__.py rename to kitsune/tags/tests/__init__.py diff --git a/apps/tags/tests/test_helpers.py b/kitsune/tags/tests/test_helpers.py similarity index 87% rename from apps/tags/tests/test_helpers.py rename to kitsune/tags/tests/test_helpers.py index 5a823046294..d491d87e950 100644 --- a/apps/tags/tests/test_helpers.py +++ b/kitsune/tags/tests/test_helpers.py @@ -1,10 +1,9 @@ -from tags.helpers import tags_to_text - from mock import Mock from nose.tools import eq_ from taggit.models import Tag -from sumo.tests import TestCase +from kitsune.sumo.tests import TestCase +from kitsune.tags.helpers import tags_to_text class TestTagsToText(TestCase): diff --git a/apps/tags/utils.py b/kitsune/tags/utils.py similarity index 100% rename from apps/tags/utils.py rename to kitsune/tags/utils.py diff --git a/apps/topics/__init__.py b/kitsune/topics/__init__.py similarity index 100% rename from apps/topics/__init__.py rename to kitsune/topics/__init__.py diff --git a/apps/topics/admin.py b/kitsune/topics/admin.py similarity index 89% rename from apps/topics/admin.py rename to kitsune/topics/admin.py index 2bc05bd2266..9c36d5782e9 100644 --- a/apps/topics/admin.py +++ b/kitsune/topics/admin.py @@ -1,6 +1,6 @@ from django.contrib import admin -from topics.models import Topic +from kitsune.topics.models import Topic class TopicAdmin(admin.ModelAdmin): diff --git a/apps/topics/models.py b/kitsune/topics/models.py similarity index 96% rename from apps/topics/models.py rename to kitsune/topics/models.py index 3b9824f47d1..5f74d9268f8 100644 --- a/apps/topics/models.py +++ b/kitsune/topics/models.py @@ -3,7 +3,7 @@ from django.conf import settings from django.db import models -from sumo.models import ModelBase +from kitsune.sumo.models import ModelBase HOT_TOPIC_SLUG = 'hot' diff --git a/apps/topics/static/img/topic_placeholder.png b/kitsune/topics/static/img/topic_placeholder.png similarity index 100% rename from apps/topics/static/img/topic_placeholder.png rename to kitsune/topics/static/img/topic_placeholder.png diff --git a/apps/topics/templates/topics/includes/topic_macros.html b/kitsune/topics/templates/topics/includes/topic_macros.html similarity index 100% rename from apps/topics/templates/topics/includes/topic_macros.html rename to kitsune/topics/templates/topics/includes/topic_macros.html diff --git a/apps/topics/templates/topics/topic.html b/kitsune/topics/templates/topics/topic.html similarity index 100% rename from apps/topics/templates/topics/topic.html rename to kitsune/topics/templates/topics/topic.html diff --git a/apps/topics/tests/__init__.py b/kitsune/topics/tests/__init__.py similarity index 85% rename from apps/topics/tests/__init__.py rename to kitsune/topics/tests/__init__.py index 29eee6addcb..33664386cb6 100644 --- a/apps/topics/tests/__init__.py +++ b/kitsune/topics/tests/__init__.py @@ -3,8 +3,8 @@ from django.template.defaultfilters import slugify -from sumo.tests import with_save -from topics.models import Topic +from kitsune.sumo.tests import with_save +from kitsune.topics.models import Topic # Model makers. diff --git a/apps/topics/tests/test_templates.py b/kitsune/topics/tests/test_templates.py similarity index 87% rename from apps/topics/tests/test_templates.py rename to kitsune/topics/tests/test_templates.py index 51077de4537..7eb3e744ec1 100644 --- a/apps/topics/tests/test_templates.py +++ b/kitsune/topics/tests/test_templates.py @@ -3,12 +3,12 @@ from nose.tools import eq_ from pyquery import PyQuery as pq -from products.tests import product -from search.tests.test_es import ElasticTestCase -from sumo.helpers import urlparams -from sumo.urlresolvers import reverse -from topics.tests import topic -from wiki.tests import revision +from kitsune.products.tests import product +from kitsune.search.tests.test_es import ElasticTestCase +from kitsune.sumo.helpers import urlparams +from kitsune.sumo.urlresolvers import reverse +from kitsune.topics.tests import topic +from kitsune.wiki.tests import revision class TopicViewsTestCase(ElasticTestCase): diff --git a/apps/topics/urls.py b/kitsune/topics/urls.py similarity index 70% rename from apps/topics/urls.py rename to kitsune/topics/urls.py index 53459b2d8bf..d7f6b7b36a7 100644 --- a/apps/topics/urls.py +++ b/kitsune/topics/urls.py @@ -1,5 +1,6 @@ from django.conf.urls import patterns, url -urlpatterns = patterns('topics.views', + +urlpatterns = patterns('kitsune.topics.views', url(r'^/(?P[^/]+)$', 'topic_landing', name='topics.topic'), ) diff --git a/apps/topics/views.py b/kitsune/topics/views.py similarity index 87% rename from apps/topics/views.py rename to kitsune/topics/views.py index a313141e9d9..a2a20e09da8 100644 --- a/apps/topics/views.py +++ b/kitsune/topics/views.py @@ -1,7 +1,7 @@ from django.shortcuts import get_object_or_404, render -from topics.models import Topic -from wiki.facets import products_for, documents_for +from kitsune.topics.models import Topic +from kitsune.wiki.facets import products_for, documents_for def topic_landing(request, slug): diff --git a/apps/twitter/__init__.py b/kitsune/twitter/__init__.py similarity index 100% rename from apps/twitter/__init__.py rename to kitsune/twitter/__init__.py diff --git a/apps/twitter/middleware.py b/kitsune/twitter/middleware.py similarity index 97% rename from apps/twitter/middleware.py rename to kitsune/twitter/middleware.py index 6ffd1e838cd..9234105b483 100644 --- a/apps/twitter/middleware.py +++ b/kitsune/twitter/middleware.py @@ -5,7 +5,9 @@ from django.conf import settings import tweepy -from twitter import url, Session, REQUEST_KEY_NAME, REQUEST_SECRET_NAME + +from kitsune.twitter import ( + url, Session, REQUEST_KEY_NAME, REQUEST_SECRET_NAME) log = logging.getLogger('k') diff --git a/apps/twitter/models.py b/kitsune/twitter/models.py similarity index 100% rename from apps/twitter/models.py rename to kitsune/twitter/models.py diff --git a/apps/upload/__init__.py b/kitsune/twitter/tests/__init__.py similarity index 100% rename from apps/upload/__init__.py rename to kitsune/twitter/tests/__init__.py diff --git a/apps/twitter/tests/test_auth.py b/kitsune/twitter/tests/test_auth.py similarity index 80% rename from apps/twitter/tests/test_auth.py rename to kitsune/twitter/tests/test_auth.py index 53577681b24..b42e9a81fe8 100644 --- a/apps/twitter/tests/test_auth.py +++ b/kitsune/twitter/tests/test_auth.py @@ -1,5 +1,5 @@ -from sumo.tests import TestCase -from sumo.urlresolvers import reverse +from kitsune.sumo.tests import TestCase +from kitsune.sumo.urlresolvers import reverse class TwitterMiddlewareTests(TestCase): diff --git a/apps/users/management/__init__.py b/kitsune/upload/__init__.py similarity index 100% rename from apps/users/management/__init__.py rename to kitsune/upload/__init__.py diff --git a/apps/upload/forms.py b/kitsune/upload/forms.py similarity index 99% rename from apps/upload/forms.py rename to kitsune/upload/forms.py index 75d1baba28f..a852336f2c2 100644 --- a/apps/upload/forms.py +++ b/kitsune/upload/forms.py @@ -4,6 +4,7 @@ from tower import ugettext_lazy as _lazy + MSG_IMAGE_REQUIRED = _lazy(u'You have not selected an image to upload.') MSG_IMAGE_LONG = _lazy( u'Please keep the length of your image filename to %(max)s ' diff --git a/apps/upload/models.py b/kitsune/upload/models.py similarity index 90% rename from apps/upload/models.py rename to kitsune/upload/models.py index 94a9e101a57..99dadf5970b 100644 --- a/apps/upload/models.py +++ b/kitsune/upload/models.py @@ -4,9 +4,9 @@ from django.contrib.contenttypes import generic from django.db import models -from sumo.helpers import reverse -from sumo.models import ModelBase -from sumo.utils import auto_delete_files +from kitsune.sumo.helpers import reverse +from kitsune.sumo.models import ModelBase +from kitsune.sumo.utils import auto_delete_files @auto_delete_files diff --git a/apps/upload/storage.py b/kitsune/upload/storage.py similarity index 100% rename from apps/upload/storage.py rename to kitsune/upload/storage.py diff --git a/apps/upload/tasks.py b/kitsune/upload/tasks.py similarity index 100% rename from apps/upload/tasks.py rename to kitsune/upload/tasks.py diff --git a/apps/upload/templates/upload/attachments.html b/kitsune/upload/templates/upload/attachments.html similarity index 100% rename from apps/upload/templates/upload/attachments.html rename to kitsune/upload/templates/upload/attachments.html diff --git a/apps/upload/tests/__init__.py b/kitsune/upload/tests/__init__.py similarity index 85% rename from apps/upload/tests/__init__.py rename to kitsune/upload/tests/__init__.py index 0441f76ed3c..8d380791091 100644 --- a/apps/upload/tests/__init__.py +++ b/kitsune/upload/tests/__init__.py @@ -4,13 +4,13 @@ from nose.tools import eq_ -from questions.tests import question -from sumo.tests import TestCase -from upload.models import ImageAttachment -from upload.storage import RenameFileStorage -from upload.utils import (create_imageattachment, check_file_size, - FileTooLargeError) -from users.tests import user +from kitsune.questions.tests import question +from kitsune.sumo.tests import TestCase +from kitsune.upload.models import ImageAttachment +from kitsune.upload.storage import RenameFileStorage +from kitsune.upload.utils import ( + create_imageattachment, check_file_size, FileTooLargeError) +from kitsune.users.tests import user def check_file_info(file_info, name, width, height, delete_url, url, @@ -32,13 +32,13 @@ class CheckFileSizeTestCase(TestCase): """Tests for check_file_size""" def test_check_file_size_under(self): """No exception should be raised""" - with open('apps/upload/tests/media/test.jpg') as f: + with open('kitsune/upload/tests/media/test.jpg') as f: up_file = File(f) check_file_size(up_file, settings.IMAGE_MAX_FILESIZE) def test_check_file_size_over(self): """FileTooLargeError should be raised""" - with open('apps/upload/tests/media/test.jpg') as f: + with open('kitsune/upload/tests/media/test.jpg') as f: up_file = File(f) fn = lambda: check_file_size(up_file, 0) self.assertRaises(FileTooLargeError, fn) @@ -61,7 +61,7 @@ def test_create_imageattachment(self): Verifies all appropriate fields are correctly set. """ - with open('apps/upload/tests/media/test.jpg') as f: + with open('kitsune/upload/tests/media/test.jpg') as f: up_file = File(f) file_info = create_imageattachment( {'image': up_file}, self.user, self.obj) diff --git "a/apps/upload/tests/media/123ascii\346\234\211\345\212\271.jpg" "b/kitsune/upload/tests/media/123ascii\346\234\211\345\212\271.jpg" similarity index 100% rename from "apps/upload/tests/media/123ascii\346\234\211\345\212\271.jpg" rename to "kitsune/upload/tests/media/123ascii\346\234\211\345\212\271.jpg" diff --git a/apps/upload/tests/media/a_really_long_filename_worth_more_than_250_characters__a_really_long_filename_worth_more_than_250_characters__a_really_long_filename_worth_more_than_250_characters__a_really_long_filename_worth_more_than_250_characters__a_really_long_filename_yes_.jpg b/kitsune/upload/tests/media/a_really_long_filename_worth_more_than_250_characters__a_really_long_filename_worth_more_than_250_characters__a_really_long_filename_worth_more_than_250_characters__a_really_long_filename_worth_more_than_250_characters__a_really_long_filename_yes_.jpg similarity index 100% rename from apps/upload/tests/media/a_really_long_filename_worth_more_than_250_characters__a_really_long_filename_worth_more_than_250_characters__a_really_long_filename_worth_more_than_250_characters__a_really_long_filename_worth_more_than_250_characters__a_really_long_filename_yes_.jpg rename to kitsune/upload/tests/media/a_really_long_filename_worth_more_than_250_characters__a_really_long_filename_worth_more_than_250_characters__a_really_long_filename_worth_more_than_250_characters__a_really_long_filename_worth_more_than_250_characters__a_really_long_filename_yes_.jpg diff --git a/apps/upload/tests/media/animated.gif b/kitsune/upload/tests/media/animated.gif similarity index 100% rename from apps/upload/tests/media/animated.gif rename to kitsune/upload/tests/media/animated.gif diff --git a/apps/upload/tests/media/test.jpg b/kitsune/upload/tests/media/test.jpg similarity index 100% rename from apps/upload/tests/media/test.jpg rename to kitsune/upload/tests/media/test.jpg diff --git a/apps/upload/tests/media/test.png b/kitsune/upload/tests/media/test.png similarity index 100% rename from apps/upload/tests/media/test.png rename to kitsune/upload/tests/media/test.png diff --git a/apps/upload/tests/media/test_invalid.ext b/kitsune/upload/tests/media/test_invalid.ext similarity index 100% rename from apps/upload/tests/media/test_invalid.ext rename to kitsune/upload/tests/media/test_invalid.ext diff --git a/apps/upload/tests/media/test_thumb.jpg b/kitsune/upload/tests/media/test_thumb.jpg similarity index 100% rename from apps/upload/tests/media/test_thumb.jpg rename to kitsune/upload/tests/media/test_thumb.jpg diff --git a/apps/upload/tests/test_models.py b/kitsune/upload/tests/test_models.py similarity index 77% rename from apps/upload/tests/test_models.py rename to kitsune/upload/tests/test_models.py index 48926c6f5c7..7566d411717 100644 --- a/apps/upload/tests/test_models.py +++ b/kitsune/upload/tests/test_models.py @@ -4,11 +4,11 @@ from nose.tools import eq_ -from questions.tests import question -from sumo.tests import TestCase -from upload.models import ImageAttachment -from upload.tasks import generate_thumbnail -from users.tests import user +from kitsune.questions.tests import question +from kitsune.sumo.tests import TestCase +from kitsune.upload.models import ImageAttachment +from kitsune.upload.tasks import generate_thumbnail +from kitsune.users.tests import user class ImageAttachmentTestCase(TestCase): @@ -27,7 +27,7 @@ def test_thumbnail_if_set(self): """thumbnail_if_set() returns self.thumbnail if set, or else returns self.file""" image = ImageAttachment(content_object=self.obj, creator=self.user) - with open('apps/upload/tests/media/test.jpg') as f: + with open('kitsune/upload/tests/media/test.jpg') as f: up_file = File(f) image.file.save(up_file.name, up_file, save=True) diff --git a/apps/upload/tests/test_tasks.py b/kitsune/upload/tests/test_tasks.py similarity index 86% rename from apps/upload/tests/test_tasks.py rename to kitsune/upload/tests/test_tasks.py index 486c8dd7398..8c68d70366d 100644 --- a/apps/upload/tests/test_tasks.py +++ b/kitsune/upload/tests/test_tasks.py @@ -7,14 +7,14 @@ import mock from nose.tools import eq_ -import upload.tasks - -from questions.tests import question -from sumo.tests import TestCase -from upload.models import ImageAttachment -from upload.tasks import (_scale_dimensions, _create_image_thumbnail, - compress_image, generate_thumbnail) -from users.tests import user +import kitsune.upload.tasks +from kitsune.questions.tests import question +from kitsune.sumo.tests import TestCase +from kitsune.upload.models import ImageAttachment +from kitsune.upload.tasks import ( + _scale_dimensions, _create_image_thumbnail, compress_image, + generate_thumbnail) +from kitsune.users.tests import user class ScaleDimensionsTestCase(TestCase): @@ -67,9 +67,9 @@ class CreateThumbnailTestCase(TestCase): def test_create_image_thumbnail_default(self): """A thumbnail is created from an image file.""" thumb_content = _create_image_thumbnail( - 'apps/upload/tests/media/test.jpg') + 'kitsune/upload/tests/media/test.jpg') actual_thumb = ImageFile(thumb_content) - with open('apps/upload/tests/media/test_thumb.jpg') as f: + with open('kitsune/upload/tests/media/test_thumb.jpg') as f: expected_thumb = ImageFile(f) eq_(expected_thumb.width, actual_thumb.width) @@ -78,7 +78,7 @@ def test_create_image_thumbnail_default(self): def test_create_image_thumbnail_avatar(self): """An avatar is created from an image file.""" thumb_content = _create_image_thumbnail( - 'apps/upload/tests/media/test.jpg', + 'kitsune/upload/tests/media/test.jpg', settings.AVATAR_SIZE, pad=True) actual_thumb = ImageFile(thumb_content) @@ -98,7 +98,7 @@ def tearDown(self): def _image_with_thumbnail(self): image = ImageAttachment(content_object=self.obj, creator=self.user) - with open('apps/upload/tests/media/test.jpg') as f: + with open('kitsune/upload/tests/media/test.jpg') as f: up_file = File(f) image.file.save(up_file.name, up_file, save=True) generate_thumbnail(image, 'file', 'thumbnail') @@ -119,7 +119,7 @@ def test_generate_no_file(self): def test_generate_deleted_file(self): """generate_thumbnail does not fail if file doesn't actually exist.""" image = ImageAttachment(content_object=self.obj, creator=self.user) - with open('apps/upload/tests/media/test.jpg') as f: + with open('kitsune/upload/tests/media/test.jpg') as f: up_file = File(f) image.file.save(up_file.name, up_file, save=True) # The field will be set but the file isn't there. @@ -157,13 +157,13 @@ def tearDown(self): def _uploaded_image(self, testfile="test.png"): image = ImageAttachment(content_object=self.obj, creator=self.user) - with open('apps/upload/tests/media/' + testfile) as f: + with open('kitsune/upload/tests/media/' + testfile) as f: up_file = File(f) image.file.save(up_file.name, up_file, save=True) return image @mock.patch.object(settings._wrapped, 'OPTIPNG_PATH', '') - @mock.patch.object(upload.tasks.subprocess, 'call') + @mock.patch.object(kitsune.upload.tasks.subprocess, 'call') def test_compressed_image_default(self, call): """uploaded image is compressed.""" image = self._uploaded_image() @@ -171,7 +171,7 @@ def test_compressed_image_default(self, call): assert call.called @mock.patch.object(settings._wrapped, 'OPTIPNG_PATH', '') - @mock.patch.object(upload.tasks.subprocess, 'call') + @mock.patch.object(kitsune.upload.tasks.subprocess, 'call') def test_compress_no_file(self, call): """compress_image does not fail when no file is provided.""" image = ImageAttachment(content_object=self.obj, creator=self.user) @@ -179,7 +179,7 @@ def test_compress_no_file(self, call): assert not call.called @mock.patch.object(settings._wrapped, 'OPTIPNG_PATH', None) - @mock.patch.object(upload.tasks.subprocess, 'call') + @mock.patch.object(kitsune.upload.tasks.subprocess, 'call') def test_compress_no_compression_software(self, call): """compress_image does not fail when no compression software.""" image = self._uploaded_image() @@ -187,7 +187,7 @@ def test_compress_no_compression_software(self, call): assert not call.called @mock.patch.object(settings._wrapped, 'OPTIPNG_PATH', '') - @mock.patch.object(upload.tasks.subprocess, 'call') + @mock.patch.object(kitsune.upload.tasks.subprocess, 'call') def test_compressed_image_default(self, call): """uploaded animated gif image is not compressed.""" image = self._uploaded_image(testfile="animated.gif") diff --git a/apps/upload/tests/test_views.py b/kitsune/upload/tests/test_views.py similarity index 92% rename from apps/upload/tests/test_views.py rename to kitsune/upload/tests/test_views.py index b3883c17b2a..0daba44ddc7 100644 --- a/apps/upload/tests/test_views.py +++ b/kitsune/upload/tests/test_views.py @@ -6,11 +6,11 @@ from nose.tools import eq_ -from questions.tests import question -from sumo.tests import post, LocalizingClient, TestCase -from upload.forms import MSG_IMAGE_LONG -from upload.models import ImageAttachment -from users.tests import user +from kitsune.questions.tests import question +from kitsune.sumo.tests import post, LocalizingClient, TestCase +from kitsune.upload.forms import MSG_IMAGE_LONG +from kitsune.upload.models import ImageAttachment +from kitsune.users.tests import user class UploadImageTestCase(TestCase): @@ -57,7 +57,7 @@ def test_empty_image(self): def test_upload_image(self): """Uploading an image works.""" - with open('apps/upload/tests/media/test.jpg') as f: + with open('kitsune/upload/tests/media/test.jpg') as f: r = self._make_post_request(image=f) eq_(200, r.status_code) @@ -80,7 +80,7 @@ def test_upload_image(self): def test_upload_unicode_image(self): """Uploading an unicode image works.""" - with open(u'apps/upload/tests/media/123ascii\u6709\u52b9.jpg') as f: + with open(u'kitsune/upload/tests/media/123ascii\u6709\u52b9.jpg') as f: r = self._make_post_request(image=f) eq_(200, r.status_code) @@ -144,7 +144,7 @@ def test_delete_no_image(self): def test_invalid_image(self): """Make sure invalid files are not accepted as images.""" - with open('apps/upload/__init__.py', 'rb') as f: + with open('kitsune/upload/__init__.py', 'rb') as f: r = self._make_post_request(image=f) eq_(400, r.status_code) @@ -155,7 +155,7 @@ def test_invalid_image(self): def test_invalid_image_extensions(self): """Make sure invalid extensions are not accepted as images.""" - with open('apps/upload/tests/media/test_invalid.ext', 'rb') as f: + with open('kitsune/upload/tests/media/test_invalid.ext', 'rb') as f: r = self._make_post_request(image=f) eq_(400, r.status_code) @@ -167,7 +167,7 @@ def test_invalid_image_extensions(self): def test_upload_long_filename(self): """Uploading an image with a filename that's too long fails.""" - with open('apps/upload/tests/media/a_really_long_filename_worth_' + with open('kitsune/upload/tests/media/a_really_long_filename_worth_' 'more_than_250_characters__a_really_long_filename_worth_' 'more_than_250_characters__a_really_long_filename_worth_' 'more_than_250_characters__a_really_long_filename_worth_' diff --git a/apps/upload/urls.py b/kitsune/upload/urls.py similarity index 85% rename from apps/upload/urls.py rename to kitsune/upload/urls.py index b7af615fdd7..eef6a74f589 100644 --- a/apps/upload/urls.py +++ b/kitsune/upload/urls.py @@ -1,6 +1,7 @@ from django.conf.urls import patterns, url -urlpatterns = patterns('upload.views', + +urlpatterns = patterns('kitsune.upload.views', url(r'^/image/(?P\w+\.\w+)/(?P\d+)$', 'up_image_async', name='upload.up_image_async'), url(r'^/image/delete/(?P\d+)$', diff --git a/apps/upload/utils.py b/kitsune/upload/utils.py similarity index 94% rename from apps/upload/utils.py rename to kitsune/upload/utils.py index 3a17540adc1..57dea1f96f3 100644 --- a/apps/upload/utils.py +++ b/kitsune/upload/utils.py @@ -8,9 +8,10 @@ from PIL import Image from tower import ugettext_lazy as _lazy -from upload.forms import ImageAttachmentUploadForm -from upload.models import ImageAttachment -from upload.tasks import compress_image, generate_thumbnail, _scale_dimensions +from kitsune.upload.forms import ImageAttachmentUploadForm +from kitsune.upload.models import ImageAttachment +from kitsune.upload.tasks import (compress_image, generate_thumbnail, + _scale_dimensions) def check_file_size(f, max_allowed_size): diff --git a/apps/upload/views.py b/kitsune/upload/views.py similarity index 93% rename from apps/upload/views.py rename to kitsune/upload/views.py index e693dea3b5c..cd939976d74 100644 --- a/apps/upload/views.py +++ b/kitsune/upload/views.py @@ -1,17 +1,17 @@ import json -from django.views.decorators.http import require_POST from django.core.exceptions import ObjectDoesNotExist from django.db.models import get_model from django.http import (HttpResponse, HttpResponseNotFound, HttpResponseBadRequest, HttpResponseForbidden) from django.views.decorators.clickjacking import xframe_options_sameorigin +from django.views.decorators.http import require_POST from tower import ugettext as _ -from access.decorators import login_required -from upload.models import ImageAttachment -from upload.utils import upload_imageattachment, FileTooLargeError +from kitsune.access.decorators import login_required +from kitsune.upload.models import ImageAttachment +from kitsune.upload.utils import upload_imageattachment, FileTooLargeError ALLOWED_MODELS = ['questions.Question', 'questions.Answer'] diff --git a/kitsune/urls.py b/kitsune/urls.py index cc3e441b4b9..9ff59da9678 100644 --- a/kitsune/urls.py +++ b/kitsune/urls.py @@ -6,8 +6,8 @@ from django.views.decorators.cache import cache_page from django.views.generic.base import RedirectView -from adminplus import AdminSitePlus import authority +from adminplus import AdminSitePlus from waffle.views import wafflejs @@ -17,24 +17,24 @@ authority.autodiscover() urlpatterns = patterns('', - (r'^search', include('search.urls')), - (r'^forums', include('forums.urls')), - (r'^questions', include('questions.urls')), - (r'^flagged', include('flagit.urls')), - (r'^upload', include('upload.urls')), - (r'^kb', include('wiki.urls')), - (r'^gallery', include('gallery.urls')), - (r'^army-of-awesome', include('customercare.urls')), + (r'^search', include('kitsune.search.urls')), + (r'^forums', include('kitsune.forums.urls')), + (r'^questions', include('kitsune.questions.urls')), + (r'^flagged', include('kitsune.flagit.urls')), + (r'^upload', include('kitsune.upload.urls')), + (r'^kb', include('kitsune.wiki.urls')), + (r'^gallery', include('kitsune.gallery.urls')), + (r'^army-of-awesome', include('kitsune.customercare.urls')), (r'^chat', RedirectView.as_view(url='questions/new')), - (r'^messages', include('messages.urls')), - (r'^1', include('inproduct.urls')), - (r'^postcrash', include('postcrash.urls')), - (r'^groups', include('groups.urls')), - (r'^karma', include('karma.urls')), - (r'^kpi/', include('kpi.urls')), - (r'^products', include('products.urls')), - (r'^topics', include('topics.urls')), - (r'^announcements', include('announcements.urls')), + (r'^messages', include('kitsune.messages.urls')), + (r'^1', include('kitsune.inproduct.urls')), + (r'^postcrash', include('kitsune.postcrash.urls')), + (r'^groups', include('kitsune.groups.urls')), + (r'^karma', include('kitsune.karma.urls')), + (r'^kpi/', include('kitsune.kpi.urls')), + (r'^products', include('kitsune.products.urls')), + (r'^topics', include('kitsune.topics.urls')), + (r'^announcements', include('kitsune.announcements.urls')), # Kitsune admin (not Django admin). (r'^admin/', include(admin.site.urls)), @@ -45,20 +45,20 @@ # JavaScript Waffle. url(r'^wafflejs$', wafflejs, name='wafflejs'), - (r'^', include('dashboards.urls')), - (r'^', include('landings.urls')), + (r'^', include('kitsune.dashboards.urls')), + (r'^', include('kitsune.landings.urls')), (r'^', include('tidings.urls')), # Keep short for email wrapping. # Users - ('', include('users.urls')), + ('', include('kitsune.users.urls')), # Services and sundry. - (r'', include('sumo.urls')), + (r'', include('kitsune.sumo.urls')), ) # Handle 404 and 500 errors -handler404 = 'sumo.views.handle404' -handler500 = 'sumo.views.handle500' +handler404 = 'kitsune.sumo.views.handle404' +handler500 = 'kitsune.sumo.views.handle500' if settings.DEBUG: media_url = settings.MEDIA_URL.lstrip('/').rstrip('/') diff --git a/apps/users/__init__.py b/kitsune/users/__init__.py similarity index 100% rename from apps/users/__init__.py rename to kitsune/users/__init__.py diff --git a/apps/users/admin.py b/kitsune/users/admin.py similarity index 95% rename from apps/users/admin.py rename to kitsune/users/admin.py index d745f0459c5..51defadb165 100644 --- a/apps/users/admin.py +++ b/kitsune/users/admin.py @@ -1,8 +1,8 @@ from django import forms from django.contrib import admin -from users import monkeypatch -from users.models import Profile +from kitsune.users import monkeypatch +from kitsune.users.models import Profile class ProfileAdminForm(forms.ModelForm): diff --git a/apps/users/api.py b/kitsune/users/api.py similarity index 91% rename from apps/users/api.py rename to kitsune/users/api.py index 388ab852464..f52df1ab108 100644 --- a/apps/users/api.py +++ b/kitsune/users/api.py @@ -3,13 +3,13 @@ from django.contrib.auth.models import User from django.db.models import Q from django.views.decorators.http import require_GET -from users.models import Profile import waffle from statsd import statsd -from sumo.decorators import json_view -from access.decorators import login_required +from kitsune.access.decorators import login_required +from kitsune.sumo.decorators import json_view +from kitsune.users.models import Profile def display_name_or_none(user): diff --git a/apps/users/backends.py b/kitsune/users/backends.py similarity index 100% rename from apps/users/backends.py rename to kitsune/users/backends.py diff --git a/apps/users/cron.py b/kitsune/users/cron.py similarity index 80% rename from apps/users/cron.py rename to kitsune/users/cron.py index 39241df6e8b..2dc9739b329 100644 --- a/apps/users/cron.py +++ b/kitsune/users/cron.py @@ -1,6 +1,6 @@ import cronjobs -from users.models import RegistrationProfile +from kitsune.users.models import RegistrationProfile @cronjobs.register diff --git a/apps/users/forms.py b/kitsune/users/forms.py similarity index 97% rename from apps/users/forms.py rename to kitsune/users/forms.py index c0db99a3e33..d8ebfba2008 100644 --- a/apps/users/forms.py +++ b/kitsune/users/forms.py @@ -12,14 +12,14 @@ from tower import ugettext as _, ugettext_lazy as _lazy -from sumo import email_utils -from sumo.urlresolvers import reverse -from sumo.widgets import ImageWidget -from upload.forms import clean_image_extension -from upload.utils import check_file_size, FileTooLargeError -from users.models import Profile -from users.passwords import username_allowed -from users.widgets import FacebookURLWidget, TwitterURLWidget +from kitsune.sumo import email_utils +from kitsune.sumo.urlresolvers import reverse +from kitsune.sumo.widgets import ImageWidget +from kitsune.upload.forms import clean_image_extension +from kitsune.upload.utils import check_file_size, FileTooLargeError +from kitsune.users.models import Profile +from kitsune.users.passwords import username_allowed +from kitsune.users.widgets import FacebookURLWidget, TwitterURLWidget USERNAME_INVALID = _lazy(u'Username may contain only letters, ' diff --git a/apps/users/hashers.py b/kitsune/users/hashers.py similarity index 100% rename from apps/users/hashers.py rename to kitsune/users/hashers.py diff --git a/apps/users/helpers.py b/kitsune/users/helpers.py similarity index 93% rename from apps/users/helpers.py rename to kitsune/users/helpers.py index 9dd8ac7ae81..a2d7f92d11e 100644 --- a/apps/users/helpers.py +++ b/kitsune/users/helpers.py @@ -4,9 +4,9 @@ from jingo import register from tower import ugettext as _ -from sumo.helpers import urlparams -from sumo.urlresolvers import reverse -from users.models import Profile +from kitsune.sumo.helpers import urlparams +from kitsune.sumo.urlresolvers import reverse +from kitsune.users.models import Profile @register.function diff --git a/apps/users/management/commands/__init__.py b/kitsune/users/management/__init__.py similarity index 100% rename from apps/users/management/commands/__init__.py rename to kitsune/users/management/__init__.py diff --git a/apps/wiki/management/__init__.py b/kitsune/users/management/commands/__init__.py similarity index 100% rename from apps/wiki/management/__init__.py rename to kitsune/users/management/commands/__init__.py diff --git a/apps/users/management/commands/purge_hashes.py b/kitsune/users/management/commands/purge_hashes.py similarity index 100% rename from apps/users/management/commands/purge_hashes.py rename to kitsune/users/management/commands/purge_hashes.py diff --git a/apps/users/models.py b/kitsune/users/models.py similarity index 98% rename from apps/users/models.py rename to kitsune/users/models.py index 7bb6c4d6fb2..66b85828f36 100644 --- a/apps/users/models.py +++ b/kitsune/users/models.py @@ -1,8 +1,8 @@ -from datetime import datetime, timedelta import hashlib import logging import random import re +from datetime import datetime, timedelta from django.conf import settings from django.contrib.auth.models import User, Group @@ -16,11 +16,11 @@ from tower import ugettext as _ from tower import ugettext_lazy as _lazy -from countries import COUNTRIES -from sumo import email_utils -from sumo.models import ModelBase, LocaleField -from sumo.urlresolvers import reverse -from sumo.utils import auto_delete_files, chunked +from kitsune.lib.countries import COUNTRIES +from kitsune.sumo import email_utils +from kitsune.sumo.models import ModelBase, LocaleField +from kitsune.sumo.urlresolvers import reverse +from kitsune.sumo.utils import auto_delete_files, chunked log = logging.getLogger('k.users') @@ -94,7 +94,7 @@ def __unicode__(self): @classmethod def get_for_user(cls, user, name): - from users.forms import SettingsForm + from kitsune.users.forms import SettingsForm form = SettingsForm() if name not in form.fields.keys(): raise KeyError(("'{name}' is not a field in " diff --git a/apps/users/monkeypatch.py b/kitsune/users/monkeypatch.py similarity index 96% rename from apps/users/monkeypatch.py rename to kitsune/users/monkeypatch.py index 0fb9b29bf25..c7ccf871e97 100644 --- a/apps/users/monkeypatch.py +++ b/kitsune/users/monkeypatch.py @@ -1,7 +1,7 @@ from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User -from sumo.urlresolvers import reverse +from kitsune.sumo.urlresolvers import reverse def _activate_users(admin, request, qs): diff --git a/apps/users/passwords.py b/kitsune/users/passwords.py similarity index 100% rename from apps/users/passwords.py rename to kitsune/users/passwords.py diff --git a/apps/users/templates/users/activate.html b/kitsune/users/templates/users/activate.html similarity index 100% rename from apps/users/templates/users/activate.html rename to kitsune/users/templates/users/activate.html diff --git a/apps/users/templates/users/auth.html b/kitsune/users/templates/users/auth.html similarity index 100% rename from apps/users/templates/users/auth.html rename to kitsune/users/templates/users/auth.html diff --git a/apps/users/templates/users/base.html b/kitsune/users/templates/users/base.html similarity index 100% rename from apps/users/templates/users/base.html rename to kitsune/users/templates/users/base.html diff --git a/apps/users/templates/users/change_email.html b/kitsune/users/templates/users/change_email.html similarity index 100% rename from apps/users/templates/users/change_email.html rename to kitsune/users/templates/users/change_email.html diff --git a/apps/users/templates/users/change_email_complete.html b/kitsune/users/templates/users/change_email_complete.html similarity index 100% rename from apps/users/templates/users/change_email_complete.html rename to kitsune/users/templates/users/change_email_complete.html diff --git a/apps/users/templates/users/change_email_done.html b/kitsune/users/templates/users/change_email_done.html similarity index 100% rename from apps/users/templates/users/change_email_done.html rename to kitsune/users/templates/users/change_email_done.html diff --git a/apps/users/templates/users/confirm_avatar_delete.html b/kitsune/users/templates/users/confirm_avatar_delete.html similarity index 100% rename from apps/users/templates/users/confirm_avatar_delete.html rename to kitsune/users/templates/users/confirm_avatar_delete.html diff --git a/apps/users/templates/users/documents_contributed.html b/kitsune/users/templates/users/documents_contributed.html similarity index 100% rename from apps/users/templates/users/documents_contributed.html rename to kitsune/users/templates/users/documents_contributed.html diff --git a/apps/users/templates/users/edit_avatar.html b/kitsune/users/templates/users/edit_avatar.html similarity index 100% rename from apps/users/templates/users/edit_avatar.html rename to kitsune/users/templates/users/edit_avatar.html diff --git a/apps/users/templates/users/edit_profile.html b/kitsune/users/templates/users/edit_profile.html similarity index 100% rename from apps/users/templates/users/edit_profile.html rename to kitsune/users/templates/users/edit_profile.html diff --git a/apps/users/templates/users/edit_settings.html b/kitsune/users/templates/users/edit_settings.html similarity index 100% rename from apps/users/templates/users/edit_settings.html rename to kitsune/users/templates/users/edit_settings.html diff --git a/apps/users/templates/users/email/activate.html b/kitsune/users/templates/users/email/activate.html similarity index 100% rename from apps/users/templates/users/email/activate.html rename to kitsune/users/templates/users/email/activate.html diff --git a/apps/users/templates/users/email/activate.ltxt b/kitsune/users/templates/users/email/activate.ltxt similarity index 100% rename from apps/users/templates/users/email/activate.ltxt rename to kitsune/users/templates/users/email/activate.ltxt diff --git a/apps/users/templates/users/email/already_activated.html b/kitsune/users/templates/users/email/already_activated.html similarity index 100% rename from apps/users/templates/users/email/already_activated.html rename to kitsune/users/templates/users/email/already_activated.html diff --git a/apps/users/templates/users/email/already_activated.ltxt b/kitsune/users/templates/users/email/already_activated.ltxt similarity index 100% rename from apps/users/templates/users/email/already_activated.ltxt rename to kitsune/users/templates/users/email/already_activated.ltxt diff --git a/apps/users/templates/users/email/confirm_email.html b/kitsune/users/templates/users/email/confirm_email.html similarity index 100% rename from apps/users/templates/users/email/confirm_email.html rename to kitsune/users/templates/users/email/confirm_email.html diff --git a/apps/users/templates/users/email/confirm_email.ltxt b/kitsune/users/templates/users/email/confirm_email.ltxt similarity index 100% rename from apps/users/templates/users/email/confirm_email.ltxt rename to kitsune/users/templates/users/email/confirm_email.ltxt diff --git a/apps/users/templates/users/email/contributor.html b/kitsune/users/templates/users/email/contributor.html similarity index 100% rename from apps/users/templates/users/email/contributor.html rename to kitsune/users/templates/users/email/contributor.html diff --git a/apps/users/templates/users/email/contributor.ltxt b/kitsune/users/templates/users/email/contributor.ltxt similarity index 100% rename from apps/users/templates/users/email/contributor.ltxt rename to kitsune/users/templates/users/email/contributor.ltxt diff --git a/apps/users/templates/users/email/forgot_username.html b/kitsune/users/templates/users/email/forgot_username.html similarity index 100% rename from apps/users/templates/users/email/forgot_username.html rename to kitsune/users/templates/users/email/forgot_username.html diff --git a/apps/users/templates/users/email/forgot_username.ltxt b/kitsune/users/templates/users/email/forgot_username.ltxt similarity index 100% rename from apps/users/templates/users/email/forgot_username.ltxt rename to kitsune/users/templates/users/email/forgot_username.ltxt diff --git a/apps/users/templates/users/email/pw_reset.html b/kitsune/users/templates/users/email/pw_reset.html similarity index 100% rename from apps/users/templates/users/email/pw_reset.html rename to kitsune/users/templates/users/email/pw_reset.html diff --git a/apps/users/templates/users/email/pw_reset.ltxt b/kitsune/users/templates/users/email/pw_reset.ltxt similarity index 100% rename from apps/users/templates/users/email/pw_reset.ltxt rename to kitsune/users/templates/users/email/pw_reset.ltxt diff --git a/apps/users/templates/users/email/pw_reset_subject.ltxt b/kitsune/users/templates/users/email/pw_reset_subject.ltxt similarity index 100% rename from apps/users/templates/users/email/pw_reset_subject.ltxt rename to kitsune/users/templates/users/email/pw_reset_subject.ltxt diff --git a/apps/users/templates/users/forgot_username.html b/kitsune/users/templates/users/forgot_username.html similarity index 100% rename from apps/users/templates/users/forgot_username.html rename to kitsune/users/templates/users/forgot_username.html diff --git a/apps/users/templates/users/includes/macros.html b/kitsune/users/templates/users/includes/macros.html similarity index 100% rename from apps/users/templates/users/includes/macros.html rename to kitsune/users/templates/users/includes/macros.html diff --git a/apps/users/templates/users/mobile/activate.html b/kitsune/users/templates/users/mobile/activate.html similarity index 100% rename from apps/users/templates/users/mobile/activate.html rename to kitsune/users/templates/users/mobile/activate.html diff --git a/apps/users/templates/users/mobile/change_email.html b/kitsune/users/templates/users/mobile/change_email.html similarity index 100% rename from apps/users/templates/users/mobile/change_email.html rename to kitsune/users/templates/users/mobile/change_email.html diff --git a/apps/users/templates/users/mobile/change_email_done.html b/kitsune/users/templates/users/mobile/change_email_done.html similarity index 100% rename from apps/users/templates/users/mobile/change_email_done.html rename to kitsune/users/templates/users/mobile/change_email_done.html diff --git a/apps/users/templates/users/mobile/edit_profile.html b/kitsune/users/templates/users/mobile/edit_profile.html similarity index 100% rename from apps/users/templates/users/mobile/edit_profile.html rename to kitsune/users/templates/users/mobile/edit_profile.html diff --git a/apps/users/templates/users/mobile/forgot_username.html b/kitsune/users/templates/users/mobile/forgot_username.html similarity index 100% rename from apps/users/templates/users/mobile/forgot_username.html rename to kitsune/users/templates/users/mobile/forgot_username.html diff --git a/apps/users/templates/users/mobile/includes/macros.html b/kitsune/users/templates/users/mobile/includes/macros.html similarity index 100% rename from apps/users/templates/users/mobile/includes/macros.html rename to kitsune/users/templates/users/mobile/includes/macros.html diff --git a/apps/users/templates/users/mobile/login.html b/kitsune/users/templates/users/mobile/login.html similarity index 100% rename from apps/users/templates/users/mobile/login.html rename to kitsune/users/templates/users/mobile/login.html diff --git a/apps/users/templates/users/mobile/profile.html b/kitsune/users/templates/users/mobile/profile.html similarity index 100% rename from apps/users/templates/users/mobile/profile.html rename to kitsune/users/templates/users/mobile/profile.html diff --git a/apps/users/templates/users/mobile/pw_change.html b/kitsune/users/templates/users/mobile/pw_change.html similarity index 100% rename from apps/users/templates/users/mobile/pw_change.html rename to kitsune/users/templates/users/mobile/pw_change.html diff --git a/apps/users/templates/users/mobile/pw_change_complete.html b/kitsune/users/templates/users/mobile/pw_change_complete.html similarity index 100% rename from apps/users/templates/users/mobile/pw_change_complete.html rename to kitsune/users/templates/users/mobile/pw_change_complete.html diff --git a/apps/users/templates/users/mobile/pw_reset_complete.html b/kitsune/users/templates/users/mobile/pw_reset_complete.html similarity index 100% rename from apps/users/templates/users/mobile/pw_reset_complete.html rename to kitsune/users/templates/users/mobile/pw_reset_complete.html diff --git a/apps/users/templates/users/mobile/pw_reset_confirm.html b/kitsune/users/templates/users/mobile/pw_reset_confirm.html similarity index 100% rename from apps/users/templates/users/mobile/pw_reset_confirm.html rename to kitsune/users/templates/users/mobile/pw_reset_confirm.html diff --git a/apps/users/templates/users/mobile/pw_reset_form.html b/kitsune/users/templates/users/mobile/pw_reset_form.html similarity index 100% rename from apps/users/templates/users/mobile/pw_reset_form.html rename to kitsune/users/templates/users/mobile/pw_reset_form.html diff --git a/apps/users/templates/users/mobile/pw_reset_sent.html b/kitsune/users/templates/users/mobile/pw_reset_sent.html similarity index 100% rename from apps/users/templates/users/mobile/pw_reset_sent.html rename to kitsune/users/templates/users/mobile/pw_reset_sent.html diff --git a/apps/users/templates/users/mobile/register.html b/kitsune/users/templates/users/mobile/register.html similarity index 100% rename from apps/users/templates/users/mobile/register.html rename to kitsune/users/templates/users/mobile/register.html diff --git a/apps/users/templates/users/mobile/register_done.html b/kitsune/users/templates/users/mobile/register_done.html similarity index 100% rename from apps/users/templates/users/mobile/register_done.html rename to kitsune/users/templates/users/mobile/register_done.html diff --git a/apps/users/templates/users/mobile/resend_confirmation.html b/kitsune/users/templates/users/mobile/resend_confirmation.html similarity index 100% rename from apps/users/templates/users/mobile/resend_confirmation.html rename to kitsune/users/templates/users/mobile/resend_confirmation.html diff --git a/apps/users/templates/users/mobile/resend_confirmation_done.html b/kitsune/users/templates/users/mobile/resend_confirmation_done.html similarity index 100% rename from apps/users/templates/users/mobile/resend_confirmation_done.html rename to kitsune/users/templates/users/mobile/resend_confirmation_done.html diff --git a/apps/users/templates/users/profile.html b/kitsune/users/templates/users/profile.html similarity index 100% rename from apps/users/templates/users/profile.html rename to kitsune/users/templates/users/profile.html diff --git a/apps/users/templates/users/pw_change.html b/kitsune/users/templates/users/pw_change.html similarity index 100% rename from apps/users/templates/users/pw_change.html rename to kitsune/users/templates/users/pw_change.html diff --git a/apps/users/templates/users/pw_change_complete.html b/kitsune/users/templates/users/pw_change_complete.html similarity index 100% rename from apps/users/templates/users/pw_change_complete.html rename to kitsune/users/templates/users/pw_change_complete.html diff --git a/apps/users/templates/users/pw_reset_complete.html b/kitsune/users/templates/users/pw_reset_complete.html similarity index 100% rename from apps/users/templates/users/pw_reset_complete.html rename to kitsune/users/templates/users/pw_reset_complete.html diff --git a/apps/users/templates/users/pw_reset_confirm.html b/kitsune/users/templates/users/pw_reset_confirm.html similarity index 100% rename from apps/users/templates/users/pw_reset_confirm.html rename to kitsune/users/templates/users/pw_reset_confirm.html diff --git a/apps/users/templates/users/pw_reset_form.html b/kitsune/users/templates/users/pw_reset_form.html similarity index 100% rename from apps/users/templates/users/pw_reset_form.html rename to kitsune/users/templates/users/pw_reset_form.html diff --git a/apps/users/templates/users/pw_reset_sent.html b/kitsune/users/templates/users/pw_reset_sent.html similarity index 100% rename from apps/users/templates/users/pw_reset_sent.html rename to kitsune/users/templates/users/pw_reset_sent.html diff --git a/apps/users/templates/users/register_done.html b/kitsune/users/templates/users/register_done.html similarity index 100% rename from apps/users/templates/users/register_done.html rename to kitsune/users/templates/users/register_done.html diff --git a/apps/users/templates/users/resend_confirmation.html b/kitsune/users/templates/users/resend_confirmation.html similarity index 100% rename from apps/users/templates/users/resend_confirmation.html rename to kitsune/users/templates/users/resend_confirmation.html diff --git a/apps/users/templates/users/resend_confirmation_done.html b/kitsune/users/templates/users/resend_confirmation_done.html similarity index 100% rename from apps/users/templates/users/resend_confirmation_done.html rename to kitsune/users/templates/users/resend_confirmation_done.html diff --git a/apps/users/tests/__init__.py b/kitsune/users/tests/__init__.py similarity index 95% rename from apps/users/tests/__init__.py rename to kitsune/users/tests/__init__.py index c00b22b908d..a5bbddb4f5b 100644 --- a/apps/users/tests/__init__.py +++ b/kitsune/users/tests/__init__.py @@ -1,11 +1,11 @@ import random from string import letters -from sumo.tests import LocalizingClient, TestCase, with_save from django.contrib.auth.models import User, Group, Permission from django.contrib.contenttypes.models import ContentType -from users.models import Profile +from kitsune.sumo.tests import LocalizingClient, TestCase, with_save +from kitsune.users.models import Profile class TestCaseBase(TestCase): diff --git a/apps/users/tests/test_api.py b/kitsune/users/tests/test_api.py similarity index 87% rename from apps/users/tests/test_api.py rename to kitsune/users/tests/test_api.py index 543fae6985c..4e0250b840c 100644 --- a/apps/users/tests/test_api.py +++ b/kitsune/users/tests/test_api.py @@ -3,11 +3,10 @@ from nose import SkipTest from nose.tools import eq_ -from sumo.helpers import urlparams -from sumo.tests import TestCase -from sumo.urlresolvers import reverse - -from users.tests import user +from kitsune.sumo.helpers import urlparams +from kitsune.sumo.tests import TestCase +from kitsune.sumo.urlresolvers import reverse +from kitsune.users.tests import user class UsernamesTests(TestCase): diff --git a/apps/users/tests/test_forms.py b/kitsune/users/tests/test_forms.py similarity index 97% rename from apps/users/tests/test_forms.py rename to kitsune/users/tests/test_forms.py index b1572939cb9..8b18872abfc 100644 --- a/apps/users/tests/test_forms.py +++ b/kitsune/users/tests/test_forms.py @@ -6,9 +6,10 @@ from nose.tools import eq_ from pyquery import PyQuery as pq -from users.forms import (AuthenticationForm, ProfileForm, RegisterForm, - SetPasswordForm, ForgotUsernameForm) -from users.tests import TestCaseBase, user +from kitsune.users.forms import ( + AuthenticationForm, ProfileForm, RegisterForm, SetPasswordForm, + ForgotUsernameForm) +from kitsune.users.tests import TestCaseBase, user class AuthenticationFormTests(TestCaseBase): diff --git a/apps/users/tests/test_helpers.py b/kitsune/users/tests/test_helpers.py similarity index 90% rename from apps/users/tests/test_helpers.py rename to kitsune/users/tests/test_helpers.py index 2cccceb41ed..2f13278c9be 100644 --- a/apps/users/tests/test_helpers.py +++ b/kitsune/users/tests/test_helpers.py @@ -5,10 +5,10 @@ from nose.tools import eq_ from pyquery import PyQuery as pq -from sumo.tests import TestCase -from users.helpers import (profile_url, profile_avatar, public_email, - display_name, user_list) -from users.tests import profile, user +from kitsune.sumo.tests import TestCase +from kitsune.users.helpers import ( + profile_url, profile_avatar, public_email, display_name, user_list) +from kitsune.users.tests import profile, user class HelperTestCase(TestCase): diff --git a/apps/users/tests/test_models.py b/kitsune/users/tests/test_models.py similarity index 93% rename from apps/users/tests/test_models.py rename to kitsune/users/tests/test_models.py index bba7cd271f6..a68f3e407b9 100644 --- a/apps/users/tests/test_models.py +++ b/kitsune/users/tests/test_models.py @@ -7,10 +7,10 @@ import mock from nose.tools import eq_ -from sumo.tests import TestCase -from users.models import RegistrationProfile, Setting -from users.forms import SettingsForm -from users.tests import user, profile +from kitsune.sumo.tests import TestCase +from kitsune.users.models import RegistrationProfile, Setting +from kitsune.users.forms import SettingsForm +from kitsune.users.tests import user, profile log = logging.getLogger('k.users') diff --git a/apps/users/tests/test_templates.py b/kitsune/users/tests/test_templates.py similarity index 96% rename from apps/users/tests/test_templates.py rename to kitsune/users/tests/test_templates.py index 0eeda7fc4b3..9ba76179e77 100644 --- a/apps/users/tests/test_templates.py +++ b/kitsune/users/tests/test_templates.py @@ -14,15 +14,17 @@ from nose.tools import eq_ from pyquery import PyQuery as pq -from flagit.models import FlaggedObject -from sumo.urlresolvers import reverse -from sumo.helpers import urlparams -from sumo.tests import post, get -from users import ERROR_SEND_EMAIL -from users.forms import PasswordResetForm -from users.models import Profile, RegistrationProfile, RegistrationManager -from users.tests import TestCaseBase, user, add_permission, profile, group -from wiki.tests import revision +from kitsune.flagit.models import FlaggedObject +from kitsune.sumo.urlresolvers import reverse +from kitsune.sumo.helpers import urlparams +from kitsune.sumo.tests import post, get +from kitsune.users import ERROR_SEND_EMAIL +from kitsune.users.forms import PasswordResetForm +from kitsune.users.models import ( + Profile, RegistrationProfile, RegistrationManager) +from kitsune.users.tests import ( + TestCaseBase, user, add_permission, profile, group) +from kitsune.wiki.tests import revision class LoginTests(TestCaseBase): @@ -291,7 +293,7 @@ def test_large_avatar(self): settings.MAX_AVATAR_FILE_SIZE = 1024 url = reverse('users.edit_avatar') self.client.login(username=self.u.username, password='testpass') - with open('apps/upload/tests/media/test.jpg') as f: + with open('kitsune/upload/tests/media/test.jpg') as f: r = self.client.post(url, {'avatar': f}) eq_(200, r.status_code) doc = pq(r.content) @@ -301,7 +303,7 @@ def test_large_avatar(self): def test_avatar_extensions(self): url = reverse('users.edit_avatar') self.client.login(username=self.u.username, password='testpass') - with open('apps/upload/tests/media/test_invalid.ext') as f: + with open('kitsune/upload/tests/media/test_invalid.ext') as f: r = self.client.post(url, {'avatar': f}) eq_(200, r.status_code) doc = pq(r.content) @@ -311,7 +313,7 @@ def test_avatar_extensions(self): def test_upload_avatar(self): """Upload a valid avatar.""" user_profile = Profile.uncached.get(user__username=self.u.username) - with open('apps/upload/tests/media/test.jpg') as f: + with open('kitsune/upload/tests/media/test.jpg') as f: user_profile.avatar.save('test_old.jpg', File(f), save=True) assert user_profile.avatar.name.endswith('92b516.jpg') old_path = user_profile.avatar.path @@ -319,7 +321,7 @@ def test_upload_avatar(self): url = reverse('users.edit_avatar') self.client.login(username=self.u.username, password='testpass') - with open('apps/upload/tests/media/test.jpg') as f: + with open('kitsune/upload/tests/media/test.jpg') as f: r = self.client.post(url, {'avatar': f}) eq_(302, r.status_code) diff --git a/apps/users/tests/test_views.py b/kitsune/users/tests/test_views.py similarity index 97% rename from apps/users/tests/test_views.py rename to kitsune/users/tests/test_views.py index da1b0b12194..e4eb196ea93 100644 --- a/apps/users/tests/test_views.py +++ b/kitsune/users/tests/test_views.py @@ -11,13 +11,15 @@ from pyquery import PyQuery as pq from tidings.tests import watch -from questions.models import Question -from sumo.tests import TestCase, LocalizingClient, send_mail_raise_smtp -from sumo.urlresolvers import reverse -from users import ERROR_SEND_EMAIL -from users.models import (CONTRIBUTOR_GROUP, Profile, RegistrationProfile, - EmailChange, Setting, email_utils) -from users.tests import profile, user, group, add_permission +from kitsune.questions.models import Question +from kitsune.sumo.tests import (TestCase, LocalizingClient, + send_mail_raise_smtp) +from kitsune.sumo.urlresolvers import reverse +from kitsune.users import ERROR_SEND_EMAIL +from kitsune.users.models import ( + CONTRIBUTOR_GROUP, Profile, RegistrationProfile, EmailChange, Setting, + email_utils) +from kitsune.users.tests import profile, user, group, add_permission class RegisterTests(TestCase): @@ -356,7 +358,7 @@ def tearDown(self): def test_upload_avatar(self): assert not self.p.avatar, 'User has no avatar.' - with open('apps/upload/tests/media/test.jpg') as f: + with open('kitsune/upload/tests/media/test.jpg') as f: url = reverse('users.edit_avatar', locale='en-US') data = {'avatar': f} r = self.client.post(url, data) @@ -371,7 +373,7 @@ def test_replace_missing_avatar(self): self.p.avatar = 'path/does/not/exist.jpg' self.p.save() assert self.p.avatar, 'User has a bad avatar.' - with open('apps/upload/tests/media/test.jpg') as f: + with open('kitsune/upload/tests/media/test.jpg') as f: url = reverse('users.edit_avatar', locale='en-US') data = {'avatar': f} r = self.client.post(url, data) diff --git a/apps/users/urls.py b/kitsune/users/urls.py similarity index 93% rename from apps/users/urls.py rename to kitsune/users/urls.py index b15c29f02d9..bfcbbdd4a98 100644 --- a/apps/users/urls.py +++ b/kitsune/users/urls.py @@ -1,11 +1,11 @@ from django.conf.urls import patterns, url, include from django.contrib.contenttypes.models import ContentType -from sumo.views import redirect_to -from users import api -from users import views -from users.models import Profile -import flagit.views +import kitsune.flagit.views +from kitsune.sumo.views import redirect_to +from kitsune.users import api +from kitsune.users import views +from kitsune.users.models import Profile # API patterns. All start with /users/api. @@ -80,7 +80,7 @@ urlpatterns = patterns('', # URLs for a single user. (r'^user/(?P\d+)', include(detail_patterns)), - url(r'^user/(?P\d+)/flag$', flagit.views.flag, + url(r'^user/(?P\d+)/flag$', kitsune.flagit.views.flag, {'content_type': ContentType.objects.get_for_model(Profile).id}, name='users.flag'), (r'^users', include(users_patterns)), diff --git a/apps/users/utils.py b/kitsune/users/utils.py similarity index 93% rename from apps/users/utils.py rename to kitsune/users/utils.py index 25e191caf64..717bf8e7758 100644 --- a/apps/users/utils.py +++ b/kitsune/users/utils.py @@ -6,9 +6,9 @@ from statsd import statsd -from users import ERROR_SEND_EMAIL -from users.forms import RegisterForm, AuthenticationForm -from users.models import RegistrationProfile +from kitsune.users import ERROR_SEND_EMAIL +from kitsune.users.forms import RegisterForm, AuthenticationForm +from kitsune.users.models import RegistrationProfile log = logging.getLogger('k.users') diff --git a/apps/users/views.py b/kitsune/users/views.py similarity index 95% rename from apps/users/views.py rename to kitsune/users/views.py index 9df0135850e..32c61305988 100644 --- a/apps/users/views.py +++ b/kitsune/users/views.py @@ -20,26 +20,26 @@ from tidings.tasks import claim_watches from tower import ugettext as _ -from access.decorators import (logout_required, login_required, - permission_required) -from questions.models import (Question, user_num_answers, user_num_questions, - user_num_solutions) -from sumo import email_utils -from sumo.decorators import ssl_required -from sumo.helpers import urlparams -from sumo.urlresolvers import reverse -from sumo.utils import get_next_url -from upload.tasks import _create_image_thumbnail -from users.forms import (ProfileForm, AvatarForm, EmailConfirmationForm, - AuthenticationForm, EmailChangeForm, SetPasswordForm, - PasswordChangeForm, SettingsForm, ForgotUsernameForm, - RegisterForm, PasswordResetForm) -from users.helpers import profile_url -from users.models import (CONTRIBUTOR_GROUP, Group, Profile, - RegistrationProfile, EmailChange) -from users.utils import (handle_login, handle_register, - try_send_email_with_form) -from wiki.models import user_num_documents, user_documents +from kitsune.access.decorators import ( + logout_required, login_required, permission_required) +from kitsune.questions.models import ( + Question, user_num_answers, user_num_questions, user_num_solutions) +from kitsune.sumo import email_utils +from kitsune.sumo.decorators import ssl_required +from kitsune.sumo.helpers import urlparams +from kitsune.sumo.urlresolvers import reverse +from kitsune.sumo.utils import get_next_url +from kitsune.upload.tasks import _create_image_thumbnail +from kitsune.users.forms import ( + ProfileForm, AvatarForm, EmailConfirmationForm, AuthenticationForm, + EmailChangeForm, SetPasswordForm, PasswordChangeForm, SettingsForm, + ForgotUsernameForm, RegisterForm, PasswordResetForm) +from kitsune.users.helpers import profile_url +from kitsune.users.models import ( + CONTRIBUTOR_GROUP, Group, Profile, RegistrationProfile, EmailChange) +from kitsune.users.utils import ( + handle_login, handle_register, try_send_email_with_form) +from kitsune.wiki.models import user_num_documents, user_documents @ssl_required diff --git a/apps/users/widgets.py b/kitsune/users/widgets.py similarity index 92% rename from apps/users/widgets.py rename to kitsune/users/widgets.py index f7ef9a507b9..cb075061606 100644 --- a/apps/users/widgets.py +++ b/kitsune/users/widgets.py @@ -1,4 +1,4 @@ -from sumo.monkeypatch import URLWidget +from kitsune.sumo.monkeypatch import URLWidget class PatternURLWidget(URLWidget): diff --git a/apps/wiki/__init__.py b/kitsune/wiki/__init__.py similarity index 100% rename from apps/wiki/__init__.py rename to kitsune/wiki/__init__.py diff --git a/apps/wiki/admin.py b/kitsune/wiki/admin.py similarity index 98% rename from apps/wiki/admin.py rename to kitsune/wiki/admin.py index 84834d952f7..c9a5e04a157 100644 --- a/apps/wiki/admin.py +++ b/kitsune/wiki/admin.py @@ -1,6 +1,6 @@ from django.contrib import admin -from wiki.models import Document, ImportantDate, Locale +from kitsune.wiki.models import Document, ImportantDate, Locale class DocumentAdmin(admin.ModelAdmin): diff --git a/apps/wiki/config.py b/kitsune/wiki/config.py similarity index 100% rename from apps/wiki/config.py rename to kitsune/wiki/config.py diff --git a/apps/wiki/cron.py b/kitsune/wiki/cron.py similarity index 79% rename from apps/wiki/cron.py rename to kitsune/wiki/cron.py index 43629051b8a..6704b8fc9eb 100644 --- a/apps/wiki/cron.py +++ b/kitsune/wiki/cron.py @@ -7,9 +7,9 @@ import cronjobs import waffle -from search.tasks import index_task -from wiki import tasks -from wiki.models import DocumentMappingType +from kitsune.search.tasks import index_task +from kitsune.wiki import tasks +from kitsune.wiki.models import DocumentMappingType log = logging.getLogger('k.migratehelpful') diff --git a/apps/wiki/data/FlashCrashes.wiki b/kitsune/wiki/data/FlashCrashes.wiki similarity index 100% rename from apps/wiki/data/FlashCrashes.wiki rename to kitsune/wiki/data/FlashCrashes.wiki diff --git a/apps/wiki/data/GetCommunitySupport.wiki b/kitsune/wiki/data/GetCommunitySupport.wiki similarity index 100% rename from apps/wiki/data/GetCommunitySupport.wiki rename to kitsune/wiki/data/GetCommunitySupport.wiki diff --git a/apps/wiki/data/MozillaNews.wiki b/kitsune/wiki/data/MozillaNews.wiki similarity index 100% rename from apps/wiki/data/MozillaNews.wiki rename to kitsune/wiki/data/MozillaNews.wiki diff --git a/apps/wiki/data/SuggestionBox.wiki b/kitsune/wiki/data/SuggestionBox.wiki similarity index 100% rename from apps/wiki/data/SuggestionBox.wiki rename to kitsune/wiki/data/SuggestionBox.wiki diff --git a/apps/wiki/data/SuperheroesWanted.wiki b/kitsune/wiki/data/SuperheroesWanted.wiki similarity index 100% rename from apps/wiki/data/SuperheroesWanted.wiki rename to kitsune/wiki/data/SuperheroesWanted.wiki diff --git a/apps/wiki/diff.py b/kitsune/wiki/diff.py similarity index 100% rename from apps/wiki/diff.py rename to kitsune/wiki/diff.py diff --git a/apps/wiki/events.py b/kitsune/wiki/events.py similarity index 98% rename from apps/wiki/events.py rename to kitsune/wiki/events.py index 1dc7bd8713a..577576f03f2 100644 --- a/apps/wiki/events.py +++ b/kitsune/wiki/events.py @@ -12,9 +12,9 @@ from tower import ugettext_lazy as _lazy from wikimarkup.parser import ALLOWED_TAGS, ALLOWED_ATTRIBUTES -from sumo import email_utils -from sumo.urlresolvers import reverse -from wiki.models import Document +from kitsune.sumo import email_utils +from kitsune.sumo.urlresolvers import reverse +from kitsune.wiki.models import Document log = logging.getLogger('k.wiki.events') diff --git a/apps/wiki/facets.py b/kitsune/wiki/facets.py similarity index 97% rename from apps/wiki/facets.py rename to kitsune/wiki/facets.py index 82b78f103fb..462034c481a 100644 --- a/apps/wiki/facets.py +++ b/kitsune/wiki/facets.py @@ -8,9 +8,9 @@ Timeout, ConnectionError, ElasticHttpError) from statsd import statsd -from products.models import Product -from topics.models import Topic -from wiki.models import Document, DocumentMappingType +from kitsune.products.models import Product +from kitsune.topics.models import Topic +from kitsune.wiki.models import Document, DocumentMappingType def products_for(topics): diff --git a/apps/wiki/forms.py b/kitsune/wiki/forms.py similarity index 96% rename from apps/wiki/forms.py rename to kitsune/wiki/forms.py index 8825b62bf07..6f9568a86bf 100644 --- a/apps/wiki/forms.py +++ b/kitsune/wiki/forms.py @@ -8,14 +8,16 @@ from tower import ugettext_lazy as _lazy -from products.models import Product -from sumo.form_fields import MultiUsernameField, StrippedCharField -from topics.models import Topic -from wiki.config import (GROUPED_FIREFOX_VERSIONS, GROUPED_OPERATING_SYSTEMS, - SIGNIFICANCES, CATEGORIES) -from wiki.models import Document, Revision, MAX_REVISION_COMMENT_LENGTH -from wiki.widgets import (RadioFieldRendererWithHelpText, - TopicsAndSubtopicsWidget) +from kitsune.products.models import Product +from kitsune.sumo.form_fields import MultiUsernameField, StrippedCharField +from kitsune.topics.models import Topic +from kitsune.wiki.config import ( + GROUPED_FIREFOX_VERSIONS, GROUPED_OPERATING_SYSTEMS, SIGNIFICANCES, + CATEGORIES) +from kitsune.wiki.models import ( + Document, Revision, MAX_REVISION_COMMENT_LENGTH) +from kitsune.wiki.widgets import ( + RadioFieldRendererWithHelpText, TopicsAndSubtopicsWidget) TITLE_REQUIRED = _lazy(u'Please provide a title.') diff --git a/apps/wiki/helpers.py b/kitsune/wiki/helpers.py similarity index 85% rename from apps/wiki/helpers.py rename to kitsune/wiki/helpers.py index f18bc7e0419..56d923ba523 100644 --- a/apps/wiki/helpers.py +++ b/kitsune/wiki/helpers.py @@ -1,8 +1,8 @@ from jingo import register import jinja2 -from sumo import parser -from wiki.diff import BetterHtmlDiff +from kitsune.sumo import parser +from kitsune.wiki.diff import BetterHtmlDiff @register.function diff --git a/apps/wiki/locale_views.py b/kitsune/wiki/locale_views.py similarity index 96% rename from apps/wiki/locale_views.py rename to kitsune/wiki/locale_views.py index 8fa0c7395b8..970eee4dcb2 100644 --- a/apps/wiki/locale_views.py +++ b/kitsune/wiki/locale_views.py @@ -7,9 +7,9 @@ from tower import ugettext as _ -from access.decorators import login_required -from groups.forms import AddUserForm -from wiki.models import Locale +from kitsune.access.decorators import login_required +from kitsune.groups.forms import AddUserForm +from kitsune.wiki.models import Locale LEADER = 'leader' diff --git a/apps/wiki/management/commands/__init__.py b/kitsune/wiki/management/__init__.py similarity index 100% rename from apps/wiki/management/commands/__init__.py rename to kitsune/wiki/management/__init__.py diff --git a/lib/__init__.py b/kitsune/wiki/management/commands/__init__.py similarity index 100% rename from lib/__init__.py rename to kitsune/wiki/management/commands/__init__.py diff --git a/apps/wiki/management/commands/dump_topics.py b/kitsune/wiki/management/commands/dump_topics.py similarity index 93% rename from apps/wiki/management/commands/dump_topics.py rename to kitsune/wiki/management/commands/dump_topics.py index 229b6ab1922..fd486db90b4 100644 --- a/apps/wiki/management/commands/dump_topics.py +++ b/kitsune/wiki/management/commands/dump_topics.py @@ -2,7 +2,7 @@ from taggit.models import TaggedItem -from wiki.models import Document +from kitsune.wiki.models import Document class Command(BaseCommand): diff --git a/apps/wiki/models.py b/kitsune/wiki/models.py similarity index 97% rename from apps/wiki/models.py rename to kitsune/wiki/models.py index 58d13fcca8e..0f521d07f81 100644 --- a/apps/wiki/models.py +++ b/kitsune/wiki/models.py @@ -1,5 +1,5 @@ -import time import logging +import time from datetime import datetime, timedelta from urlparse import urlparse @@ -17,22 +17,23 @@ from tidings.models import NotificationsMixin from tower import ugettext_lazy as _lazy, ugettext as _ -from products.models import Product -from questions.models import Question -from search.es_utils import UnindexMeBro, ES_EXCEPTIONS -from search.models import (SearchMappingType, SearchMixin, - register_for_indexing, register_mapping_type) -from sumo import ProgrammingError -from sumo.models import ModelBase, LocaleField -from sumo.urlresolvers import reverse, split_path -from tags.models import BigVocabTaggableMixin -from topics.models import Topic -from wiki import TEMPLATE_TITLE_PREFIX -from wiki.config import (CATEGORIES, SIGNIFICANCES, TYPO_SIGNIFICANCE, - MEDIUM_SIGNIFICANCE, MAJOR_SIGNIFICANCE, - REDIRECT_HTML, REDIRECT_CONTENT, REDIRECT_TITLE, - REDIRECT_SLUG) -from wiki.permissions import DocumentPermissionMixin +from kitsune.products.models import Product +from kitsune.questions.models import Question +from kitsune.search.es_utils import UnindexMeBro, ES_EXCEPTIONS +from kitsune.search.models import ( + SearchMappingType, SearchMixin, register_for_indexing, + register_mapping_type) +from kitsune.sumo import ProgrammingError +from kitsune.sumo.models import ModelBase, LocaleField +from kitsune.sumo.urlresolvers import reverse, split_path +from kitsune.tags.models import BigVocabTaggableMixin +from kitsune.topics.models import Topic +from kitsune.wiki import TEMPLATE_TITLE_PREFIX +from kitsune.wiki.config import ( + CATEGORIES, SIGNIFICANCES, TYPO_SIGNIFICANCE, MEDIUM_SIGNIFICANCE, + MAJOR_SIGNIFICANCE, REDIRECT_HTML, REDIRECT_CONTENT, REDIRECT_TITLE, + REDIRECT_SLUG) +from kitsune.wiki.permissions import DocumentPermissionMixin log = logging.getLogger('k.wiki') @@ -491,7 +492,7 @@ def is_majorly_outdated(self): def is_watched_by(self, user): """Return whether `user` is notified of edits to me.""" - from wiki.events import EditDocumentEvent + from kitsune.wiki.events import EditDocumentEvent return EditDocumentEvent.is_notifying(user, self) def get_topics(self, uncached=False): @@ -631,7 +632,7 @@ def parse_and_calculate_links(self): # often called multiple times per document. self.links_from().delete() - from wiki.parser import wiki_to_html, WhatLinksHereParser + from kitsune.wiki.parser import wiki_to_html, WhatLinksHereParser return wiki_to_html(self.current_revision.content, locale=self.locale, doc_id=self.id, @@ -977,7 +978,7 @@ def __unicode__(self): @property def content_parsed(self): - from wiki.parser import wiki_to_html + from kitsune.wiki.parser import wiki_to_html return wiki_to_html(self.content, locale=self.document.locale, doc_id=self.document.id) @@ -1094,8 +1095,8 @@ def _doc_components_from_url(url, required_locale=None, check_host=True): except Http404: return False - import wiki.views # Views import models; models import views. - if view != wiki.views.document: + import kitsune.wiki.views # Views import models; models import views. + if view != kitsune.wiki.views.document: raise _NotDocumentView return locale, path, view_kwargs['document_slug'] diff --git a/apps/wiki/parser.py b/kitsune/wiki/parser.py similarity index 98% rename from apps/wiki/parser.py rename to kitsune/wiki/parser.py index c2c0a3bf605..b49774c0185 100644 --- a/apps/wiki/parser.py +++ b/kitsune/wiki/parser.py @@ -12,9 +12,10 @@ from statsd import statsd from tower import ugettext as _, ugettext_lazy as _lazy -import sumo.parser -from wiki.models import Document -from sumo.parser import (ALLOWED_ATTRIBUTES, get_object_fallback) +from kitsune.sumo import parser as sumo_parser +from kitsune.sumo.parser import ALLOWED_ATTRIBUTES, get_object_fallback +from kitsune.wiki.models import Document + BLOCK_LEVEL_ELEMENTS = ['table', 'blockquote', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'td', 'th', 'div', 'hr', 'pre', 'p', 'li', 'ul', @@ -324,7 +325,7 @@ def hydrate(match): RECURSION_MESSAGE = _lazy(u'[Recursive inclusion of "%s"]') -class WikiParser(sumo.parser.WikiParser): +class WikiParser(sumo_parser.WikiParser): """An extension of the parser from the forums adding more crazy features {for} tags, inclusions, and templates--oh my! diff --git a/apps/wiki/permissions.py b/kitsune/wiki/permissions.py similarity index 98% rename from apps/wiki/permissions.py rename to kitsune/wiki/permissions.py index 1ef5b7adc20..d4acbd50f22 100644 --- a/apps/wiki/permissions.py +++ b/kitsune/wiki/permissions.py @@ -105,7 +105,7 @@ def _is_leader(locale, user): Returns False if the locale doesn't exist. This will should only happen if we forgot to insert a new locale when enabling it or during testing. """ - from wiki.models import Locale + from kitsune.wiki.models import Locale try: locale_team = Locale.objects.get(locale=locale) except Locale.DoesNotExist: @@ -121,7 +121,7 @@ def _is_reviewer(locale, user): Returns False if the locale doesn't exist. This will should only happen if we forgot to insert a new locale when enabling it or during testing. """ - from wiki.models import Locale + from kitsune.wiki.models import Locale try: locale_team = Locale.objects.get(locale=locale) except Locale.DoesNotExist: diff --git a/apps/wiki/sampledata.py b/kitsune/wiki/sampledata.py similarity index 96% rename from apps/wiki/sampledata.py rename to kitsune/wiki/sampledata.py index c94eb73c3b5..2652b2ab4cc 100644 --- a/apps/wiki/sampledata.py +++ b/kitsune/wiki/sampledata.py @@ -2,10 +2,10 @@ from datetime import datetime -from products.models import Product -from topics.models import Topic -from topics.tests import topic -from wiki.tests import document, revision +from kitsune.products.models import Product +from kitsune.topics.models import Topic +from kitsune.topics.tests import topic +from kitsune.wiki.tests import document, revision def read_file(filename): diff --git a/apps/wiki/showfor.py b/kitsune/wiki/showfor.py similarity index 91% rename from apps/wiki/showfor.py rename to kitsune/wiki/showfor.py index 2bd19d56b89..473e5d22c73 100644 --- a/apps/wiki/showfor.py +++ b/kitsune/wiki/showfor.py @@ -3,11 +3,11 @@ from tower import ugettext_lazy as _lazy -from wiki.config import (OPERATING_SYSTEMS, - GROUPED_OPERATING_SYSTEMS, FIREFOX_VERSIONS, - GROUPED_FIREFOX_VERSIONS, MOBILE_OPERATING_SYSTEMS, - DESKTOP_OPERATING_SYSTEMS, MOBILE_FIREFOX_VERSIONS, - DESKTOP_FIREFOX_VERSIONS) +from kitsune.wiki.config import ( + OPERATING_SYSTEMS, GROUPED_OPERATING_SYSTEMS, FIREFOX_VERSIONS, + GROUPED_FIREFOX_VERSIONS, MOBILE_OPERATING_SYSTEMS, + DESKTOP_OPERATING_SYSTEMS, MOBILE_FIREFOX_VERSIONS, + DESKTOP_FIREFOX_VERSIONS) def _split_browser_slug(slug): diff --git a/apps/wiki/tasks.py b/kitsune/wiki/tasks.py similarity index 96% rename from apps/wiki/tasks.py rename to kitsune/wiki/tasks.py index 0c4904aa368..47e37c896b0 100644 --- a/apps/wiki/tasks.py +++ b/kitsune/wiki/tasks.py @@ -15,11 +15,11 @@ from tower import ugettext as _ import waffle -from sumo import email_utils -from sumo.urlresolvers import reverse -from sumo.utils import chunked -from wiki.models import (Document, points_to_document_view, SlugCollision, - TitleCollision, Revision) +from kitsune.sumo import email_utils +from kitsune.sumo.urlresolvers import reverse +from kitsune.sumo.utils import chunked +from kitsune.wiki.models import ( + Document, points_to_document_view, SlugCollision, TitleCollision, Revision) log = logging.getLogger('k.task') diff --git a/apps/wiki/templates/wiki/base.html b/kitsune/wiki/templates/wiki/base.html similarity index 100% rename from apps/wiki/templates/wiki/base.html rename to kitsune/wiki/templates/wiki/base.html diff --git a/apps/wiki/templates/wiki/compare_revisions.html b/kitsune/wiki/templates/wiki/compare_revisions.html similarity index 100% rename from apps/wiki/templates/wiki/compare_revisions.html rename to kitsune/wiki/templates/wiki/compare_revisions.html diff --git a/apps/wiki/templates/wiki/confirm_document_delete.html b/kitsune/wiki/templates/wiki/confirm_document_delete.html similarity index 100% rename from apps/wiki/templates/wiki/confirm_document_delete.html rename to kitsune/wiki/templates/wiki/confirm_document_delete.html diff --git a/apps/wiki/templates/wiki/confirm_remove_contributor.html b/kitsune/wiki/templates/wiki/confirm_remove_contributor.html similarity index 100% rename from apps/wiki/templates/wiki/confirm_remove_contributor.html rename to kitsune/wiki/templates/wiki/confirm_remove_contributor.html diff --git a/apps/wiki/templates/wiki/confirm_remove_from_locale.html b/kitsune/wiki/templates/wiki/confirm_remove_from_locale.html similarity index 100% rename from apps/wiki/templates/wiki/confirm_remove_from_locale.html rename to kitsune/wiki/templates/wiki/confirm_remove_from_locale.html diff --git a/apps/wiki/templates/wiki/confirm_revision_delete.html b/kitsune/wiki/templates/wiki/confirm_revision_delete.html similarity index 100% rename from apps/wiki/templates/wiki/confirm_revision_delete.html rename to kitsune/wiki/templates/wiki/confirm_revision_delete.html diff --git a/apps/wiki/templates/wiki/document.html b/kitsune/wiki/templates/wiki/document.html similarity index 100% rename from apps/wiki/templates/wiki/document.html rename to kitsune/wiki/templates/wiki/document.html diff --git a/apps/wiki/templates/wiki/edit.html b/kitsune/wiki/templates/wiki/edit.html similarity index 100% rename from apps/wiki/templates/wiki/edit.html rename to kitsune/wiki/templates/wiki/edit.html diff --git a/apps/wiki/templates/wiki/email/approved.html b/kitsune/wiki/templates/wiki/email/approved.html similarity index 100% rename from apps/wiki/templates/wiki/email/approved.html rename to kitsune/wiki/templates/wiki/email/approved.html diff --git a/apps/wiki/templates/wiki/email/approved.ltxt b/kitsune/wiki/templates/wiki/email/approved.ltxt similarity index 100% rename from apps/wiki/templates/wiki/email/approved.ltxt rename to kitsune/wiki/templates/wiki/email/approved.ltxt diff --git a/apps/wiki/templates/wiki/email/edited.html b/kitsune/wiki/templates/wiki/email/edited.html similarity index 100% rename from apps/wiki/templates/wiki/email/edited.html rename to kitsune/wiki/templates/wiki/email/edited.html diff --git a/apps/wiki/templates/wiki/email/edited.ltxt b/kitsune/wiki/templates/wiki/email/edited.ltxt similarity index 100% rename from apps/wiki/templates/wiki/email/edited.ltxt rename to kitsune/wiki/templates/wiki/email/edited.ltxt diff --git a/apps/wiki/templates/wiki/email/ready_for_l10n.html b/kitsune/wiki/templates/wiki/email/ready_for_l10n.html similarity index 100% rename from apps/wiki/templates/wiki/email/ready_for_l10n.html rename to kitsune/wiki/templates/wiki/email/ready_for_l10n.html diff --git a/apps/wiki/templates/wiki/email/ready_for_l10n.ltxt b/kitsune/wiki/templates/wiki/email/ready_for_l10n.ltxt similarity index 100% rename from apps/wiki/templates/wiki/email/ready_for_l10n.ltxt rename to kitsune/wiki/templates/wiki/email/ready_for_l10n.ltxt diff --git a/apps/wiki/templates/wiki/email/ready_for_review.html b/kitsune/wiki/templates/wiki/email/ready_for_review.html similarity index 100% rename from apps/wiki/templates/wiki/email/ready_for_review.html rename to kitsune/wiki/templates/wiki/email/ready_for_review.html diff --git a/apps/wiki/templates/wiki/email/ready_for_review.ltxt b/kitsune/wiki/templates/wiki/email/ready_for_review.ltxt similarity index 100% rename from apps/wiki/templates/wiki/email/ready_for_review.ltxt rename to kitsune/wiki/templates/wiki/email/ready_for_review.ltxt diff --git a/apps/wiki/templates/wiki/email/reviewed.html b/kitsune/wiki/templates/wiki/email/reviewed.html similarity index 100% rename from apps/wiki/templates/wiki/email/reviewed.html rename to kitsune/wiki/templates/wiki/email/reviewed.html diff --git a/apps/wiki/templates/wiki/email/reviewed.ltxt b/kitsune/wiki/templates/wiki/email/reviewed.ltxt similarity index 100% rename from apps/wiki/templates/wiki/email/reviewed.ltxt rename to kitsune/wiki/templates/wiki/email/reviewed.ltxt diff --git a/apps/wiki/templates/wiki/email/reviewed_contributors.html b/kitsune/wiki/templates/wiki/email/reviewed_contributors.html similarity index 100% rename from apps/wiki/templates/wiki/email/reviewed_contributors.html rename to kitsune/wiki/templates/wiki/email/reviewed_contributors.html diff --git a/apps/wiki/templates/wiki/email/reviewed_contributors.ltxt b/kitsune/wiki/templates/wiki/email/reviewed_contributors.ltxt similarity index 100% rename from apps/wiki/templates/wiki/email/reviewed_contributors.ltxt rename to kitsune/wiki/templates/wiki/email/reviewed_contributors.ltxt diff --git a/apps/wiki/templates/wiki/history.html b/kitsune/wiki/templates/wiki/history.html similarity index 100% rename from apps/wiki/templates/wiki/history.html rename to kitsune/wiki/templates/wiki/history.html diff --git a/apps/wiki/templates/wiki/includes/document_macros.html b/kitsune/wiki/templates/wiki/includes/document_macros.html similarity index 100% rename from apps/wiki/templates/wiki/includes/document_macros.html rename to kitsune/wiki/templates/wiki/includes/document_macros.html diff --git a/apps/wiki/templates/wiki/includes/flag_form.html b/kitsune/wiki/templates/wiki/includes/flag_form.html similarity index 100% rename from apps/wiki/templates/wiki/includes/flag_form.html rename to kitsune/wiki/templates/wiki/includes/flag_form.html diff --git a/apps/wiki/templates/wiki/includes/ready_for_l10n_modal.html b/kitsune/wiki/templates/wiki/includes/ready_for_l10n_modal.html similarity index 100% rename from apps/wiki/templates/wiki/includes/ready_for_l10n_modal.html rename to kitsune/wiki/templates/wiki/includes/ready_for_l10n_modal.html diff --git a/apps/wiki/templates/wiki/includes/recent_revisions_fragment.html b/kitsune/wiki/templates/wiki/includes/recent_revisions_fragment.html similarity index 100% rename from apps/wiki/templates/wiki/includes/recent_revisions_fragment.html rename to kitsune/wiki/templates/wiki/includes/recent_revisions_fragment.html diff --git a/apps/wiki/templates/wiki/includes/review_form.html b/kitsune/wiki/templates/wiki/includes/review_form.html similarity index 100% rename from apps/wiki/templates/wiki/includes/review_form.html rename to kitsune/wiki/templates/wiki/includes/review_form.html diff --git a/apps/wiki/templates/wiki/includes/revision_diff.html b/kitsune/wiki/templates/wiki/includes/revision_diff.html similarity index 100% rename from apps/wiki/templates/wiki/includes/revision_diff.html rename to kitsune/wiki/templates/wiki/includes/revision_diff.html diff --git a/apps/wiki/templates/wiki/includes/revision_list.html b/kitsune/wiki/templates/wiki/includes/revision_list.html similarity index 100% rename from apps/wiki/templates/wiki/includes/revision_list.html rename to kitsune/wiki/templates/wiki/includes/revision_list.html diff --git a/apps/wiki/templates/wiki/includes/sidebar_modules.html b/kitsune/wiki/templates/wiki/includes/sidebar_modules.html similarity index 100% rename from apps/wiki/templates/wiki/includes/sidebar_modules.html rename to kitsune/wiki/templates/wiki/includes/sidebar_modules.html diff --git a/apps/wiki/templates/wiki/includes/topics_widget.html b/kitsune/wiki/templates/wiki/includes/topics_widget.html similarity index 100% rename from apps/wiki/templates/wiki/includes/topics_widget.html rename to kitsune/wiki/templates/wiki/includes/topics_widget.html diff --git a/apps/wiki/templates/wiki/includes/unhelpful_survey.html b/kitsune/wiki/templates/wiki/includes/unhelpful_survey.html similarity index 100% rename from apps/wiki/templates/wiki/includes/unhelpful_survey.html rename to kitsune/wiki/templates/wiki/includes/unhelpful_survey.html diff --git a/apps/wiki/templates/wiki/list_documents.html b/kitsune/wiki/templates/wiki/list_documents.html similarity index 100% rename from apps/wiki/templates/wiki/list_documents.html rename to kitsune/wiki/templates/wiki/list_documents.html diff --git a/apps/wiki/templates/wiki/locale_details.html b/kitsune/wiki/templates/wiki/locale_details.html similarity index 100% rename from apps/wiki/templates/wiki/locale_details.html rename to kitsune/wiki/templates/wiki/locale_details.html diff --git a/apps/wiki/templates/wiki/locale_list.html b/kitsune/wiki/templates/wiki/locale_list.html similarity index 100% rename from apps/wiki/templates/wiki/locale_list.html rename to kitsune/wiki/templates/wiki/locale_list.html diff --git a/apps/wiki/templates/wiki/mobile/document.html b/kitsune/wiki/templates/wiki/mobile/document.html similarity index 100% rename from apps/wiki/templates/wiki/mobile/document.html rename to kitsune/wiki/templates/wiki/mobile/document.html diff --git a/apps/wiki/templates/wiki/mobile/includes/document_macros.html b/kitsune/wiki/templates/wiki/mobile/includes/document_macros.html similarity index 100% rename from apps/wiki/templates/wiki/mobile/includes/document_macros.html rename to kitsune/wiki/templates/wiki/mobile/includes/document_macros.html diff --git a/apps/wiki/templates/wiki/new_document.html b/kitsune/wiki/templates/wiki/new_document.html similarity index 100% rename from apps/wiki/templates/wiki/new_document.html rename to kitsune/wiki/templates/wiki/new_document.html diff --git a/apps/wiki/templates/wiki/preview.html b/kitsune/wiki/templates/wiki/preview.html similarity index 100% rename from apps/wiki/templates/wiki/preview.html rename to kitsune/wiki/templates/wiki/preview.html diff --git a/apps/wiki/templates/wiki/recent_revisions.html b/kitsune/wiki/templates/wiki/recent_revisions.html similarity index 100% rename from apps/wiki/templates/wiki/recent_revisions.html rename to kitsune/wiki/templates/wiki/recent_revisions.html diff --git a/apps/wiki/templates/wiki/review_revision.html b/kitsune/wiki/templates/wiki/review_revision.html similarity index 100% rename from apps/wiki/templates/wiki/review_revision.html rename to kitsune/wiki/templates/wiki/review_revision.html diff --git a/apps/wiki/templates/wiki/review_translation.html b/kitsune/wiki/templates/wiki/review_translation.html similarity index 100% rename from apps/wiki/templates/wiki/review_translation.html rename to kitsune/wiki/templates/wiki/review_translation.html diff --git a/apps/wiki/templates/wiki/revision.html b/kitsune/wiki/templates/wiki/revision.html similarity index 100% rename from apps/wiki/templates/wiki/revision.html rename to kitsune/wiki/templates/wiki/revision.html diff --git a/apps/wiki/templates/wiki/select_locale.html b/kitsune/wiki/templates/wiki/select_locale.html similarity index 100% rename from apps/wiki/templates/wiki/select_locale.html rename to kitsune/wiki/templates/wiki/select_locale.html diff --git a/apps/wiki/templates/wiki/show_translations.html b/kitsune/wiki/templates/wiki/show_translations.html similarity index 100% rename from apps/wiki/templates/wiki/show_translations.html rename to kitsune/wiki/templates/wiki/show_translations.html diff --git a/apps/wiki/templates/wiki/translate.html b/kitsune/wiki/templates/wiki/translate.html similarity index 100% rename from apps/wiki/templates/wiki/translate.html rename to kitsune/wiki/templates/wiki/translate.html diff --git a/apps/wiki/templates/wiki/what_links_here.html b/kitsune/wiki/templates/wiki/what_links_here.html similarity index 100% rename from apps/wiki/templates/wiki/what_links_here.html rename to kitsune/wiki/templates/wiki/what_links_here.html diff --git a/apps/wiki/templates/wikiparser/hook_video.html b/kitsune/wiki/templates/wikiparser/hook_video.html similarity index 100% rename from apps/wiki/templates/wikiparser/hook_video.html rename to kitsune/wiki/templates/wikiparser/hook_video.html diff --git a/apps/wiki/templates/wikiparser/hook_youtube_embed.html b/kitsune/wiki/templates/wikiparser/hook_youtube_embed.html similarity index 100% rename from apps/wiki/templates/wikiparser/hook_youtube_embed.html rename to kitsune/wiki/templates/wikiparser/hook_youtube_embed.html diff --git a/apps/wiki/tests/__init__.py b/kitsune/wiki/tests/__init__.py similarity index 90% rename from apps/wiki/tests/__init__.py rename to kitsune/wiki/tests/__init__.py index d5ac73e817c..bb32b1b70e2 100644 --- a/apps/wiki/tests/__init__.py +++ b/kitsune/wiki/tests/__init__.py @@ -3,12 +3,12 @@ from django.template.defaultfilters import slugify -from products.tests import product -from sumo.tests import LocalizingClient, TestCase, with_save -from topics.tests import topic -from users.tests import user -from wiki.models import Document, Revision, HelpfulVote, Locale -from wiki.config import CATEGORIES, SIGNIFICANCES +from kitsune.products.tests import product +from kitsune.sumo.tests import LocalizingClient, TestCase, with_save +from kitsune.topics.tests import topic +from kitsune.users.tests import user +from kitsune.wiki.models import Document, Revision, HelpfulVote, Locale +from kitsune.wiki.config import CATEGORIES, SIGNIFICANCES class TestCaseBase(TestCase): diff --git a/apps/wiki/tests/test_admin.py b/kitsune/wiki/tests/test_admin.py similarity index 82% rename from apps/wiki/tests/test_admin.py rename to kitsune/wiki/tests/test_admin.py index d6f37d86761..bc1bbefa689 100644 --- a/apps/wiki/tests/test_admin.py +++ b/kitsune/wiki/tests/test_admin.py @@ -2,10 +2,10 @@ from nose.tools import eq_ from kitsune import urls -from sumo.tests import TestCase -from wiki.admin import DocumentAdmin -from wiki.models import Document -from wiki.tests import document, translated_revision +from kitsune.sumo.tests import TestCase +from kitsune.wiki.admin import DocumentAdmin +from kitsune.wiki.models import Document +from kitsune.wiki.tests import document, translated_revision class ArchiveTests(TestCase): diff --git a/apps/wiki/tests/test_es.py b/kitsune/wiki/tests/test_es.py similarity index 95% rename from apps/wiki/tests/test_es.py rename to kitsune/wiki/tests/test_es.py index bd276b33caa..701189bf394 100644 --- a/apps/wiki/tests/test_es.py +++ b/kitsune/wiki/tests/test_es.py @@ -2,12 +2,12 @@ from nose.tools import eq_ -from products.tests import product -from search.tests.test_es import ElasticTestCase -from topics.tests import topic -from wiki.tests import document, revision, helpful_vote -from wiki.models import Document, DocumentMappingType -from wiki.config import REDIRECT_CONTENT +from kitsune.products.tests import product +from kitsune.search.tests.test_es import ElasticTestCase +from kitsune.topics.tests import topic +from kitsune.wiki.tests import document, revision, helpful_vote +from kitsune.wiki.models import Document, DocumentMappingType +from kitsune.wiki.config import REDIRECT_CONTENT class TestPostUpdate(ElasticTestCase): diff --git a/apps/wiki/tests/test_facets.py b/kitsune/wiki/tests/test_facets.py similarity index 94% rename from apps/wiki/tests/test_facets.py rename to kitsune/wiki/tests/test_facets.py index 29bcdba97ac..bcefbdc5463 100644 --- a/apps/wiki/tests/test_facets.py +++ b/kitsune/wiki/tests/test_facets.py @@ -1,12 +1,13 @@ from nose.tools import eq_ -from products.tests import product -from search.tests.test_es import ElasticTestCase -from sumo.tests import TestCase -from topics.tests import topic -from wiki.facets import (products_for, topics_for, documents_for, - _documents_for, _db_documents_for) -from wiki.tests import revision +from kitsune.products.tests import product +from kitsune.search.tests.test_es import ElasticTestCase +from kitsune.sumo.tests import TestCase +from kitsune.topics.tests import topic +from kitsune.wiki.facets import ( + products_for, topics_for, documents_for, _documents_for, + _db_documents_for) +from kitsune.wiki.tests import revision class TestFacetHelpersMixin(object): diff --git a/apps/wiki/tests/test_locale_views.py b/kitsune/wiki/tests/test_locale_views.py similarity index 95% rename from apps/wiki/tests/test_locale_views.py rename to kitsune/wiki/tests/test_locale_views.py index b4d2b175d94..4597c7b52fe 100644 --- a/apps/wiki/tests/test_locale_views.py +++ b/kitsune/wiki/tests/test_locale_views.py @@ -2,11 +2,11 @@ from pyquery import PyQuery as pq -from sumo.tests import TestCase, LocalizingClient -from sumo.urlresolvers import reverse -from users.tests import user, add_permission -from wiki.models import Locale -from wiki.tests import locale +from kitsune.sumo.tests import TestCase, LocalizingClient +from kitsune.sumo.urlresolvers import reverse +from kitsune.users.tests import user, add_permission +from kitsune.wiki.models import Locale +from kitsune.wiki.tests import locale class LocaleListTests(TestCase): diff --git a/apps/wiki/tests/test_models.py b/kitsune/wiki/tests/test_models.py similarity index 97% rename from apps/wiki/tests/test_models.py rename to kitsune/wiki/tests/test_models.py index 017b669349f..98644eb09d3 100644 --- a/apps/wiki/tests/test_models.py +++ b/kitsune/wiki/tests/test_models.py @@ -8,17 +8,18 @@ from django.core.exceptions import ValidationError -from products.tests import product -from sumo import ProgrammingError -from sumo.tests import TestCase -from sumo.urlresolvers import reverse -from topics.tests import topic -from wiki.models import Document -from wiki.config import (REDIRECT_SLUG, REDIRECT_TITLE, REDIRECT_HTML, - MAJOR_SIGNIFICANCE, CATEGORIES, TYPO_SIGNIFICANCE, - REDIRECT_CONTENT) -from wiki.parser import wiki_to_html -from wiki.tests import document, revision, doc_rev, translated_revision +from kitsune.products.tests import product +from kitsune.sumo import ProgrammingError +from kitsune.sumo.tests import TestCase +from kitsune.sumo.urlresolvers import reverse +from kitsune.topics.tests import topic +from kitsune.wiki.config import ( + REDIRECT_SLUG, REDIRECT_TITLE, REDIRECT_HTML, MAJOR_SIGNIFICANCE, + CATEGORIES, TYPO_SIGNIFICANCE, REDIRECT_CONTENT) +from kitsune.wiki.models import Document +from kitsune.wiki.parser import wiki_to_html +from kitsune.wiki.tests import ( + document, revision, doc_rev, translated_revision) def _objects_eq(manager, list_): diff --git a/apps/wiki/tests/test_notifications.py b/kitsune/wiki/tests/test_notifications.py similarity index 94% rename from apps/wiki/tests/test_notifications.py rename to kitsune/wiki/tests/test_notifications.py index 2a7171c2d89..fb4a7eeb1c9 100644 --- a/apps/wiki/tests/test_notifications.py +++ b/kitsune/wiki/tests/test_notifications.py @@ -3,12 +3,14 @@ from nose.tools import eq_ -from sumo.tests import post -from users.tests import add_permission, user -from wiki.config import SIGNIFICANCES, MEDIUM_SIGNIFICANCE, TYPO_SIGNIFICANCE -from wiki.events import ReadyRevisionEvent, ApproveRevisionInLocaleEvent -from wiki.models import Revision -from wiki.tests import revision, TestCaseBase +from kitsune.sumo.tests import post +from kitsune.users.tests import add_permission, user +from kitsune.wiki.config import ( + SIGNIFICANCES, MEDIUM_SIGNIFICANCE, TYPO_SIGNIFICANCE) +from kitsune.wiki.events import ( + ReadyRevisionEvent, ApproveRevisionInLocaleEvent) +from kitsune.wiki.models import Revision +from kitsune.wiki.tests import revision, TestCaseBase def _assert_ready_mail(mail): diff --git a/apps/wiki/tests/test_parser.py b/kitsune/wiki/tests/test_parser.py similarity index 98% rename from apps/wiki/tests/test_parser.py rename to kitsune/wiki/tests/test_parser.py index a9d3b39c61a..2df5ec00326 100644 --- a/apps/wiki/tests/test_parser.py +++ b/kitsune/wiki/tests/test_parser.py @@ -3,20 +3,20 @@ from nose.tools import eq_ from pyquery import PyQuery as pq -from gallery.models import Video -from gallery.tests import image, video -from sumo.tests import TestCase -import sumo.tests.test_parser -from wiki.models import Document -from wiki.parser import (WikiParser, ForParser, PATTERNS, RECURSION_MESSAGE, - _build_template_params as _btp, - _format_template_content as _ftc, _key_split) -from wiki.tests import document, revision +import kitsune.sumo.tests.test_parser +from kitsune.gallery.models import Video +from kitsune.gallery.tests import image, video +from kitsune.sumo.tests import TestCase +from kitsune.wiki.models import Document +from kitsune.wiki.parser import ( + WikiParser, ForParser, PATTERNS, RECURSION_MESSAGE, _key_split, + _build_template_params as _btp, _format_template_content as _ftc) +from kitsune.wiki.tests import document, revision def doc_rev_parser(*args, **kwargs): - return sumo.tests.test_parser.doc_rev_parser(*args, parser_cls=WikiParser, - **kwargs) + return kitsune.sumo.tests.test_parser.doc_rev_parser( + *args, parser_cls=WikiParser, **kwargs) def doc_parse_markup(content, markup, title='Template:test'): diff --git a/apps/wiki/tests/test_tasks.py b/kitsune/wiki/tests/test_tasks.py similarity index 94% rename from apps/wiki/tests/test_tasks.py rename to kitsune/wiki/tests/test_tasks.py index 41c67a4f429..f16ebeebde0 100644 --- a/apps/wiki/tests/test_tasks.py +++ b/kitsune/wiki/tests/test_tasks.py @@ -8,16 +8,17 @@ import celery.conf import mock +import waffle from nose.tools import eq_ from test_utils import RequestFactory -import waffle -from sumo.tests import TestCase -from users.tests import add_permission, user -from wiki.models import Revision -from wiki.tasks import (send_reviewed_notification, rebuild_kb, - schedule_rebuild_kb, _rebuild_kb_chunk) -from wiki.tests import TestCaseBase, revision +from kitsune.sumo.tests import TestCase +from kitsune.users.tests import add_permission, user +from kitsune.wiki.models import Revision +from kitsune.wiki.tasks import ( + send_reviewed_notification, rebuild_kb, schedule_rebuild_kb, + _rebuild_kb_chunk) +from kitsune.wiki.tests import TestCaseBase, revision REVIEWED_EMAIL_CONTENT = """Your revision has been reviewed. diff --git a/apps/wiki/tests/test_templates.py b/kitsune/wiki/tests/test_templates.py similarity index 99% rename from apps/wiki/tests/test_templates.py rename to kitsune/wiki/tests/test_templates.py index 7b00fcc4e82..4f2b1ac82bd 100644 --- a/apps/wiki/tests/test_templates.py +++ b/kitsune/wiki/tests/test_templates.py @@ -15,24 +15,26 @@ from pyquery import PyQuery as pq from wikimarkup.parser import ALLOWED_TAGS, ALLOWED_ATTRIBUTES -from products.tests import product -from questions.tests import question, answer, answervote -from search.tests.test_es import ElasticTestCase -from sumo.helpers import urlparams -from sumo.tests import post, get, attrs_eq, MobileTestCase -from sumo.urlresolvers import reverse -from topics.tests import topic -from users.tests import user, add_permission -from wiki.events import (EditDocumentEvent, ReadyRevisionEvent, - ReviewableRevisionInLocaleEvent, - ApproveRevisionInLocaleEvent) -from wiki.models import Document, Revision, HelpfulVote, HelpfulVoteMetadata -from wiki.config import (SIGNIFICANCES, MEDIUM_SIGNIFICANCE, - ADMINISTRATION_CATEGORY, TROUBLESHOOTING_CATEGORY, - TEMPLATES_CATEGORY, CATEGORIES) -from wiki.tasks import send_reviewed_notification -from wiki.tests import (TestCaseBase, document, revision, new_document_data, - translated_revision, locale) +from kitsune.products.tests import product +from kitsune.questions.tests import question, answer, answervote +from kitsune.search.tests.test_es import ElasticTestCase +from kitsune.sumo.helpers import urlparams +from kitsune.sumo.tests import post, get, attrs_eq, MobileTestCase +from kitsune.sumo.urlresolvers import reverse +from kitsune.topics.tests import topic +from kitsune.users.tests import user, add_permission +from kitsune.wiki.events import ( + EditDocumentEvent, ReadyRevisionEvent, ReviewableRevisionInLocaleEvent, + ApproveRevisionInLocaleEvent) +from kitsune.wiki.models import ( + Document, Revision, HelpfulVote, HelpfulVoteMetadata) +from kitsune.wiki.config import ( + SIGNIFICANCES, MEDIUM_SIGNIFICANCE, ADMINISTRATION_CATEGORY, + TROUBLESHOOTING_CATEGORY, TEMPLATES_CATEGORY, CATEGORIES) +from kitsune.wiki.tasks import send_reviewed_notification +from kitsune.wiki.tests import ( + TestCaseBase, document, revision, new_document_data, translated_revision, + locale) READY_FOR_REVIEW_EMAIL_CONTENT = ( diff --git a/apps/wiki/tests/test_views.py b/kitsune/wiki/tests/test_views.py similarity index 96% rename from apps/wiki/tests/test_views.py rename to kitsune/wiki/tests/test_views.py index 777a0d30157..3b8e9473529 100644 --- a/apps/wiki/tests/test_views.py +++ b/kitsune/wiki/tests/test_views.py @@ -8,22 +8,21 @@ from nose import SkipTest from pyquery import PyQuery as pq -from products.tests import product -from sumo.tests import TestCase, LocalizingClient -from sumo.urlresolvers import reverse -from users.tests import user, add_permission - -from sumo.redis_utils import redis_client, RedisError -from wiki.config import (VersionMetadata, TEMPLATES_CATEGORY, - TYPO_SIGNIFICANCE, MEDIUM_SIGNIFICANCE, - MAJOR_SIGNIFICANCE) -from wiki.models import Document, HelpfulVoteMetadata, HelpfulVote -from wiki.showfor import _version_groups -from wiki.tests import (doc_rev, document, helpful_vote, new_document_data, - revision, translated_revision) - -from wiki.views import (_document_lock_check, _document_lock_clear, - _document_lock_steal) +from kitsune.products.tests import product +from kitsune.sumo.tests import TestCase, LocalizingClient +from kitsune.sumo.urlresolvers import reverse +from kitsune.sumo.redis_utils import redis_client, RedisError +from kitsune.users.tests import user, add_permission +from kitsune.wiki.config import ( + VersionMetadata, TEMPLATES_CATEGORY, TYPO_SIGNIFICANCE, + MEDIUM_SIGNIFICANCE, MAJOR_SIGNIFICANCE) +from kitsune.wiki.models import Document, HelpfulVoteMetadata, HelpfulVote +from kitsune.wiki.showfor import _version_groups +from kitsune.wiki.tests import ( + doc_rev, document, helpful_vote, new_document_data, revision, + translated_revision) +from kitsune.wiki.views import ( + _document_lock_check, _document_lock_clear, _document_lock_steal) class VersionGroupTests(TestCase): diff --git a/apps/wiki/topic_strings.py b/kitsune/wiki/topic_strings.py similarity index 100% rename from apps/wiki/topic_strings.py rename to kitsune/wiki/topic_strings.py diff --git a/apps/wiki/urls.py b/kitsune/wiki/urls.py similarity index 92% rename from apps/wiki/urls.py rename to kitsune/wiki/urls.py index d69882d06b8..12cf934ecc4 100644 --- a/apps/wiki/urls.py +++ b/kitsune/wiki/urls.py @@ -1,12 +1,12 @@ from django.conf.urls import patterns, url, include -from sumo.views import redirect_to -from wiki import locale_views -from wiki.locale_views import LEADER, REVIEWER, EDITOR +from kitsune.sumo.views import redirect_to +from kitsune.wiki import locale_views +from kitsune.wiki.locale_views import LEADER, REVIEWER, EDITOR # These patterns inherit (?P[^\/]). -document_patterns = patterns('wiki.views', +document_patterns = patterns('kitsune.wiki.views', url(r'^$', 'document', name='wiki.document'), url(r'^/revision/(?P\d+)$', 'revision', name='wiki.revision'), @@ -38,7 +38,7 @@ name="wiki.get_helpful_votes_async"), # KB discussion forums - (r'^/discuss', include('kbforums.urls')), + (r'^/discuss', include('kitsune.kbforums.urls')), # Delete a revision url(r'^/revision/(?P\d+)/delete$', 'delete_revision', @@ -57,7 +57,7 @@ url(r'^/steal_lock$', 'steal_lock', name='wiki.steal_lock'), ) -locale_patterns = patterns('wiki.locale_views', +locale_patterns = patterns('kitsune.wiki.locale_views', url(r'^$', 'locale_details', name='wiki.locale_details'), url(r'/add-leader$', 'add_to_locale', {'role': LEADER}, name='wiki.add_locale_leader'), @@ -73,7 +73,7 @@ {'role': EDITOR}, name='wiki.remove_locale_editor'), ) -urlpatterns = patterns('wiki.views', +urlpatterns = patterns('kitsune.wiki.views', url(r'^$', redirect_to, {'url': 'products.product', 'slug': 'firefox'}, name='wiki.landing'), @@ -114,7 +114,7 @@ (r'^/(?P[^/]+)', include(document_patterns)), ) -urlpatterns += patterns('kbforums.views', +urlpatterns += patterns('kitsune.kbforums.views', # All kb discussions by locale. url(r'^/all/discussions$', 'locale_discussions', name='wiki.locale_discussions'), diff --git a/apps/wiki/views.py b/kitsune/wiki/views.py similarity index 97% rename from apps/wiki/views.py rename to kitsune/wiki/views.py index 2eb5baa8a38..9355fe56905 100644 --- a/apps/wiki/views.py +++ b/kitsune/wiki/views.py @@ -23,26 +23,29 @@ from tower import ugettext_lazy as _lazy from tower import ugettext as _ -from access.decorators import login_required -from products.models import Product -from sumo.helpers import urlparams -from sumo.redis_utils import redis_client, RedisError -from sumo.urlresolvers import reverse -from sumo.utils import (paginate, smart_int, get_next_url, user_or_ip, +from kitsune.access.decorators import login_required +from kitsune.products.models import Product +from kitsune.sumo.helpers import urlparams +from kitsune.sumo.redis_utils import redis_client, RedisError +from kitsune.sumo.urlresolvers import reverse +from kitsune.sumo.utils import (paginate, smart_int, get_next_url, user_or_ip, truncated_json_dumps) -from topics.models import Topic -from wiki import DOCUMENTS_PER_PAGE -from wiki.events import (EditDocumentEvent, ReviewableRevisionInLocaleEvent, - ApproveRevisionInLocaleEvent, ApprovedOrReadyUnion, - ReadyRevisionEvent) -from wiki.forms import (AddContributorForm, DocumentForm, RevisionForm, - RevisionFilterForm, ReviewForm) -from wiki.models import Document, Revision, HelpfulVote, ImportantDate -from wiki.config import CATEGORIES, TEMPLATES_CATEGORY -from wiki.parser import wiki_to_html -from wiki.showfor import showfor_data -from wiki.tasks import (send_reviewed_notification, schedule_rebuild_kb, - send_contributor_notification) +from kitsune.topics.models import Topic +from kitsune.wiki import DOCUMENTS_PER_PAGE +from kitsune.wiki.config import CATEGORIES, TEMPLATES_CATEGORY +from kitsune.wiki.events import ( + EditDocumentEvent, ReviewableRevisionInLocaleEvent, + ApproveRevisionInLocaleEvent, ApprovedOrReadyUnion, + ReadyRevisionEvent) +from kitsune.wiki.forms import ( + AddContributorForm, DocumentForm, RevisionForm, RevisionFilterForm, + ReviewForm) +from kitsune.wiki.models import Document, Revision, HelpfulVote, ImportantDate +from kitsune.wiki.parser import wiki_to_html +from kitsune.wiki.showfor import showfor_data +from kitsune.wiki.tasks import ( + send_reviewed_notification, schedule_rebuild_kb, + send_contributor_notification) log = logging.getLogger('k.wiki') diff --git a/apps/wiki/widgets.py b/kitsune/wiki/widgets.py similarity index 96% rename from apps/wiki/widgets.py rename to kitsune/wiki/widgets.py index 0f9a46728fc..ac97fb55f48 100644 --- a/apps/wiki/widgets.py +++ b/kitsune/wiki/widgets.py @@ -7,8 +7,8 @@ import jingo from test_utils import RequestFactory -from topics.models import Topic -from wiki.config import SIGNIFICANCES_HELP +from kitsune.topics.models import Topic +from kitsune.wiki.config import SIGNIFICANCES_HELP class TopicsAndSubtopicsWidget(forms.widgets.SelectMultiple): diff --git a/manage.py b/manage.py index 532ef663547..82bc0eb1706 100755 --- a/manage.py +++ b/manage.py @@ -9,8 +9,6 @@ prev_sys_path = list(sys.path) -site.addsitedir(path('apps')) -site.addsitedir(path('lib')) site.addsitedir(path('vendor')) # Move the new items to the front of sys.path. diff --git a/migrations/159-topics-migration.py b/migrations/159-topics-migration.py index 10f3f044572..a783cd6dba3 100644 --- a/migrations/159-topics-migration.py +++ b/migrations/159-topics-migration.py @@ -1,8 +1,8 @@ from django.utils.encoding import smart_str -from taggit.models import Tag -from topics.models import Topic -from wiki.models import Document +from kitsune.taggit.models import Tag +from kitsune.topics.models import Topic +from kitsune.wiki.models import Document tags_to_migrate = { # '': '', diff --git a/migrations/160-products-migration.py b/migrations/160-products-migration.py index 1654be7ca98..437dec5e9d8 100644 --- a/migrations/160-products-migration.py +++ b/migrations/160-products-migration.py @@ -1,8 +1,8 @@ from django.utils.encoding import smart_str -from products.models import Product -from taggit.models import Tag -from wiki.models import Document +from kitsune.products.models import Product +from kitsune.taggit.models import Tag +from kitsune.wiki.models import Document tags_to_migrate = { # source tag -> product diff --git a/migrations/172-sv-migration.py b/migrations/172-sv-migration.py index 73e0abcf1ed..465b09ae4d1 100644 --- a/migrations/172-sv-migration.py +++ b/migrations/172-sv-migration.py @@ -1,6 +1,6 @@ -from gallery.models import Image, Video -from users.models import Profile -from wiki.models import Document +from kitsune.gallery.models import Image, Video +from kitsune.users.models import Profile +from kitsune.wiki.models import Document def run(): diff --git a/migrations/174-remove-tags-from-documents.py b/migrations/174-remove-tags-from-documents.py index 9876ce70165..ee39470c55a 100644 --- a/migrations/174-remove-tags-from-documents.py +++ b/migrations/174-remove-tags-from-documents.py @@ -2,7 +2,7 @@ from taggit.models import TaggedItem -from wiki.models import Document +from kitsune.wiki.models import Document def run(): diff --git a/migrations/192-remove-old-aoa-stats.py b/migrations/192-remove-old-aoa-stats.py index 1c446903979..4821bf15df0 100644 --- a/migrations/192-remove-old-aoa-stats.py +++ b/migrations/192-remove-old-aoa-stats.py @@ -1,7 +1,7 @@ from django.conf import settings -from sumo.redis_utils import redis_client, RedisError -from customercare.cron import get_customercare_stats +from kitsune.customercare.cron import get_customercare_stats +from kitsune.sumo.redis_utils import redis_client, RedisError try: print "Removing old data" diff --git a/migrations/194-questions-product-migration.py b/migrations/194-questions-product-migration.py index 7b95f4cabbd..dd597967e5e 100644 --- a/migrations/194-questions-product-migration.py +++ b/migrations/194-questions-product-migration.py @@ -1,8 +1,8 @@ from django.utils.encoding import smart_str -from products.models import Product -from taggit.models import Tag -from questions.models import Question +from kitsune.products.models import Product +from kitsune.taggit.models import Tag +from kitsune.questions.models import Question tags_to_migrate = { # source tag -> product diff --git a/migrations/203-fix-serbian-locale-codes.py b/migrations/203-fix-serbian-locale-codes.py index 434fd1b9310..11a3033fe51 100644 --- a/migrations/203-fix-serbian-locale-codes.py +++ b/migrations/203-fix-serbian-locale-codes.py @@ -1,6 +1,6 @@ -from gallery.models import Image, Video -from users.models import Profile -from wiki.models import Document, Locale +from kitsune.gallery.models import Image, Video +from kitsune.users.models import Profile +from kitsune.wiki.models import Document, Locale def run(): diff --git a/migrations/211-recategorize-canned-responses.py b/migrations/211-recategorize-canned-responses.py index 399f29c552e..5883c176f04 100644 --- a/migrations/211-recategorize-canned-responses.py +++ b/migrations/211-recategorize-canned-responses.py @@ -7,8 +7,8 @@ from django.conf import settings from django.db.models import Q -from wiki.models import Document -from wiki.config import CANNED_RESPONSES_CATEGORY +from kitsune.wiki.models import Document +from kitsune.wiki.config import CANNED_RESPONSES_CATEGORY canned = Q(slug__startswith='forum-response-') canned |= Q(slug='common-forum-responses') diff --git a/wsgi/kitsune.wsgi b/wsgi/kitsune.wsgi index 5e5b9b5bd83..2aea3c91479 100644 --- a/wsgi/kitsune.wsgi +++ b/wsgi/kitsune.wsgi @@ -26,7 +26,7 @@ site.addsitedir(os.path.abspath(os.path.join(wsgidir, '../'))) # For django-celery os.environ['CELERY_LOADER'] = 'django' -# manage adds /apps, /lib, and /vendor to the Python path. +# manage /vendor to the Python path. import manage import django.conf