Metadata-Version: 1.1
Name: dj-termsearch
Version: 0.2.0
Summary: Simple term searches for Django CBV's.
Home-page: https://github.com/Ogreman/django-termsearch
Author: James Cox
Author-email: james.aaron.cox@gmail.com
License: BSD
Description: =============================
        dj-termsearch
        =============================
        
        Simple GET-based term searches for Django CBV's.
        
        Documentation
        -------------
        
        The full documentation is at https://dj-termsearch.readthedocs.org.
        
        Quickstart
        ----------
        
        Install dj-termsearch::
        
            pip install dj-termsearch
        
        Add ``"termsearch"`` to your ``INSTALLED_APPS`` then just add ``TermSearchMixin`` to a view and go::
        
            from django.db import models
            from termsearch.views import TermSearchMixin
        
            class MyModelListView(TermSearchMixin, ListView):
                
                model = MyModel
                term = "title"
                lookup = "iexact"
            
        Check the results at::
            
            https://example.com/list?q=barry
            
            
        Advanced
        --------
        
        Use a ``list`` of model fields to use in the search::
        
            class AnotherListView(TermSearchMixin, ListView):
                
                model = MyModel
                terms = ["title", "content", "author__name"]
                lookup = "iexact"
        
        Map each field to a lookup type::
        
            class YetAnotherListView(TermSearchMixin, ListView):
                
                model = MyModel
                term_mapping = {
                    "title": "icontains",
                    "tags__name": "iexact",
                    "author__surname": "exact",
                }
                
        
        
        
        
        History
        -------
        
        0.2.0 (2014-06-23)
        ++++++++++++++++++
        
        * Added separate search mixins (SingleTermSearchMixin, MultiTermSearchMixin, MapTermSearchMixin).
        * Cleanup of docs.
        
        
        0.1.0 (2014-06-20)
        ++++++++++++++++++
        
        * First release on PyPI.
        
Keywords: django,terms,search
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
