Skip to content

Commit

Permalink
Merge branch 'release/v2.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
crucialfelix committed Apr 2, 2022
2 parents 08bc421 + 7c40d03 commit 3a26ad7
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 40 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This is a basic workflow to help you get started with Actions

name: Tests

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the develop branch
push:
branches: [ develop ]
pull_request:
branches: [ develop ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
- name: Test with tox
run: tox
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Edit `ForeignKey`, `ManyToManyField` and `CharField` in Django Admin using jQuery UI AutoComplete.
# Edit `ForeignKey`, `ManyToManyField` and `CharField` in Django Admin using jQuery UI AutoComplete

[![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)

Expand Down Expand Up @@ -26,6 +26,7 @@ INSTALLED_APPS = (
...
)
```

Include the urls in your project:

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

Many thanks to all contributors and pull requesters !

https://github.com/crucialfelix/django-ajax-selects/graphs/contributors
<https://github.com/crucialfelix/django-ajax-selects/graphs/contributors/>

## License

Dual licensed under the MIT and GPL licenses:

* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
* <http://www.opensource.org/licenses/mit-license.php/>
* <http://www.gnu.org/licenses/gpl.html/>
7 changes: 6 additions & 1 deletion ajax_select/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,9 @@
# and any specified in settings.AJAX_LOOKUP_CHANNELS
# It will do this after all apps are imported.
from django.apps import AppConfig # noqa
default_app_config = 'ajax_select.apps.AjaxSelectConfig'

# Django 3.2+ does not need default_app_config set.
# Remove this once django <3.2 support is removed
import django
if django.VERSION < (3, 2):
default_app_config = 'ajax_select.apps.AjaxSelectConfig'
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name="django-ajax-selects",
version="2.1.0",
version="2.2.0",
description="Edit ForeignKey, ManyToManyField and CharField in Django Admin using jQuery UI AutoComplete.",
author="Chris Sattinger",
author_email="[email protected]",
Expand Down Expand Up @@ -48,7 +48,7 @@
- Integrate with other UI elements elsewhere on the page using the javascript API
- Works in Admin as well as in normal views
- Django >=2.2, <=3
- Django >=3, <=4
- Python >=3.6
""",
)
2 changes: 2 additions & 0 deletions tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"ENGINE": "django.db.backends.sqlite3",
}
}
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"

ROOT_URLCONF = "tests.urls"
INSTALLED_APPS = [
"django.contrib.auth",
Expand Down
6 changes: 3 additions & 3 deletions tests/urls.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.conf import settings
from django.conf.urls import include, url
from django.urls import include, path
from django.conf.urls.static import static
from django.contrib import admin

Expand All @@ -8,6 +8,6 @@
admin.autodiscover()

urlpatterns = [
url(r'^ajax_lookups/', include(ajax_select_urls)),
url(r'^admin/', admin.site.urls),
path('ajax_lookups/', include(ajax_select_urls)),
path('admin/', admin.site.urls),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
13 changes: 11 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,26 @@
[tox]
envlist =
{py38}-flake8,
py38-{dj22,dj30,dj31}
{py38,py39,py310}-{dj22,dj30,dj31,dj32,dj40}

[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310

[testenv]
setenv =
DJANGO_SETTINGS_MODULE=tests.settings
PYTHONPATH = {toxinidir}:{toxinidir}/ajax_select:{toxinidir}/tests
commands = django-admin.py test tests
PYTHONWARNINGS = default
commands = django-admin test tests
deps =
dj22: Django>=2.2,<2.3
dj30: Django>=3,<3.1
dj31: Django>=3.1,<3.2
dj32: Django>=3.2,<3.3
dj40: Django>=4,<5
; djmaster: https://github.com/django/django/zipball/master

[testenv:py38-flake8]
Expand Down

0 comments on commit 3a26ad7

Please sign in to comment.