kopia lustrzana https://github.com/wagtail/wagtail
Renamed searchpicks app to searchpromotions
rodzic
facf1fba76
commit
459a8c8b44
|
@ -13,7 +13,7 @@ Wagtail ships with a variety of extra optional modules.
|
|||
frontendcache
|
||||
routablepage
|
||||
api/index
|
||||
searchpicks
|
||||
searchpromotions
|
||||
|
||||
|
||||
:doc:`forms`
|
||||
|
@ -52,7 +52,7 @@ Provides a way of embedding Django URLconfs into pages.
|
|||
A module for adding a read only, JSON based web API to your Wagtail site
|
||||
|
||||
|
||||
:doc:`searchpicks`
|
||||
------------------
|
||||
:doc:`searchpromotions`
|
||||
-----------------------
|
||||
|
||||
A module for managing "Promoted Search Results"
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
Promoted search results
|
||||
=======================
|
||||
|
||||
.. module:: wagtail.contrib.wagtailsearchpicks
|
||||
.. module:: wagtail.contrib.wagtailsearchpromotions
|
||||
|
||||
.. versionchanged:: 1.1
|
||||
|
||||
Before Wagtail 1.1, promoted search results were implemented in the :mod:`wagtail.wagtailsearch` core module and called "editors picks".
|
||||
|
||||
The ``searchpicks`` module provides the models and user interface for managing "Promoted search results" and displaying them in a search results page.
|
||||
The ``searchpromotions`` module provides the models and user interface for managing "Promoted search results" and displaying them in a search results page.
|
||||
|
||||
"Promoted search results" allow editors to explicitly link relevant content to search terms, so results pages can contain curated content in addition to results from the search engine.
|
||||
|
||||
|
@ -18,7 +18,7 @@ The ``searchpicks`` module provides the models and user interface for managing "
|
|||
Installation
|
||||
============
|
||||
|
||||
The ``searchpicks`` module is not enabled by default. To install it, add ``wagtail.contrib.wagtailsearchpicks`` to ``INSTALLED_APPS`` in your project's Django settings file.
|
||||
The ``searchpromotions`` module is not enabled by default. To install it, add ``wagtail.contrib.wagtailsearchpromotions`` to ``INSTALLED_APPS`` in your project's Django settings file.
|
||||
|
||||
|
||||
.. code-block:: python
|
||||
|
@ -26,7 +26,7 @@ The ``searchpicks`` module is not enabled by default. To install it, add ``wagta
|
|||
INSTALLED_APPS = [
|
||||
...
|
||||
|
||||
'wagtail.contrib.wagtailsearchpicks',
|
||||
'wagtail.contrib.wagtailsearchpromotions',
|
||||
]
|
||||
|
||||
This app contains migrations so make sure you run the ``migrate`` django-admin command after installing.
|
||||
|
@ -41,11 +41,11 @@ Once installed, a new menu item called "Promoted search results" should appear i
|
|||
Displaying on a search results page
|
||||
-----------------------------------
|
||||
|
||||
To retrieve a list of promoted search results for a particular search query, you can use the ``{% get_search_promotions %}`` template tag from the ``wagtailsearchpicks_tags`` templatetag library:
|
||||
To retrieve a list of promoted search results for a particular search query, you can use the ``{% get_search_promotions %}`` template tag from the ``wagtailsearchpromotions_tags`` templatetag library:
|
||||
|
||||
.. code-block:: HTML+Django
|
||||
|
||||
{% load wagtailcore_tags wagtailsearchpicks_tags %}
|
||||
{% load wagtailcore_tags wagtailsearchpromotions_tags %}
|
||||
|
||||
...
|
||||
|
|
@ -105,7 +105,7 @@ Promoted search results
|
|||
|
||||
"Promoted search results" allow editors to explicitly link relevant content to search terms, so results pages can contain curated content in addition to results from the search engine.
|
||||
|
||||
This functionality is provided by the :mod:`~wagtail.contrib.wagtailsearchpicks` contrib module.
|
||||
This functionality is provided by the :mod:`~wagtail.contrib.wagtailsearchpromotions` contrib module.
|
||||
|
||||
|
||||
Searching Images, Documents and custom models
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
default_app_config = 'wagtail.contrib.wagtailsearchpicks.apps.WagtailSearchPicksAppConfig'
|
|
@ -1,7 +0,0 @@
|
|||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class WagtailSearchPicksAppConfig(AppConfig):
|
||||
name = 'wagtail.contrib.wagtailsearchpicks'
|
||||
label = 'wagtailsearchpicks'
|
||||
verbose_name = "Wagtail search picks"
|
|
@ -0,0 +1 @@
|
|||
default_app_config = 'wagtail.contrib.wagtailsearchpromotions.apps.WagtailSearchPromotionsAppConfig'
|
|
@ -1,5 +1,5 @@
|
|||
from django.conf.urls import url
|
||||
from wagtail.contrib.wagtailsearchpicks import views
|
||||
from wagtail.contrib.wagtailsearchpromotions import views
|
||||
|
||||
|
||||
urlpatterns = [
|
|
@ -0,0 +1,7 @@
|
|||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class WagtailSearchPromotionsAppConfig(AppConfig):
|
||||
name = 'wagtail.contrib.wagtailsearchpromotions'
|
||||
label = 'wagtailsearchpromotions'
|
||||
verbose_name = "Wagtail search promotions"
|
|
@ -4,7 +4,7 @@ from django.utils.translation import ugettext_lazy as _
|
|||
|
||||
from wagtail.wagtailadmin.widgets import AdminPageChooser
|
||||
from wagtail.wagtailsearch.models import Query
|
||||
from wagtail.contrib.wagtailsearchpicks.models import SearchPromotion
|
||||
from wagtail.contrib.wagtailsearchpromotions.models import SearchPromotion
|
||||
|
||||
|
||||
class SearchPromotionForm(forms.ModelForm):
|
|
@ -3,8 +3,8 @@ from django.core.urlresolvers import reverse
|
|||
|
||||
from wagtail.tests.utils import WagtailTestUtils
|
||||
from wagtail.wagtailsearch.models import Query
|
||||
from wagtail.contrib.wagtailsearchpicks.models import SearchPromotion
|
||||
from wagtail.contrib.wagtailsearchpicks.templatetags.wagtailsearchpicks_tags import get_search_promotions
|
||||
from wagtail.contrib.wagtailsearchpromotions.models import SearchPromotion
|
||||
from wagtail.contrib.wagtailsearchpromotions.templatetags.wagtailsearchpromotions_tags import get_search_promotions
|
||||
|
||||
|
||||
class TestSearchPromotions(TestCase):
|
|
@ -10,7 +10,7 @@ from wagtail.wagtailsearch.models import Query
|
|||
from wagtail.wagtailadmin.forms import SearchForm
|
||||
from wagtail.wagtailadmin import messages
|
||||
|
||||
from wagtail.contrib.wagtailsearchpicks import forms
|
||||
from wagtail.contrib.wagtailsearchpromotions import forms
|
||||
|
||||
|
||||
@vary_on_headers('X-Requested-With')
|
|
@ -3,7 +3,7 @@ from django.conf.urls import include, url
|
|||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from wagtail.wagtailcore import hooks
|
||||
from wagtail.contrib.wagtailsearchpicks import admin_urls
|
||||
from wagtail.contrib.wagtailsearchpromotions import admin_urls
|
||||
|
||||
from wagtail.wagtailadmin.menu import MenuItem
|
||||
|
|
@ -94,7 +94,7 @@ INSTALLED_APPS = (
|
|||
'wagtail.contrib.wagtailroutablepage',
|
||||
'wagtail.contrib.wagtailfrontendcache',
|
||||
'wagtail.contrib.wagtailapi',
|
||||
'wagtail.contrib.wagtailsearchpicks',
|
||||
'wagtail.contrib.wagtailsearchpromotions',
|
||||
'wagtail.wagtailforms',
|
||||
'wagtail.wagtailsearch',
|
||||
'wagtail.wagtailembeds',
|
||||
|
|
Ładowanie…
Reference in New Issue