shoop.front.apps.simple_search package

Submodules

shoop.front.apps.simple_search.template_helpers module

class shoop.front.apps.simple_search.template_helpers.TemplateHelpers[source]

Bases: object

name = 'simple_search'
get_search_form(context, template_name='shoop/simple_search/search_form.jinja')[source]

Get a product search form, usable e.g. for navigation bars. The q request parameter is used by default to pre-fill the search query field. The name of the template rendered can be overridden with the template_name parameter.

Parameters:
  • context (jinja2.runtime.Context) – Template context
  • template_name (str) – Template file name

shoop.front.apps.simple_search.urls module

shoop.front.apps.simple_search.views module

shoop.front.apps.simple_search.views.get_search_product_ids(request, query)[source]
class shoop.front.apps.simple_search.views.SearchForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False)[source]

Bases: django.forms.forms.Form

clean()[source]
base_fields = OrderedDict([('q', <django.forms.fields.CharField object at 0x7f5304c45278>), ('sort', <django.forms.fields.CharField object at 0x7f5304c56518>)])
declared_fields = OrderedDict([('q', <django.forms.fields.CharField object at 0x7f5304c45278>), ('sort', <django.forms.fields.CharField object at 0x7f5304c56518>)])
media
class shoop.front.apps.simple_search.views.SearchView(**kwargs)[source]

Bases: django.views.generic.list.ListView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

form_class

alias of SearchForm

template_name = 'shoop/simple_search/search.jinja'
model

alias of Product

context_object_name = 'products'
dispatch(request, *args, **kwargs)[source]
get_queryset()[source]
get_context_data(**kwargs)[source]