Answer the question
In order to leave comments, you need to log in
What's wrong with static?
What went wrong with the statics on DJANGO is not returning all static files.
for example
<link rel="stylesheet" href="{% static 'style_lk.css' %}">
<link rel="stylesheet" href="{% static 'style.css' %}">
STATIC_URL = '/static/'
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
+ static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) \
+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Answer the question
In order to leave comments, you need to log in
The problem turned out to be that the documentation was not read, it was decided like this
#settings static
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'django.contrib.staticfiles.finders.DefaultStorageFinder',
)
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.0/howto/static-files
STATIC_URL = '/static/'
STATICFILES_DIRS =(os.path.join(BASE_DIR,'static/',),)
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, "static", "media")
STATIC_ROOT = os.path.join(BASE_DIR, 'static_root')
#Перенаправляем после авторизации
LOGIN_REDIRECT_URL = '/'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question