-
-
Notifications
You must be signed in to change notification settings - Fork 596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a top-level /data with static.File(DATA) that serves files from the data directory #8758
Comments
Adds the two static.File(DATA) calls to twist.py |
comment:1
Attachment: trac_8758-data-toplevel-with-static-file.patch.gz |
comment:2
Not a patch bomb. |
Changes the url to /static/. Replaces previous. |
comment:3
Attachment: trac_8758-toplevel-static-url.patch.gz The latest patch changes the url to /static/. I think we should also rename the "data" directory in the sagenb source to "static", and rename the global DATA to STATIC. DATA is slightly confusing because uploading files to a worksheet also uses a DATA global, eg DATA+'mydatafile.txt'. |
comment:4
Ok - ignore the new patch. Let's leave the url as /data. |
Reviewer: William Stein |
Merged: SageNB 0.8.1 |
Instead of having /js, /css, etc, we should serve all static data files out of /data. For now this patch just adds /data using
child_data = static.File(DATA)
, wherestatic.File(path)
is defined in twisted. It will serve files with the correct MIME type based on extension.Eventually we should find all the /js and /css paths and change them to /data
At some point in the future we could even implement caching of all the static files easily by subclassing static.File(path), and making everything in /data cached.
CC: @sagetrac-acleone @williamstein @TimDumol
Component: notebook
Author: Alex Leone
Reviewer: William Stein
Merged: SageNB 0.8.1
Issue created by migration from https://trac.sagemath.org/ticket/8758
The text was updated successfully, but these errors were encountered: