Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

AttributeError: 'ManyToOneRel' object has no attribute 'verbose_name' #132

Open
romantolkachyov opened this issue Mar 3, 2018 · 0 comments

Comments

@romantolkachyov
Copy link

  • 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'
romantolkachyov added a commit to romantolkachyov/drf_openapi that referenced this issue Mar 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant