Я только что добавил приложение Photologue в новый проект Django. Установка, кажется, работала за исключением ....
... при попытке добавить исходную галерею выдается следующая ошибка
TypeError: _add_items() got an unexpected keyword argument 'through_defaults
Все пакеты были установлены с использованием pip3 на MacOS 10.14 в соответствии с документом «read-the-doc».
Internal Server Error: /admin/photologue/gallery/add/
Traceback (most recent call last):
File "/Users/myuser/Envs/env1/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/Users/myuser/Envs/env1/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/Users/myuser/Envs/env1/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/myuser/Envs/env1/lib/python3.7/site-packages/django/contrib/admin/options.py", line 606, in wrapper
return self.admin_site.admin_view(view)(*args, **kwargs)
File "/Users/myuser/Envs/env1/lib/python3.7/site-packages/django/utils/decorators.py", line 142, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/Users/myuser/Envs/env1/lib/python3.7/site-packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File "/Users/myuser/Envs/env1/lib/python3.7/site-packages/django/contrib/admin/sites.py", line 223, in inner
return view(request, *args, **kwargs)
File "/Users/myuser/Envs/env1/lib/python3.7/site-packages/django/contrib/admin/options.py", line 1634, in add_view
return self.changeform_view(request, None, form_url, extra_context)
File "/Users/myuser/Envs/env1/lib/python3.7/site-packages/django/utils/decorators.py", line 45, in _wrapper
return bound_method(*args, **kwargs)
File "/Users/myuser/Envs/env1/lib/python3.7/site-packages/django/utils/decorators.py", line 142, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/Users/myuser/Envs/env1/lib/python3.7/site-packages/django/contrib/admin/options.py", line 1522, in changeform_view
return self._changeform_view(request, object_id, form_url, extra_context)
File "/Users/myuser/Envs/env1/lib/python3.7/site-packages/django/contrib/admin/options.py", line 1562, in _changeform_view
self.save_related(request, form, formsets, not add)
File "/Users/myuser/Envs/env1/lib/python3.7/site-packages/photologue/admin.py", line 57, in save_related
super(GalleryAdmin, self).save_related(request, form, *args, **kwargs)
File "/Users/myuser/Envs/env1/lib/python3.7/site-packages/django/contrib/admin/options.py", line 1114, in save_related
form.save_m2m()
File "/Users/myuser/Envs/env1/lib/python3.7/site-packages/django/forms/models.py", line 441, in _save_m2m
f.save_form_data(self.instance, cleaned_data[f.name])
File "/Users/myuser/Envs/env1/lib/python3.7/site-packages/django/db/models/fields/related.py", line 1621, in save_form_data
getattr(instance, self.attname).set(data)
File "/Users/myuser/Envs/env1/lib/python3.7/site-packages/sortedm2m/fields.py", line 92, in set
super(SortedRelatedManager, self).set(objs, **kwargs)
File "/Users/myuser/Envs/env1/lib/python3.7/site-packages/django/db/models/fields/related_descriptors.py", line 981, in set
self.add(*objs, through_defaults=through_defaults)
File "/Users/myuser/Envs/env1/lib/python3.7/site-packages/django/db/models/fields/related_descriptors.py", line 938, in add
through_defaults=through_defaults,
TypeError: _add_items() got an unexpected keyword argument 'through_defaults'
[23/May/2019 11:56:11] "POST /admin/photologue/gallery/add/ HTTP/1.1" 500 136703