fix serve static files

This commit is contained in:
JensDiemer 2020-12-29 12:03:35 +01:00
parent 3d8b18788e
commit a58ba43e18
2 changed files with 1 additions and 5 deletions

View file

@ -1,5 +1,4 @@
from django.conf import settings from django.conf import settings
from django.conf.urls import static
from django.contrib import admin from django.contrib import admin
from django.urls import path from django.urls import path
@ -12,6 +11,3 @@ urlpatterns = [
path(f'{settings.PATH_URL}/', admin.site.urls), path(f'{settings.PATH_URL}/', admin.site.urls),
path(f'{settings.PATH_URL}/debug/', request_media_debug_view), path(f'{settings.PATH_URL}/debug/', request_media_debug_view),
] ]
if settings.SERVE_FILES:
urlpatterns += static.static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

View file

@ -119,7 +119,7 @@ def create_local_test(django_settings_path, destination, runserver=False):
os.environ['HTTP_AUTHORIZATION'] = generate_basic_auth(username='test', password='test123') os.environ['HTTP_AUTHORIZATION'] = generate_basic_auth(username='test', password='test123')
try: try:
call_manage_py(final_home_path, 'runserver --nostatic') call_manage_py(final_home_path, 'runserver')
except KeyboardInterrupt: except KeyboardInterrupt:
print('\nBye ;)') print('\nBye ;)')