# HG changeset patch # User Harris Baptiste # Date 1470992397 -7200 # Node ID 541dd2ecde0cad0a91c450b2a9fbc4c447eb302b # Parent 201a73fdc0b57a968aef8796bc5c7d1bc39b7d30# Parent ce46bbafb07989d87600d91f6c8f3d9be78b5a20 Merged with image import diff -r ce46bbafb079 -r 541dd2ecde0c src/iconolab/settings/dev.py.tmpl --- a/src/iconolab/settings/dev.py.tmpl Thu Aug 11 17:52:14 2016 +0200 +++ b/src/iconolab/settings/dev.py.tmpl Fri Aug 12 10:59:57 2016 +0200 @@ -118,6 +118,15 @@ } } +# Haystack connection +HAYSTACK_CONNECTIONS = { + 'default': { + 'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine', + 'URL': 'http://127.0.0.1:9200/', + 'INDEX_NAME': 'haystack', + }, +} + CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache', diff -r ce46bbafb079 -r 541dd2ecde0c src/iconolab/templates/search/search.html --- a/src/iconolab/templates/search/search.html Thu Aug 11 17:52:14 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -{% extends 'iconolab_base.html' %} - -{% load thumbnail %} -{% block content %} -

Search

- -
- - {{ form.as_table }} - - - - -
  - -
- - {% if query %} -

Results

- - {% for result in page.object_list %} - - {% thumbnail result.object.image.media "500x500" crop=False as im %} -

- {% endthumbnail %} - - -

- {{ result.object.current_revision.title }} -

- {% empty %} -

No results found.

- {% endfor %} - - {% if page.has_previous or page.has_next %} -
- {% if page.has_previous %}{% endif %}« Previous{% if page.has_previous %}{% endif %} - | - {% if page.has_next %}{% endif %}Next »{% if page.has_next %}{% endif %} -
- {% endif %} - {% else %} - {# Show some example queries to run, maybe query syntax, something else? #} - {% endif %} -
-{% endblock %} \ No newline at end of file