Environment:
Request Method: POST
Request URL: http://127.0.0.1:8000/admin/blog/posts/add/
Django Version: 2.1.7
Python Version: 3.7.1
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'uuslug',
'blog']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback:
File "/home/ssv/Документы/Python/Django/myBlog/myBlog/venv/lib/python3.7/site-packages/django/core/handlers/exception.py" in inner
34. response = get_response(request)
File "/home/ssv/Документы/Python/Django/myBlog/myBlog/venv/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
126. response = self.process_exception_by_middleware(e, request)
File "/home/ssv/Документы/Python/Django/myBlog/myBlog/venv/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
124. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/ssv/Документы/Python/Django/myBlog/myBlog/venv/lib/python3.7/site-packages/django/contrib/admin/options.py" in wrapper
604. return self.admin_site.admin_view(view)(*args, **kwargs)
File "/home/ssv/Документы/Python/Django/myBlog/myBlog/venv/lib/python3.7/site-packages/django/utils/decorators.py" in _wrapped_view
142. response = view_func(request, *args, **kwargs)
File "/home/ssv/Документы/Python/Django/myBlog/myBlog/venv/lib/python3.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
44. response = view_func(request, *args, **kwargs)
File "/home/ssv/Документы/Python/Django/myBlog/myBlog/venv/lib/python3.7/site-packages/django/contrib/admin/sites.py" in inner
223. return view(request, *args, **kwargs)
File "/home/ssv/Документы/Python/Django/myBlog/myBlog/venv/lib/python3.7/site-packages/django/contrib/admin/options.py" in add_view
1637. return self.changeform_view(request, None, form_url, extra_context)
File "/home/ssv/Документы/Python/Django/myBlog/myBlog/venv/lib/python3.7/site-packages/django/utils/decorators.py" in _wrapper
45. return bound_method(*args, **kwargs)
File "/home/ssv/Документы/Python/Django/myBlog/myBlog/venv/lib/python3.7/site-packages/django/utils/decorators.py" in _wrapped_view
142. response = view_func(request, *args, **kwargs)
File "/home/ssv/Документы/Python/Django/myBlog/myBlog/venv/lib/python3.7/site-packages/django/contrib/admin/options.py" in changeform_view
1525. return self._changeform_view(request, object_id, form_url, extra_context)
File "/home/ssv/Документы/Python/Django/myBlog/myBlog/venv/lib/python3.7/site-packages/django/contrib/admin/options.py" in _changeform_view
1565. self.save_related(request, form, formsets, not add)
File "/home/ssv/Документы/Python/Django/myBlog/myBlog/venv/lib/python3.7/site-packages/django/contrib/admin/options.py" in save_related
1117. form.save_m2m()
Exception Type: AttributeError at /admin/blog/posts/add/
Exception Value: 'PostsForm' object has no attribute 'save_m2m'