Fix schema generation with OneToOneFields (#81)
* Fix: OneToOneRel, used by OneToOneField doesn't have help_text nor primary_key attributes, thus breaking OpenAPISchemaGenerator; use hasattr() as safe-guard. * Fix: use getattr() with a default value instead of hasattr() + acessing the value * Add: 'people' app that breaks drf_yasg without previous commits * Update tests/references.yaml + run isort and flake8 * Fix: set on_delete for Person.identity as Django-2+ requires it
This commit is contained in:
@@ -27,6 +27,7 @@ INSTALLED_APPS = [
|
||||
'users',
|
||||
'articles',
|
||||
'todo',
|
||||
'people'
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
|
||||
@@ -63,5 +63,6 @@ urlpatterns = [
|
||||
url(r'^articles/', include('articles.urls')),
|
||||
url(r'^users/', include('users.urls')),
|
||||
url(r'^todo/', include('todo.urls')),
|
||||
url(r'^people/', include('people.urls')),
|
||||
url(r'^plain/', plain_view),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user