17 lines
433 B
Python
17 lines
433 B
Python
from django.conf import settings
|
|
from django.conf.urls.static import static
|
|
from django.contrib import admin
|
|
from django.urls import path, include
|
|
|
|
# 需要导入自定义的管理站点实例
|
|
|
|
|
|
urlpatterns = [
|
|
path('admin/', admin.site.urls),
|
|
# 以后前台访问放 core app 的 urls
|
|
path('', include('core.urls')),
|
|
]
|
|
|
|
if settings.DEBUG:
|
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|