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 thetemplate_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¶
-
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
-
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'¶
-
Module contents¶
-
class
shoop.front.apps.simple_search.
SimpleSearchAppConfig
(*args, **kwargs)[source]¶ Bases:
shoop.apps.AppConfig
-
name
= 'shoop.front.apps.simple_search'¶
-
verbose_name
= 'Shoop Frontend - Simple Search'¶
-
label
= 'shoop_front.simple_search'¶
-
provides
= {'front_urls': ['shoop.front.apps.simple_search.urls:urlpatterns'], 'front_template_helper_namespace': ['shoop.front.apps.simple_search.template_helpers:TemplateHelpers']}¶
-