📜  django 和 react url 冲突 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:04.349000             🧑  作者: Mango

代码示例1
urlpatterns = [
path("admin/", admin.site.urls),
path("api/", include(router.urls)),  # from rest_framework
re_path('(^(?!(api|admin)).*$)',
    TemplateView.as_view(template_name="build/index.html")),
]