Request - Documentation for settings.py

9 views
Skip to first unread message

Dean Ang Gmail

unread,
Jul 2, 2025, 9:58:31 PMJul 2
to Numbas Users
Dear Chris,
When I setup a development server or try to deploy numbas at my server, I faced many frustrations when it comes to configurating settings.py.

Can I ask for a documentation of what the followings do, together with an example of numbas file structure/rights, and example settings, and a simple explanation of what the setting(s) do?
(i) STATIC_URL / STATIC_ROOT 

(ii) MEDIA_ROOT / MEDIA_URL

(ii) Global Settings
(a)'NUMBAS_PATH':
(b) 'PREVIEW_PATH':
(c) 'PREVIEW_URL':

Thanks

Christian Lawson-Perfect

unread,
Jul 16, 2025, 4:51:42 AMJul 16
to numbas...@googlegroups.com
STATIC_URL, STATIC_ROOT, MEDIA_ROOT and MEDIA_URL are all settings from Django. There are links to documentation in the lines above them in settings.py.dist, but for completeness, here's that link again: https://docs.djangoproject.com/en/5.2/ref/settings/

NUMBAS_PATH is the absolute path of the Numbas compiler on your filesystem.

PREVIEW_PATH is the absolute path to where exam previews should be stored, on your filesystem. 

PREVIEW_URL is the URL under which exam previews are served. You need to configure your web server to serve files from PREVIEW_PATH under this URL. If you followed the instructions at https://docs.numbas.org.uk/en/latest/server-installation/ubuntu-web.html#configuration then the values in settings.py.dist will work.


--
You received this message because you are subscribed to the Google Groups "Numbas Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to numbas-users...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/numbas-users/36c2aa4f-82dc-4cfa-968b-07e8fe0f2bbcn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages