Restructured web resources to better manage static files.
This commit is contained in:
parent
05c9d67ffc
commit
16bcc3c9f0
25 changed files with 70 additions and 59 deletions
|
|
@ -18,6 +18,7 @@ found on http://localhost:8000/webclient.)
|
|||
"""
|
||||
import time
|
||||
import json
|
||||
|
||||
from hashlib import md5
|
||||
|
||||
from twisted.web import server, resource
|
||||
|
|
@ -32,7 +33,6 @@ from src.server import session
|
|||
SERVERNAME = settings.SERVERNAME
|
||||
ENCODINGS = settings.ENCODINGS
|
||||
|
||||
|
||||
# defining a simple json encoder for returning
|
||||
# django data to the client. Might need to
|
||||
# extend this if one wants to send more
|
||||
|
|
|
|||
|
|
@ -411,6 +411,8 @@ if WEBSERVER_ENABLED:
|
|||
web_root = DjangoWebRoot(threads)
|
||||
# point our media resources to url /media
|
||||
web_root.putChild("media", static.File(settings.MEDIA_ROOT))
|
||||
# point our static resources to url /static
|
||||
web_root.putChild("static", static.File(settings.STATIC_ROOT))
|
||||
web_site = server.Site(web_root, logPath=settings.HTTP_LOG_FILE)
|
||||
|
||||
for proxyport, serverport in WEBSERVER_PORTS:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue