When I add STATIC_URL to urls.py:
urlpatterns = [...]+static(settings.STATIC_URL)
but there I get ^static\/(?P<path>.*)$in the urls.
Shouldn't it be ^static/(?P<path>.*)$? how ^media/(?P<path>.*)$.

in settings.py:
STATIC_URL = '/static/'
STATIC_ROOT = BASE_DIR + '/static/'
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)
How to solve this problem? or is there another way to replace
+static(settings.STATIC_URL)
if there is, provide me for testing, thanks.
source
share