添加后端接口文档,需要执行 pip install -r requirements.txt
							parent
							
								
									f6c4a2d187
								
							
						
					
					
						commit
						6dca879270
					
				|  | @ -103,6 +103,8 @@ npm run build:prod | |||
| 	python3 manage.py runserver 0.0.0.0:8000 | ||||
| 	 | ||||
| 初始账号:admin 密码:123456 | ||||
| 
 | ||||
| 后端接口文档地址:http://127.0.0.1:8000/docs/ | ||||
| ~~~ | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -22,6 +22,7 @@ from django.conf.urls import url | |||
| from django.contrib import admin | ||||
| from django.urls import re_path, include | ||||
| from django.views.static import serve | ||||
| from rest_framework.documentation import include_docs_urls | ||||
| from rest_framework.views import APIView | ||||
| 
 | ||||
| from apps.permission.views import GetUserProfileView, GetRouters | ||||
|  | @ -46,6 +47,7 @@ class CaptchaRefresh(APIView): | |||
| urlpatterns = [ | ||||
|     re_path('api-token-auth/', LoginView.as_view(), name='api_token_auth'), | ||||
|     re_path(r'^admin/', admin.site.urls), | ||||
|     url(r'docs/', include_docs_urls(title='接口文档')), | ||||
|     re_path(r'^permission/', include('apps.permission.urls')), | ||||
|     re_path(r'^system/', include('apps.system.urls')), | ||||
|     re_path(r'media/(?P<path>.*)', serve, {"document_root": settings.MEDIA_ROOT}), | ||||
|  |  | |||
|  | @ -20,3 +20,4 @@ redis==3.5.3 | |||
| six==1.15.0 | ||||
| sqlparse==0.4.1 | ||||
| xlwt==1.3.0 | ||||
| coreapi==2.3.3 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 李强
						李强