Dropped support for Django 1.6/1.7 and added Django 1.9/1.10 support

This commit is contained in:
Claude Paroz 2016-10-14 16:24:32 +02:00
parent a70c63f846
commit c330906457
5 changed files with 17 additions and 17 deletions

View File

@ -3,24 +3,24 @@ language: python
matrix:
include:
- python: 3.3
env: DJANGO_VERSION=1.6 XAPIAN_VERSION=1.3.3
- python: 3.3
env: DJANGO_VERSION=1.7 XAPIAN_VERSION=1.3.3
- python: 3.3
- python: 3.4
env: DJANGO_VERSION=1.8 XAPIAN_VERSION=1.3.3
- python: 2.7
env: DJANGO_VERSION=1.6 XAPIAN_VERSION=1.3.3
- python: 2.7
env: DJANGO_VERSION=1.7 XAPIAN_VERSION=1.3.3
- python: 3.4
env: DJANGO_VERSION=1.9 XAPIAN_VERSION=1.3.3
- python: 3.4
env: DJANGO_VERSION=1.10 XAPIAN_VERSION=1.3.3
- python: 2.7
env: DJANGO_VERSION=1.8 XAPIAN_VERSION=1.3.3
- python: 2.7
env: DJANGO_VERSION=1.6 XAPIAN_VERSION=1.2.19
env: DJANGO_VERSION=1.9 XAPIAN_VERSION=1.3.3
- python: 2.7
env: DJANGO_VERSION=1.7 XAPIAN_VERSION=1.2.19
env: DJANGO_VERSION=1.10 XAPIAN_VERSION=1.3.3
- python: 2.7
env: DJANGO_VERSION=1.8 XAPIAN_VERSION=1.2.19
- python: 2.7
env: DJANGO_VERSION=1.9 XAPIAN_VERSION=1.2.19
- python: 2.7
env: DJANGO_VERSION=1.10 XAPIAN_VERSION=1.2.19
addons:
apt:

View File

@ -31,14 +31,14 @@ Requirements
------------
- Python 2.7 or 3.3
- Django 1.6+
- Django 1.8+
- Django-Haystack 2
- Xapian 1.2.19+
In particular, we build this backend on `Travis`_ using:
- Python 2.7 and 3.3
- Django 1.6, 1.7 and 1.8
- Django 1.8, 1.9 and 1.10
- Django-Haystack (master)
- Xapian 1.2.19 (in Python 2) and 1.3.3 (in both)

View File

@ -1,2 +1,2 @@
Django>=1.6
Django>=1.8
Django-Haystack>=2

View File

@ -27,7 +27,7 @@ setup(
license='GPL2',
py_modules=['xapian_backend'],
install_requires=[
'django>=1.6',
'django>=1.8',
'django-haystack>=2',
]
)

View File

@ -7,8 +7,8 @@ import xapian
import subprocess
import os
from django.apps import apps
from django.test import TestCase
from django.db.models.loading import get_model
from django.utils.encoding import force_text
from haystack import connections
@ -27,7 +27,7 @@ XAPIAN_VERSION = [int(x) for x in xapian.__version__.split('.')]
class XapianSearchResult(SearchResult):
def __init__(self, app_label, model_name, pk, score, **kwargs):
super(XapianSearchResult, self).__init__(app_label, model_name, pk, score, **kwargs)
self._model = get_model('xapian_tests', model_name)
self._model = apps.get_model('xapian_tests', model_name)
def get_terms(backend, *args):