Incompatible with Django 1.10
See original GitHub issueBuild is failing for latest Django version. Also when I update one of my projects to Django 1.10 I get the following error when using get_extra_form_kwargs
.
Traceback:
File "/project/env/base/lib/python3.5/site-packages/django/core/handlers/exception.py" in inner
39. response = get_response(request)
File "/project/env/base/lib/python3.5/site-packages/django/core/handlers/base.py" in _legacy_get_response
249. response = self._get_response(request)
File "/project/env/base/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
187. response = self.process_exception_by_middleware(e, request)
File "/project/env/base/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
185. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/project/env/base/lib/python3.5/site-packages/django/views/generic/base.py" in view
68. return self.dispatch(request, *args, **kwargs)
File "/project/env/base/lib/python3.5/site-packages/django/contrib/auth/mixins.py" in dispatch
56. return super(LoginRequiredMixin, self).dispatch(request, *args, **kwargs)
File "/project/env/base/lib/python3.5/site-packages/django/views/generic/base.py" in dispatch
88. return handler(request, *args, **kwargs)
File "/project/env/base/lib/python3.5/site-packages/extra_views/advanced.py" in get
147. return super(BaseUpdateWithInlinesView, self).get(request, *args, **kwargs)
File "/project/env/base/lib/python3.5/site-packages/extra_views/advanced.py" in get
85. inlines = self.construct_inlines()
File "/project/env/base/lib/python3.5/site-packages/extra_views/advanced.py" in construct_inlines
69. inline_formset = inline_instance.construct_formset()
File "/project/env/base/lib/python3.5/site-packages/extra_views/advanced.py" in construct_formset
28. formset = super(InlineFormSet, self).construct_formset()
File "/project/env/base/lib/python3.5/site-packages/extra_views/formsets.py" in construct_formset
39. return formset_class(**self.get_formset_kwargs())
File "/project/env/base/lib/python3.5/site-packages/django/forms/models.py" in __init__
880. if self.form._meta.fields and self.fk.name not in self.form._meta.fields:
Exception Type: AttributeError at /reizen/416/
Exception Value: 'function' object has no attribute '_meta'
InlineModelFormSet
that causes the problem (having no problems after removing get_extra_form_kwargs
):
class RelatedInline(InlineModelFormSet):
model = models.TripRelated
form_class = forms.TripRelatedInlineForm
max_num = extra = 3
fk_name = 'trip'
def get_formset_kwargs(self):
kwargs = super().get_formset_kwargs()
kwargs['queryset'] = \
models.TripRelated.objects.select_related('related')
return kwargs
def get_extra_form_kwargs(self):
kwargs = super().get_extra_form_kwargs()
kwargs['parent'] = self.object
return kwargs
This line seems to be the problem as it is trying to get ._meta
from the curried function https://github.com/AndrewIngram/django-extra-views/blob/master/extra_views/formsets.py#L37 .
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Incompatible with Django 1.10 due to option_list being ...
In Django 1.8 option_list was depracted in favour of implementing add_arguments , and as such with Django's deprecation policy, the former way was...
Read more >Django 1.10 release notes
Welcome to Django 1.10! These release notes cover the new features, as well as some backwards incompatible changes you'll want to be aware ......
Read more >How to integrate django-admin-bootstrapped with django 1.10
I've also had the same problem since migrating to django 1.10. Waiting for newer version of django-admin-bootstrapped may take time.
Read more >Change log — Django Debug Toolbar 3.8.1 documentation
Add check W006 to warn that the toolbar is incompatible with TEMPLATES ... This version is compatible with Django 1.10 and requires Django...
Read more >Issue #2741: Pulp is not compatible with Django 1.10 - Planio
Django 1.10 is coming with Fedora 26 so we should fix this before that release. Also, Django 1.11 is coming with Rawhide (F27)...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This worked for me # formset_class.form = staticmethod(curry(formset_class.form, *_extra_form_kwargs)) formset_class.form = wraps(formset_class.form)(partial(formset_class.form, *_extra_form_kwargs))
this can be closed