Make sure static files are loaded
This commit is contained in:
1 parent
19cfa5391d
commit
3dd786deb9
2 files changed
+4
-6
No files matched your search
@@ -27,18 +27,13 @@ class ArtifactWatcher(threading.Thread):
|
|||||||
test.save()
|
test.save()
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
|
||||||
for test in OpenBench.utils.get_awaiting_tests():
|
for test in OpenBench.utils.get_awaiting_tests():
|
||||||
self.update_test(test)
|
self.update_test(test)
|
||||||
|
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
|
|
||||||
class Command(BaseRunserverCommand):
|
class Command(BaseRunserverCommand):
|
||||||
|
|
||||||
help = "Test"
|
|
||||||
|
|
||||||
def inner_run(self, *args, **options):
|
def inner_run(self, *args, **options):
|
||||||
self.pre_start()
|
self.pre_start()
|
||||||
super().inner_run(*args, **options)
|
super().inner_run(*args, **options)
|
||||||
@@ -48,4 +43,4 @@ class Command(BaseRunserverCommand):
|
|||||||
self.watcher = ArtifactWatcher().start()
|
self.watcher = ArtifactWatcher().start()
|
||||||
|
|
||||||
def pre_quit(self):
|
def pre_quit(self):
|
||||||
self.watcher.kill()
|
self.watcher.kill()
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.urls import path, include
|
from django.urls import path, include
|
||||||
|
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
|
||||||
|
|
||||||
import OpenBench.urls
|
import OpenBench.urls
|
||||||
|
|
||||||
@@ -7,3 +8,5 @@ urlpatterns = [
|
|||||||
path(r'admin/', admin.site.urls),
|
path(r'admin/', admin.site.urls),
|
||||||
path(r'', include(OpenBench.urls.urlpatterns)),
|
path(r'', include(OpenBench.urls.urlpatterns)),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
urlpatterns += staticfiles_urlpatterns()
|
||||||
Reference in new issue
Block a user