Giter Site home page Giter Site logo

django-haystack-elasticsearch's Introduction

Django Haystack + Elasticsearch + Autocomplete + Faceting Tutorial

Code accompanying Django Haystack + Elasticsearch + Autocomplete + Faceting Demo

Django Haystack + Elasticsearch + Autocomplete + Faceting Tutorial

Installation

  1. Download and Unzip the files

  2. Install Elasticsearch and start the server.

  3. create a virtualenv

    virtualenv venv

  4. Install dependencies

    pip install -r requirements.txt

  5. Run following Django commands:

    python manage.py makemigrations python manage.py migrate python manage.py rebuild_index python manage.py runserver

  6. Visit home page 127.0.0.1:8000 and try out some searches.

django-haystack-elasticsearch's People

Contributors

bhaskar-c avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

django-haystack-elasticsearch's Issues

Nothing shows in the dropdown

I tried your code but when I search for the product nothing is shown in the dropdown. I know the selction-ajax div is not filled with the result but in console, I see nothing. How do I show the product when typing the product name?

TypeError: __init__() missing 1 required positional argument: 'on_delete'

Got this error

python manage.py makemigrations

Traceback (most recent call last):
File "manage.py", line 22, in
execute_from_command_line(sys.argv)
File "d:\ProgramData\Anaconda3\envs\jango\lib\site-packages\django\core\management_init_.py", line 381, in execute_from_command_line
utility.execute()
File "d:\ProgramData\Anaconda3\envs\jango\lib\site-packages\django\core\management_init_.py", line 357, in execute
django.setup()
File "d:\ProgramData\Anaconda3\envs\jango\lib\site-packages\django_init_.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "d:\ProgramData\Anaconda3\envs\jango\lib\site-packages\django\apps\registry.py", line 114, in populate
app_config.import_models()
File "d:\ProgramData\Anaconda3\envs\jango\lib\site-packages\django\apps\config.py", line 211, in import_models
self.models_module = import_module(models_module_name)
File "d:\ProgramData\Anaconda3\envs\jango\lib\importlib_init_.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "C:\Users\Infogen\Desktop\django-haystack-elasticsearch-master\searchDemo\models.py", line 11, in
class Product(models.Model):
File "C:\Users\Infogen\Desktop\django-haystack-elasticsearch-master\searchDemo\models.py", line 16, in Product
category = models.ForeignKey(Category, related_name='category')
TypeError: init() missing 1 required positional argument: 'on_delete'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.