drf_openapi icon indicating copy to clipboard operation
drf_openapi copied to clipboard

NameError: name 'API_PREFIX' is not defined // Incomplete Quickstart

Open Miserlou opened this issue 6 years ago • 0 comments

The "quickstart" example in the docs is incomplete. Running it as described with a fresh DRF and fresh drf_openapi will give:

NameError: name 'API_PREFIX' is not defined

Fixing that then gives:

NameError: name 'include' is not defined

The Quickstart example should be updated to include everything necessary to actually run drf_openapi (ex, API_PREFIX='blah', from django.conf.urls import url, include)

Miserlou avatar Mar 23 '18 19:03 Miserlou