old_contents: """councilmatic URL Configuration
  
  The `urlpatterns` list routes URLs to views. For more information please see:
      https://docs.djangoproject.com/en/1.8/topics/http/urls/
  Examples:
  Function views
      1. Add an import:  from my_app import views
      2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
  Class-based views
      1. Add an import:  from other_app.views import Home
      2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
  Including another URLconf
      1. Add an import:  from blog import urls as blog_urls
      2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
  """
  from django.conf.urls import include, url
  from django.contrib import admin
  from haystack.query import SearchQuerySet
  from haystack.views import FacetedSearchView
  from councilmatic_core.views import CouncilmaticSearchForm
  from chicago.views import *
  
  sqs = SearchQuerySet().facet('bill_type')\
                        .facet('sponsorships', sort='index')\
                        .facet('controlling_body')\
                        .facet('inferred_status')\
                        .facet('topics')\
                        .order_by('-last_action_date')
  
  urlpatterns = [
      url(r'^admin/', include(admin.site.urls)),
      url(r'^search/', FacetedSearchView(searchqueryset=sqs, 
                                         form_class=CouncilmaticSearchForm)),
      url(r'^$', ChicagoIndexView.as_view(), name='index'),
      url(r'^about/$', ChicagoAboutView.as_view(), name='about'),
      url(r'^legislation/(?P<slug>.*)/$', ChicagoBillDetailView.as_view(), name='bill_detail'),
      url(r'', include('councilmatic_core.urls')),
  ]
  
new_contents: """councilmatic URL Configuration
  
  The `urlpatterns` list routes URLs to views. For more information please see:
      https://docs.djangoproject.com/en/1.8/topics/http/urls/
  Examples:
  Function views
      1. Add an import:  from my_app import views
      2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
  Class-based views
      1. Add an import:  from other_app.views import Home
      2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
  Including another URLconf
      1. Add an import:  from blog import urls as blog_urls
      2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
  """
  from django.conf.urls import include, url
  from django.contrib import admin
  from haystack.query import SearchQuerySet
  # from haystack.views import FacetedSearchView
  from councilmatic_core.views import CouncilmaticSearchForm, CouncilmaticFacetedSearchView
  from chicago.views import *
  
  sqs = SearchQuerySet().facet('bill_type')\
                        .facet('sponsorships', sort='index')\
                        .facet('controlling_body')\
                        .facet('inferred_status')\
                        .facet('topics')\
                        .order_by('-last_action_date')
  
  urlpatterns = [
      url(r'^admin/', include(admin.site.urls)),
      url(r'^search/', CouncilmaticFacetedSearchView(searchqueryset=sqs, 
                                         form_class=CouncilmaticSearchForm)),
      url(r'^$', ChicagoIndexView.as_view(), name='index'),
      url(r'^about/$', ChicagoAboutView.as_view(), name='about'),
      url(r'^legislation/(?P<slug>.*)/$', ChicagoBillDetailView.as_view(), name='bill_detail'),
      url(r'', include('councilmatic_core.urls')),
  ]
  
subject: use custom faceted search view