I am using ADL LRS to setup a LRS(Learning Record Store) system for my own use. It uses TIN CAN API
. I am using ubuntu server
As the documentation states, For the setup of LRS, I need to install django adn set it up for LRS. The adl_lrs folder inside the ADL_LRS contains the setting file for django(settings.py). I am bit new to django, so I can not fully understand the meaning of this part of the file-
# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/home/media/media.lawrence.com/media/"
MEDIA_ROOT = '/var/www/adllrs/media/'
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://media.lawrence.com/media/", "http://my-site-name.com/media/"
MEDIA_URL = ''
# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
STATIC_ROOT = ''
# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
STATIC_URL = '/static/'
# Additional locations of static files
STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)
It states-
1. MEDIA_ROOT = '/var/www/adllrs/media/'
which I assume it means is to put the media files like songs and videos, at this location
2. STATIC_ROOT = ''
which I assumes means the path of the static directory which contains the HTML, CSS, js files.
On cloning the git, I setup the LRS, which by the way started but all the CSS broken. I looked into DOM inspector, where the link of CSS files are like-
http://my-site-name.com:8000/static/admin/css/base.css
When I visited the above url to see what's happening, I got following output as HTML(same as I get when visiting homepage, i.e http://my-site-name.com:8000)-
Page not found (404)
Request Method: GET
Request URL: http://my-site-name.com:8000/
Using the URLconf defined in adl_lrs.urls, Django tried these URL patterns, in this order:
^XAPI/
^xapi/
^admin/
The current URL, , didn't match any of these.
My urls.py looks like-
url(r'^XAPI/', include('lrs.urls')),
url(r'^xapi/', include('lrs.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls))
Obviously I am not mentioning my home page in the urls.py which point to the error. So where should I put the CSS,JS files to get the broken CSS fixed and make a default home page for this? and also I have tried to send tin can statements from wordpress, but I could not get the statements on my server. can anyone tell me how to setup a proper ADL LRS on ubuntu.
PS- Do not tell me to read the documentation as I have done it like dozen times. Tell me where I am wrong in implementing the documentation.