主路由

luffyapi/urls.py
from django.contrib import admin
from django.urls import path, re_path, include
from django.views.static import serve
from django.conf import settings
urlpatterns = [
    path('admin/', admin.site.urls),

    path('user/', include('user.urls')),

    re_path('^media/(?P<path>.*)', serve, {'document_root': settings.MEDIA_ROOT})
]

子路由

user/urls.py
from django.urls import path, re_path
urlpatterns = [

]

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-15
  • 2022-01-01
  • 2021-05-25
  • 2021-12-22
  • 2021-12-29
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-07
  • 2022-12-23
  • 2022-12-23
  • 2021-09-07
  • 2021-05-16
相关资源
相似解决方案