Skip to content

Commit

Permalink
Renamed wagtail.wagtailsearch to wagtail.search
Browse files Browse the repository at this point in the history
Conflicts:
	docs/advanced_topics/settings.rst
	docs/getting_started/integrating_into_django.rst
	docs/getting_started/tutorial.rst
	docs/topics/pages.rst
	docs/topics/search/searching.rst
	tox.ini
	wagtail/admin/tests/test_pages_views.py
	wagtail/admin/views/mixins.py
	wagtail/api/v2/filters.py
	wagtail/contrib/wagtailsearchpromotions/forms.py
	wagtail/contrib/wagtailsearchpromotions/views.py
	wagtail/documents/models.py
	wagtail/documents/views/chooser.py
	wagtail/documents/views/documents.py
	wagtail/documents/views/multiple.py
	wagtail/images/migrations/0001_initial.py
	wagtail/images/models.py
	wagtail/images/views/chooser.py
	wagtail/images/views/images.py
	wagtail/images/views/multiple.py
	wagtail/project_template/project_name/settings/base.py
	wagtail/project_template/search/views.py
	wagtail/search/tests/test_frontend.py
	wagtail/search/tests/test_index_functions.py
	wagtail/search/views/frontend.py
	wagtail/search/views/queries.py
	wagtail/search/wagtail_hooks.py
	wagtail/tests/demosite/models.py
	wagtail/tests/modeladmintest/models.py
	wagtail/tests/non_root_urls.py
	wagtail/tests/settings.py
	wagtail/tests/snippets/models.py
	wagtail/tests/testapp/migrations/0001_initial.py
	wagtail/tests/testapp/migrations/0020_customdocument.py
	wagtail/tests/testapp/models.py
	wagtail/tests/urls.py
	wagtail/wagtailsnippets/views/chooser.py
	wagtail/wagtailsnippets/views/snippets.py
  • Loading branch information
kaedroho authored and gasman committed Nov 26, 2017
1 parent bf0f3e0 commit 19730be
Show file tree
Hide file tree
Showing 180 changed files with 154 additions and 154 deletions.
4 changes: 2 additions & 2 deletions .tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ source_lang = en
type = PO

[wagtail.wagtailsearch]
file_filter = wagtail/wagtailsearch/locale/<lang>/LC_MESSAGES/django.po
source_file = wagtail/wagtailsearch/locale/en/LC_MESSAGES/django.po
file_filter = wagtail/search/locale/<lang>/LC_MESSAGES/django.po
source_file = wagtail/search/locale/en/LC_MESSAGES/django.po
source_lang = en
type = PO

Expand Down
12 changes: 6 additions & 6 deletions docs/advanced_topics/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Apps (``settings.py``)
'wagtail.wagtailsnippets',
'wagtail.documents',
'wagtail.images',
'wagtail.wagtailsearch',
'wagtail.search',
'wagtail.admin',
'wagtail.core',
Expand Down Expand Up @@ -179,7 +179,7 @@ Search
WAGTAILSEARCH_BACKENDS = {
'default': {
'BACKEND': 'wagtail.wagtailsearch.backends.elasticsearch2',
'BACKEND': 'wagtail.search.backends.elasticsearch2',
'INDEX': 'myapp'
}
}
Expand Down Expand Up @@ -450,7 +450,7 @@ URL Patterns
from wagtail.core import urls as wagtail_urls
from wagtail.admin import urls as wagtailadmin_urls
from wagtail.documents import urls as wagtaildocs_urls
from wagtail.wagtailsearch import urls as wagtailsearch_urls
from wagtail.search import urls as wagtailsearch_urls
urlpatterns = [
url(r'^django-admin/', include(admin.site.urls)),
Expand Down Expand Up @@ -510,7 +510,7 @@ These two files should reside in your project directory (``myproject/myproject/`
'wagtail.wagtailsnippets',
'wagtail.documents',
'wagtail.images',
'wagtail.wagtailsearch',
'wagtail.search',
'wagtail.admin',
'wagtail.core',
Expand Down Expand Up @@ -663,7 +663,7 @@ These two files should reside in your project directory (``myproject/myproject/`
# Replace the search backend
#WAGTAILSEARCH_BACKENDS = {
# 'default': {
# 'BACKEND': 'wagtail.wagtailsearch.backends.elasticsearch2',
# 'BACKEND': 'wagtail.search.backends.elasticsearch2',
# 'INDEX': 'myapp'
# }
#}
Expand Down Expand Up @@ -693,7 +693,7 @@ These two files should reside in your project directory (``myproject/myproject/`
from wagtail.core import urls as wagtail_urls
from wagtail.admin import urls as wagtailadmin_urls
from wagtail.documents import urls as wagtaildocs_urls
from wagtail.wagtailsearch import urls as wagtailsearch_urls
from wagtail.search import urls as wagtailsearch_urls
urlpatterns = [
Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started/integrating_into_django.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ In your settings file, add the following apps to ``INSTALLED_APPS``:
'wagtail.wagtailsnippets',
'wagtail.documents',
'wagtail.images',
'wagtail.wagtailsearch',
'wagtail.search',
'wagtail.admin',
'wagtail.core',
Expand Down
6 changes: 3 additions & 3 deletions docs/getting_started/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ Now we need a model and template for our blog posts. In ``blog/models.py``:
from wagtail.core.models import Page
from wagtail.core.fields import RichTextField
from wagtail.admin.edit_handlers import FieldPanel
from wagtail.wagtailsearch import index
from wagtail.search import index
# Keep the definition of BlogIndexPage, and add:
Expand Down Expand Up @@ -413,7 +413,7 @@ Add a new ``BlogPageGalleryImage`` model to ``models.py``:
from wagtail.core.fields import RichTextField
from wagtail.admin.edit_handlers import FieldPanel, InlinePanel
from wagtail.images.edit_handlers import ImageChooserPanel
from wagtail.wagtailsearch import index
from wagtail.search import index
# ... (Keep the definition of BlogIndexPage, and update BlogPage:)
Expand Down Expand Up @@ -576,7 +576,7 @@ First, alter ``models.py`` once more:
from wagtail.core.fields import RichTextField
from wagtail.admin.edit_handlers import FieldPanel, InlinePanel, MultiFieldPanel
from wagtail.images.edit_handlers import ImageChooserPanel
from wagtail.wagtailsearch import index
from wagtail.search import index
# ... (Keep the definition of BlogIndexPage)
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/contrib/searchpromotions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Promoted search results

.. versionchanged:: 1.1

Before Wagtail 1.1, promoted search results were implemented in the :mod:`wagtail.wagtailsearch` core module and called "editors picks".
Before Wagtail 1.1, promoted search results were implemented in the :mod:`wagtail.search` core module and called "editors picks".

The ``searchpromotions`` module provides the models and user interface for managing "Promoted search results" and displaying them in a search results page.

Expand Down
2 changes: 1 addition & 1 deletion docs/topics/pages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This example represents a typical blog post:
from wagtail.core.fields import RichTextField
from wagtail.admin.edit_handlers import FieldPanel, MultiFieldPanel, InlinePanel
from wagtail.images.edit_handlers import ImageChooserPanel
from wagtail.wagtailsearch import index
from wagtail.search import index
class BlogPage(Page):
Expand Down
12 changes: 6 additions & 6 deletions docs/topics/search/backends.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ You can configure which backend to use with the ``WAGTAILSEARCH_BACKENDS`` setti
WAGTAILSEARCH_BACKENDS = {
'default': {
'BACKEND': 'wagtail.wagtailsearch.backends.db',
'BACKEND': 'wagtail.search.backends.db',
}
}
Expand Down Expand Up @@ -61,7 +61,7 @@ Here's a list of backends that Wagtail supports out of the box.
Database Backend (default)
--------------------------

``wagtail.wagtailsearch.backends.db``
``wagtail.search.backends.db``

The database backend is very basic and is intended only to be used in development and on small sites. It cannot order results by relevance, severely hampering its usefulness when searching a large collection of pages.

Expand Down Expand Up @@ -99,9 +99,9 @@ Elasticsearch Backend

Elasticsearch versions 2 and 5 are supported. Use the appropriate backend for your version:

``wagtail.wagtailsearch.backends.elasticsearch2`` (Elasticsearch 2.x)
``wagtail.search.backends.elasticsearch2`` (Elasticsearch 2.x)

``wagtail.wagtailsearch.backends.elasticsearch5`` (Elasticsearch 5.x)
``wagtail.search.backends.elasticsearch5`` (Elasticsearch 5.x)

Prerequisites are the `Elasticsearch`_ service itself and, via pip, the `elasticsearch-py`_ package. The major version of the package must match the installed version of Elasticsearch:

Expand All @@ -121,7 +121,7 @@ The backend is configured in settings:
WAGTAILSEARCH_BACKENDS = {
'default': {
'BACKEND': 'wagtail.wagtailsearch.backends.elasticsearch2',
'BACKEND': 'wagtail.search.backends.elasticsearch2',
'URLS': ['http://localhost:9200'],
'INDEX': 'wagtail',
'TIMEOUT': 5,
Expand Down Expand Up @@ -177,7 +177,7 @@ The Elasticsearch backend is compatible with `Amazon Elasticsearch Service`_, bu
WAGTAILSEARCH_BACKENDS = {
'default': {
'BACKEND': 'wagtail.wagtailsearch.backends.elasticsearch2',
'BACKEND': 'wagtail.search.backends.elasticsearch2',
'INDEX': 'wagtail',
'TIMEOUT': 5,
'HOSTS': [{
Expand Down
10 changes: 5 additions & 5 deletions docs/topics/search/indexing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Signal handlers

Signal handlers are now automatically registered

``wagtailsearch`` provides some signal handlers which bind to the save/delete signals of all indexed models. This would automatically add and delete them from all backends you have registered in ``WAGTAILSEARCH_BACKENDS``. These signal handlers are automatically registered when the ``wagtail.wagtailsearch`` app is loaded.
``wagtailsearch`` provides some signal handlers which bind to the save/delete signals of all indexed models. This would automatically add and delete them from all backends you have registered in ``WAGTAILSEARCH_BACKENDS``. These signal handlers are automatically registered when the ``wagtail.search`` app is loaded.


The ``update_index`` command
Expand Down Expand Up @@ -67,7 +67,7 @@ This creates an ``EventPage`` model with two fields: ``description`` and ``date`

.. code-block:: python
from wagtail.wagtailsearch import index
from wagtail.search import index
from django.utils import timezone
class EventPage(Page):
Expand Down Expand Up @@ -170,7 +170,7 @@ One use for this is indexing the ``get_*_display`` methods Django creates automa

.. code-block:: python
from wagtail.wagtailsearch import index
from wagtail.search import index
class EventPage(Page):
IS_PRIVATE_CHOICES = (
Expand Down Expand Up @@ -214,7 +214,7 @@ To do this, inherit from ``index.Indexed`` and add some ``search_fields`` to the

.. code-block:: python
from wagtail.wagtailsearch import index
from wagtail.search import index
class Book(index.Indexed, models.Model):
title = models.CharField(max_length=255)
Expand All @@ -232,7 +232,7 @@ To do this, inherit from ``index.Indexed`` and add some ``search_fields`` to the
]
# As this model doesn't have a search method in its QuerySet, we have to call search directly on the backend
>>> from wagtail.wagtailsearch.backends import get_search_backend
>>> from wagtail.search.backends import get_search_backend
>>> s = get_search_backend()
# Run a search for a book by Roald Dahl
Expand Down
6 changes: 3 additions & 3 deletions docs/topics/search/searching.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Wagtail's document and image models provide a ``search`` method on their QuerySe
.. code-block:: python
>>> from myapp.models import Book
>>> from wagtail.wagtailsearch.backends import get_search_backend
>>> from wagtail.search.backends import get_search_backend
# Search books
>>> s = get_search_backend()
Expand All @@ -74,7 +74,7 @@ You can also pass a QuerySet into the ``search`` method which allows you to add
.. code-block:: python
>>> from myapp.models import Book
>>> from wagtail.wagtailsearch.backends import get_search_backend
>>> from wagtail.search.backends import get_search_backend
# Search books
>>> s = get_search_backend()
Expand Down Expand Up @@ -207,7 +207,7 @@ Here's an example Django view that could be used to add a "search" page to your
from django.shortcuts import render
from wagtail.core.models import Page
from wagtail.wagtailsearch.models import Query
from wagtail.search.models import Query
def search(request):
Expand Down
4 changes: 2 additions & 2 deletions docs/topics/snippets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,13 @@ These child objects are now accessible through the page's ``advert_placements``
Making Snippets Searchable
--------------------------

If a snippet model inherits from ``wagtail.wagtailsearch.index.Indexed``, as described in :ref:`wagtailsearch_indexing_models`, Wagtail will automatically add a search box to the chooser interface for that snippet type. For example, the ``Advert`` snippet could be made searchable as follows:
If a snippet model inherits from ``wagtail.search.index.Indexed``, as described in :ref:`wagtailsearch_indexing_models`, Wagtail will automatically add a search box to the chooser interface for that snippet type. For example, the ``Advert`` snippet could be made searchable as follows:

.. code-block:: python
...
from wagtail.wagtailsearch import index
from wagtail.search import index
...
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ ignore = D100,D101,D102,D103,D105,D200,D202,D204,D205,D209,D400,D401,E303,E501,N
[testenv]
install_command = pip install -e ".[testing]" -U {opts} {packages}
commands =
elasticsearch2: coverage run runtests.py wagtail.wagtailsearch wagtail.documents wagtail.images --elasticsearch2
elasticsearch5: coverage run runtests.py wagtail.wagtailsearch wagtail.documents wagtail.images --elasticsearch5
elasticsearch2: coverage run runtests.py wagtail.search wagtail.documents wagtail.images --elasticsearch2
elasticsearch5: coverage run runtests.py wagtail.search wagtail.documents wagtail.images --elasticsearch5
noelasticsearch: coverage run runtests.py

basepython =
Expand Down
2 changes: 1 addition & 1 deletion wagtail/admin/tests/test_pages_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from wagtail.admin.views.pages import PreviewOnEdit
from wagtail.core.models import GroupPagePermission, Page, PageRevision, Site
from wagtail.core.signals import page_published, page_unpublished
from wagtail.wagtailsearch.index import SearchField
from wagtail.search.index import SearchField
from wagtail.wagtailusers.models import UserProfile


Expand Down
4 changes: 2 additions & 2 deletions wagtail/admin/views/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from django.utils.translation import ugettext as _

from wagtail.admin.forms import SearchForm
from wagtail.wagtailsearch.backends import get_search_backend
from wagtail.wagtailsearch.index import class_is_indexed
from wagtail.search.backends import get_search_backend
from wagtail.search.index import class_is_indexed


class SearchableListMixin(object):
Expand Down
2 changes: 1 addition & 1 deletion wagtail/api/v2/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from wagtail.core import hooks
from wagtail.core.models import Page
from wagtail.wagtailsearch.backends import get_search_backend
from wagtail.search.backends import get_search_backend

from .utils import BadRequestError, pages_for_site, parse_boolean

Expand Down
4 changes: 2 additions & 2 deletions wagtail/contrib/postgres_search/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
from django.db.models.functions import Cast
from django.utils.encoding import force_text

from wagtail.wagtailsearch.backends.base import (
from wagtail.search.backends.base import (
BaseSearchBackend, BaseSearchQuery, BaseSearchResults)
from wagtail.wagtailsearch.index import RelatedFields, SearchField
from wagtail.search.index import RelatedFields, SearchField

from .models import IndexEntry
from .utils import (
Expand Down
2 changes: 1 addition & 1 deletion wagtail/contrib/postgres_search/tests/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from django.test import TestCase

from wagtail.wagtailsearch.tests.test_backends import BackendTests
from wagtail.search.tests.test_backends import BackendTests

from ..utils import BOOSTS_WEIGHTS, WEIGHTS_VALUES, determine_boosts_weights, get_weight

Expand Down
2 changes: 1 addition & 1 deletion wagtail/contrib/postgres_search/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from django.apps import apps
from django.db import connections

from wagtail.wagtailsearch.index import Indexed, RelatedFields, SearchField
from wagtail.search.index import Indexed, RelatedFields, SearchField

try:
# Only use the GPLv2 licensed unidecode if it's installed.
Expand Down
2 changes: 1 addition & 1 deletion wagtail/contrib/wagtailsearchpromotions/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from wagtail.contrib.wagtailsearchpromotions.models import SearchPromotion
from wagtail.admin.widgets import AdminPageChooser
from wagtail.wagtailsearch.models import Query
from wagtail.search.models import Query


class SearchPromotionForm(forms.ModelForm):
Expand Down
2 changes: 1 addition & 1 deletion wagtail/contrib/wagtailsearchpromotions/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.db import models
from django.utils.translation import ugettext_lazy as _

from wagtail.wagtailsearch.models import Query
from wagtail.search.models import Query


class SearchPromotion(models.Model):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django import template

from wagtail.contrib.wagtailsearchpromotions.models import SearchPromotion
from wagtail.wagtailsearch.models import Query
from wagtail.search.models import Query

register = template.Library()

Expand Down
2 changes: 1 addition & 1 deletion wagtail/contrib/wagtailsearchpromotions/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from wagtail.contrib.wagtailsearchpromotions.templatetags.wagtailsearchpromotions_tags import \
get_search_promotions
from wagtail.tests.utils import WagtailTestUtils
from wagtail.wagtailsearch.models import Query
from wagtail.search.models import Query


class TestSearchPromotions(TestCase):
Expand Down
4 changes: 2 additions & 2 deletions wagtail/contrib/wagtailsearchpromotions/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from wagtail.admin import messages
from wagtail.admin.forms import SearchForm
from wagtail.admin.utils import any_permission_required, permission_required
from wagtail.wagtailsearch import forms as search_forms
from wagtail.wagtailsearch.models import Query
from wagtail.search import forms as search_forms
from wagtail.search.models import Query


@any_permission_required(
Expand Down
4 changes: 2 additions & 2 deletions wagtail/core/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from django.conf import settings
from django.db import migrations, models

import wagtail.wagtailsearch.index
import wagtail.search.index


def set_page_path_collation(apps, schema_editor):
Expand Down Expand Up @@ -96,7 +96,7 @@ class Migration(migrations.Migration):
options={
'abstract': False,
},
bases=(wagtail.wagtailsearch.index.Indexed, models.Model),
bases=(wagtail.search.index.Indexed, models.Model),
),
migrations.RunPython(
set_page_path_collation, migrations.RunPython.noop
Expand Down
Loading

0 comments on commit 19730be

Please sign in to comment.