Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7k
Closed
Milestone
Description
Steps to reproduce
CreateModelViewSets andSerializers. Register theViewSets in a router:
class ResultSerializer(serializers.ModelSerializer): test = serializers.PrimaryKeyRelatedField(queryset=Test.objects.all()) certification = serializers.PrimaryKeyRelatedField(queryset=Certification.objects.all()) value = serializers.CharField() class Meta: model = Result fields = '__all__'class ResultViewSet(ModelViewSet): queryset = Result.objects.all() serializer_class = ResultSerializerrouter = DefaultRouter()router.register(r'results', ResultViewSet)urls = router.urlsAdd router URLs and documentation URLs to URLconf:
urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^certifications/', include('certifications.urls')), url(r'^docs/', include_docs_urls(title='API Documentation')),]Everything working as expected. Now add a token-based login endpoint URL as describedhere:
urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^certifications/', include('certifications.urls')), url(r'^docs/', include_docs_urls(title='API Documentation')), url(r'^api-token-auth/', views.obtain_auth_token),]Expected behavior
The documentation forapi-token-auth should appear alongside the rest of the API documentation.
Actual behavior
All documentation disappears, and is replaced with an entry forapi-token-auth. There is also a header by the name of one of my applications, but nothing is under this header.
Metadata
Metadata
Assignees
Labels
No labels
