This repository was archived by the owner on Apr 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 39
This repository was archived by the owner on Apr 22, 2020. It is now read-only.
AttributeError: 'ManyToOneRel' object has no attribute 'verbose_name' #132
Copy link
Copy link
Open
Description
- DRF OpenAPI version: master
- Python version: 3.6.4
- Operating System: MacOS
Description
Open docs
What I Did
Just open docs url in browser
AttributeError at /api/schema/
'ManyToOneRel' object has no attribute 'verbose_name'
Request Method: GET
Request URL: http://localhost:8000/api/schema/
Django Version: 2.0.2
Python Executable: /Users/roman/virtualenvs/project/bin/python
Python Version: 3.6.4
Traceback:
File "/Users/roman/virtualenvs/project/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
35. response = get_response(request)
File "/Users/roman/virtualenvs/project/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
128. response = self.process_exception_by_middleware(e, request)
File "/Users/roman/virtualenvs/project/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
126. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/roman/virtualenvs/project/lib/python3.6/site-packages/django/views/decorators/csrf.py" in wrapped_view
54. return view_func(*args, **kwargs)
File "/Users/roman/virtualenvs/project/lib/python3.6/site-packages/django/views/generic/base.py" in view
69. return self.dispatch(request, *args, **kwargs)
File "/Users/roman/virtualenvs/project/lib/python3.6/site-packages/rest_framework/views.py" in dispatch
494. response = self.handle_exception(exc)
File "/Users/roman/virtualenvs/project/lib/python3.6/site-packages/rest_framework/views.py" in handle_exception
454. self.raise_uncaught_exception(exc)
File "/Users/roman/virtualenvs/project/lib/python3.6/site-packages/rest_framework/views.py" in dispatch
491. response = handler(request, *args, **kwargs)
File "/Users/roman/work/drf_openapi/drf_openapi/views.py" in get
22. return response.Response(generator.get_schema(request))
File "/Users/roman/work/drf_openapi/drf_openapi/entities.py" in get_schema
96. links = self.get_links(None if public else request)
File "/Users/roman/work/drf_openapi/drf_openapi/entities.py" in get_links
137. link = self.get_link(path, method, view, version=getattr(request, 'version', None))
File "/Users/roman/work/drf_openapi/drf_openapi/entities.py" in get_link
159. fields = self.get_path_fields(path, method, view)
File "/Users/roman/work/drf_openapi/drf_openapi/entities.py" in get_path_fields
255. if model_field is not None and model_field.verbose_name:
Exception Type: AttributeError at /api/schema/
Exception Value: 'ManyToOneRel' object has no attribute 'verbose_name'
Metadata
Metadata
Assignees
Labels
No labels