Skip to content

Commit

Permalink
Django 4.0 test
Browse files Browse the repository at this point in the history
  • Loading branch information
jpic committed Jan 27, 2022
1 parent 3eb84a0 commit 1f500ad
Show file tree
Hide file tree
Showing 23 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion src/dal_queryset_sequence/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
)

from django import forms
from django.conf.urls import url
from django.urls import re_path as url
from django.contrib.contenttypes.models import ContentType

from queryset_sequence import QuerySetSequence
Expand Down
3 changes: 1 addition & 2 deletions src/dal_queryset_sequence/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@

from django import forms
from django.contrib.contenttypes.models import ContentType
from django.utils.encoding import force_text


class QuerySetSequenceSelectMixin(WidgetMixin):
"""Support QuerySetSequence in WidgetMixin."""

def label_from_instance(self, obj):
"""Convert an object into string. Override it to customize display."""
return force_text(obj)
return str(obj)

def filter_choices_to_render(self, selected_choices):
"""Overwrite self.choices to exclude unselected values."""
Expand Down
2 changes: 1 addition & 1 deletion src/dal_select2_queryset_sequence/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from dal_select2_queryset_sequence.views import Select2QuerySetSequenceAutoView
from dal_select2_queryset_sequence.widgets import QuerySetSequenceSelect2

from django.conf.urls import url
from django.urls import re_path as url

from queryset_sequence import QuerySetSequence

Expand Down
2 changes: 1 addition & 1 deletion test_project/custom_select2/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from dal import autocomplete

from django.conf.urls import url
from django.urls import re_path as url

from .models import TModel

Expand Down
2 changes: 1 addition & 1 deletion test_project/forward_different_fields/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from dal import autocomplete

from django.conf.urls import url
from django.urls import re_path as url


class ListWithForwardsView(autocomplete.Select2ListView):
Expand Down
2 changes: 1 addition & 1 deletion test_project/linked_data/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from dal import autocomplete

from django.conf.urls import url
from django.urls import re_path as url

from .models import TModel

Expand Down
2 changes: 1 addition & 1 deletion test_project/rename_forward/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from dal import autocomplete

from django.conf.urls import url
from django.urls import re_path as url

from .models import TModel

Expand Down
2 changes: 1 addition & 1 deletion test_project/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pytest-cov
pytest-splinter
tenacity
whitenoise
django-nested-admin>=3.0.21
https://github.com/jpic/django-nested-admin/archive/refs/heads/master.zip#egg=django-nested-admin
django-debug-toolbar
sqlparse>=0.4.2 # not directly required, pinned by Snyk to avoid a vulnerability
djhacker
2 changes: 1 addition & 1 deletion test_project/secure_data/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from dal import autocomplete

from django.conf.urls import url
from django.urls import re_path as url

from .models import TModel

Expand Down
2 changes: 1 addition & 1 deletion test_project/select2_foreign_key/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from dal import autocomplete

from django.conf.urls import url
from django.urls import re_path as url

from .models import TModel

Expand Down
2 changes: 1 addition & 1 deletion test_project/select2_generic_foreign_key/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# from dal import autocomplete

from django.conf.urls import url
from django.urls import re_path as url
# from django.contrib.auth.models import Group
from django.views import generic

Expand Down
2 changes: 1 addition & 1 deletion test_project/select2_generic_m2m/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from dal import autocomplete

from django.conf.urls import url
from django.urls import re_path as url
from django.contrib.auth.models import Group
from django.views import generic

Expand Down
2 changes: 1 addition & 1 deletion test_project/select2_gm2m/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from dal import autocomplete

from django.conf.urls import url
from django.urls import re_path as url
from django.contrib.auth.models import Group
from django.views import generic

Expand Down
2 changes: 1 addition & 1 deletion test_project/select2_list/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.conf.urls import url
from django.urls import re_path as url

from .views import Select2ListViewAutocomplete, Select2ProvidedValueListViewAutocomplete

Expand Down
2 changes: 1 addition & 1 deletion test_project/select2_many_to_many/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from dal import autocomplete

from django.conf.urls import url
from django.urls import re_path as url
from django.views import generic

from .forms import TForm
Expand Down
2 changes: 1 addition & 1 deletion test_project/select2_nestedadmin/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from dal import autocomplete

from django.conf.urls import url
from django.urls import re_path as url

from .models import TModelThree

Expand Down
2 changes: 1 addition & 1 deletion test_project/select2_one_to_one/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from dal import autocomplete

from django.conf.urls import url
from django.urls import re_path as url
from django.views import generic

from .forms import TForm
Expand Down
2 changes: 1 addition & 1 deletion test_project/select2_outside_admin/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.conf.urls import url
from django.urls import re_path as url

from .views import UpdateView

Expand Down
2 changes: 1 addition & 1 deletion test_project/select2_tagging/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from dal import autocomplete

from django.conf.urls import url
from django.urls import re_path as url

from tagging.models import Tag

Expand Down
2 changes: 1 addition & 1 deletion test_project/select2_taggit/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from dal import autocomplete

from django.conf.urls import url
from django.urls import re_path as url

from taggit.models import Tag

Expand Down
2 changes: 1 addition & 1 deletion test_project/tests/test_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from django import forms
from django import http
from django import test
from django.conf.urls import url
from django.urls import re_path as url
try:
from django.urls import reverse
except ImportError:
Expand Down
2 changes: 1 addition & 1 deletion test_project/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import django
from django.conf import settings
from django.conf.urls import include, url
from django.urls import include, re_path as url
from django.contrib import admin

import views
Expand Down
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
# Note that django doesn't support pypy3 for now
# https://code.djangoproject.com/ticket/25849
envlist = py{34,35,36,37,38,39,py,py3}-dj{32,main}
envlist = py{34,35,36,37,38,39,py,py3}-dj{32,40,main}

[testenv]
changedir = {toxinidir}/test_project
Expand All @@ -11,7 +11,7 @@ setenv =
DJANGO_SETTINGS_MODULE=settings.base

commands =
dj{32,main}: py.test -v --cov --liveserver 127.0.0.1:9999 {posargs} secure_data rename_forward select2_foreign_key select2_generic_foreign_key select2_list select2_many_to_many select2_one_to_one select2_outside_admin select2_taggit custom_select2 select2_nestedadmin select2_djhacker_formfield
py.test -v --cov --liveserver 127.0.0.1:9999 {posargs} secure_data rename_forward select2_foreign_key select2_generic_foreign_key select2_list select2_many_to_many select2_one_to_one select2_outside_admin select2_taggit custom_select2 select2_nestedadmin select2_djhacker_formfield

deps =
dj18: Django==1.8.*
Expand All @@ -24,6 +24,7 @@ deps =
dj30: Django==3.0.*
dj31: Django==3.1.*
dj31: Django==3.2.*
dj40: Django==4.0.0-rc1
djmain: https://github.com/django/django/archive/main.tar.gz
-rtest_project/requirements.txt

Expand Down

0 comments on commit 1f500ad

Please sign in to comment.