Skip to content

Commit 3a26ad7

Browse files
committed
Merge branch 'release/v2.2.0'
2 parents 08bc421 + 7c40d03 commit 3a26ad7

File tree

8 files changed

+68
-40
lines changed

8 files changed

+68
-40
lines changed

.github/workflows/tests.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Tests
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the develop branch
8+
push:
9+
branches: [ develop ]
10+
pull_request:
11+
branches: [ develop ]
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
17+
jobs:
18+
# This workflow contains a single job called "build"
19+
build:
20+
# The type of runner that the job will run on
21+
runs-on: ubuntu-latest
22+
23+
strategy:
24+
matrix:
25+
python-version: ['3.8', '3.9', '3.10']
26+
27+
# Steps represent a sequence of tasks that will be executed as part of the job
28+
steps:
29+
- uses: actions/checkout@v1
30+
- name: Set up Python ${{ matrix.python-version }}
31+
uses: actions/setup-python@v2
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
- name: Install dependencies
35+
run: |
36+
python -m pip install --upgrade pip
37+
python -m pip install tox tox-gh-actions
38+
- name: Test with tox
39+
run: tox

.travis.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Edit `ForeignKey`, `ManyToManyField` and `CharField` in Django Admin using jQuery UI AutoComplete.
1+
# Edit `ForeignKey`, `ManyToManyField` and `CharField` in Django Admin using jQuery UI AutoComplete
22

33
[![Build Status](https://travis-ci.org/crucialfelix/django-ajax-selects.svg?branch=master)](https://travis-ci.org/crucialfelix/django-ajax-selects) [![PyPI version](https://badge.fury.io/py/django-ajax-selects.svg)](https://badge.fury.io/py/django-ajax-selects)
44

@@ -26,6 +26,7 @@ INSTALLED_APPS = (
2626
...
2727
)
2828
```
29+
2930
Include the urls in your project:
3031

3132
```py
@@ -119,11 +120,11 @@ Read the full documention here: [outside of the admin](http://django-ajax-select
119120

120121
Many thanks to all contributors and pull requesters !
121122

122-
https://github.com/crucialfelix/django-ajax-selects/graphs/contributors
123+
<https://github.com/crucialfelix/django-ajax-selects/graphs/contributors/>
123124

124125
## License
125126

126127
Dual licensed under the MIT and GPL licenses:
127128

128-
* http://www.opensource.org/licenses/mit-license.php
129-
* http://www.gnu.org/licenses/gpl.html
129+
* <http://www.opensource.org/licenses/mit-license.php/>
130+
* <http://www.gnu.org/licenses/gpl.html/>

ajax_select/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,9 @@
1313
# and any specified in settings.AJAX_LOOKUP_CHANNELS
1414
# It will do this after all apps are imported.
1515
from django.apps import AppConfig # noqa
16-
default_app_config = 'ajax_select.apps.AjaxSelectConfig'
16+
17+
# Django 3.2+ does not need default_app_config set.
18+
# Remove this once django <3.2 support is removed
19+
import django
20+
if django.VERSION < (3, 2):
21+
default_app_config = 'ajax_select.apps.AjaxSelectConfig'

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
setup(
66
name="django-ajax-selects",
7-
version="2.1.0",
7+
version="2.2.0",
88
description="Edit ForeignKey, ManyToManyField and CharField in Django Admin using jQuery UI AutoComplete.",
99
author="Chris Sattinger",
1010
author_email="[email protected]",
@@ -48,7 +48,7 @@
4848
- Integrate with other UI elements elsewhere on the page using the javascript API
4949
- Works in Admin as well as in normal views
5050
51-
- Django >=2.2, <=3
51+
- Django >=3, <=4
5252
- Python >=3.6
5353
""",
5454
)

tests/settings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
"ENGINE": "django.db.backends.sqlite3",
66
}
77
}
8+
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
9+
810
ROOT_URLCONF = "tests.urls"
911
INSTALLED_APPS = [
1012
"django.contrib.auth",

tests/urls.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from django.conf import settings
2-
from django.conf.urls import include, url
2+
from django.urls import include, path
33
from django.conf.urls.static import static
44
from django.contrib import admin
55

@@ -8,6 +8,6 @@
88
admin.autodiscover()
99

1010
urlpatterns = [
11-
url(r'^ajax_lookups/', include(ajax_select_urls)),
12-
url(r'^admin/', admin.site.urls),
11+
path('ajax_lookups/', include(ajax_select_urls)),
12+
path('admin/', admin.site.urls),
1313
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

tox.ini

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,26 @@
77
[tox]
88
envlist =
99
{py38}-flake8,
10-
py38-{dj22,dj30,dj31}
10+
{py38,py39,py310}-{dj22,dj30,dj31,dj32,dj40}
11+
12+
[gh-actions]
13+
python =
14+
3.8: py38
15+
3.9: py39
16+
3.10: py310
1117

1218
[testenv]
1319
setenv =
1420
DJANGO_SETTINGS_MODULE=tests.settings
1521
PYTHONPATH = {toxinidir}:{toxinidir}/ajax_select:{toxinidir}/tests
16-
commands = django-admin.py test tests
22+
PYTHONWARNINGS = default
23+
commands = django-admin test tests
1724
deps =
1825
dj22: Django>=2.2,<2.3
1926
dj30: Django>=3,<3.1
2027
dj31: Django>=3.1,<3.2
28+
dj32: Django>=3.2,<3.3
29+
dj40: Django>=4,<5
2130
; djmaster: https://github.com/django/django/zipball/master
2231

2332
[testenv:py38-flake8]

0 commit comments

Comments
 (0)