Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 0 additions & 7 deletions apps/groups/tests/__init__.py

This file was deleted.

1 change: 0 additions & 1 deletion apps/sumo/static/js/libs/ace
Submodule ace deleted from 6149ca
2 changes: 1 addition & 1 deletion docs/localization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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).


Expand Down
4 changes: 2 additions & 2 deletions docs/searchchapter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ Kitsune uses `elasticutils <https://github.com/mozilla/elasticutils>`_
and `pyelasticsearch
<http://pyelasticsearch.readthedocs.org/en/latest/>`_.

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``.
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion docs/sop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions apps/access/decorators.py → kitsune/access/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion apps/access/helpers.py → kitsune/access/helpers.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import jinja2
from jingo import register

import access
from kitsune import access


@register.function
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion apps/activity/models.py → kitsune/activity/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django.contrib import admin

from announcements.models import Announcement
from kitsune.announcements.models import Announcement


class AnnouncementAdmin(admin.ModelAdmin):
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
@@ -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<announcement_id>\d+)/delete$', 'delete',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
8 changes: 4 additions & 4 deletions apps/customercare/cron.py → kitsune/customercare/cron.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = """
Expand Down Expand Up @@ -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,
Expand Down
Loading