This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

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.
Release History

Release History

0.2.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
dj_termsearch-0.2.0-py2.py3-none-any.whl (4.5 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Jun 27, 2014
dj-termsearch-0.2.0.tar.gz (5.4 kB) Copy SHA256 Checksum SHA256 Source Jun 23, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting