File: urls.py

package info (click to toggle)
django-haystack 3.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,504 kB
  • sloc: python: 23,475; xml: 1,708; sh: 74; makefile: 71
file content (30 lines) | stat: -rw-r--r-- 813 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from django.contrib import admin
from django.urls import include, path

from haystack.forms import FacetedSearchForm
from haystack.query import SearchQuerySet
from haystack.views import FacetedSearchView, SearchView, basic_search

admin.autodiscover()


urlpatterns = [
    path("", SearchView(load_all=False), name="haystack_search"),
    path("admin/", admin.site.urls),
    path("basic/", basic_search, {"load_all": False}, name="haystack_basic_search"),
    path(
        "faceted/",
        FacetedSearchView(
            searchqueryset=SearchQuerySet().facet("author"),
            form_class=FacetedSearchForm,
        ),
        name="haystack_faceted_search",
    ),
]

urlpatterns += [
    path(
        "",
        include(("test_haystack.test_app_without_models.urls", "app-without-models")),
    )
]