начал работать с интерфейсом
All checks were successful
Deploy MES Core / deploy (push) Successful in 9s
All checks were successful
Deploy MES Core / deploy (push) Successful in 9s
This commit is contained in:
@@ -15,14 +15,19 @@ Including another URLconf
|
||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||
"""
|
||||
from django.contrib import admin
|
||||
from django.urls import path
|
||||
from django.urls import path, include
|
||||
from django.conf.urls.static import static # <--- Добавьте эту строку
|
||||
from core import settings
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
# Добавь эту строку, она подключит login, logout и прочие стандартные пути
|
||||
path('accounts/', include('django.contrib.auth.urls')),
|
||||
# Подключаем урлы нашего приложения
|
||||
path('', include('shiftflow.urls')),
|
||||
]
|
||||
|
||||
|
||||
# Вместо if settings.DEBUG: не забываем from django.conf.urls.static import static # <--- Добавьте эту строку
|
||||
if settings.ENV_TYPE in ['local', 'dev']:
|
||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
|
||||
Reference in New Issue
Block a user