mirror of
https://github.com/jazzband/django-admin2.git
synced 2026-03-16 22:20:24 +00:00
add compatibility with last version of deps (#454)
This commit is contained in:
parent
b20ec951c3
commit
a95e211d65
7 changed files with 15 additions and 6 deletions
|
|
@ -17,6 +17,7 @@ class GroupSerializer(Admin2APISerializer):
|
|||
|
||||
class Meta:
|
||||
model = Group
|
||||
fields = '__all__'
|
||||
|
||||
|
||||
class GroupAdmin2(ModelAdmin2):
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ class Admin2APIMixin(Admin2Mixin):
|
|||
|
||||
class Meta:
|
||||
model = model_class
|
||||
fields = '__all__'
|
||||
|
||||
return ModelAPISerilizer
|
||||
return super(Admin2APIMixin, self).get_serializer_class()
|
||||
|
|
|
|||
|
|
@ -102,17 +102,22 @@ def build_date_filter(request, model_admin, queryset, field_name="published_date
|
|||
filterset_dict = {
|
||||
"year": NumericDateFilter(
|
||||
name=field_name,
|
||||
lookup_type="year",
|
||||
lookup_expr="year",
|
||||
),
|
||||
"month": NumericDateFilter(
|
||||
name=field_name,
|
||||
lookup_type="month",
|
||||
lookup_expr="month",
|
||||
),
|
||||
"day": NumericDateFilter(
|
||||
name=field_name,
|
||||
lookup_type="day",
|
||||
lookup_expr="day",
|
||||
)
|
||||
}
|
||||
filterset_dict["Meta"] = type(
|
||||
type_str('Meta'),
|
||||
(object, ),
|
||||
{"model": queryset.model, "fields": [field_name]},
|
||||
)
|
||||
|
||||
return type(
|
||||
type_str('%sDateFilterSet' % queryset.model.__name__),
|
||||
|
|
|
|||
|
|
@ -285,6 +285,7 @@ class Admin2Inline(extra_views.InlineFormSet):
|
|||
adds some useful functionality.
|
||||
"""
|
||||
template = None
|
||||
fields = '__all__'
|
||||
|
||||
def construct_formset(self):
|
||||
"""
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -8,6 +8,7 @@ from .models import Poll, Choice
|
|||
|
||||
class ChoiceInline(Admin2TabularInline):
|
||||
model = Choice
|
||||
fields = '__all__'
|
||||
extra = 3
|
||||
|
||||
|
||||
|
|
|
|||
6
setup.py
6
setup.py
|
|
@ -128,10 +128,10 @@ setup(
|
|||
#test_suite='runtests.runtests',
|
||||
install_requires=[
|
||||
'django>=1.8.0',
|
||||
'django-extra-views<=0.7.1',
|
||||
'django-extra-views==0.8.0',
|
||||
'django-braces>=1.3.0',
|
||||
'djangorestframework<=3.3.3',
|
||||
'django-filter>=0.15.3',
|
||||
'djangorestframework<=3.5.3',
|
||||
'django-filter==1.0.0',
|
||||
'pytz==2016.4',
|
||||
'future>=0.15.2',
|
||||
],
|
||||
|
|
|
|||
Loading…
Reference in a new issue