Wagtail for Marketing site

42 views
Skip to first unread message

pcliu

unread,
Feb 27, 2018, 10:46:36 PM2/27/18
to General Open edX discussion
Hi there,

I am trying to use wagtail for building marketing site for open edX, which basically follow the work did by @clinton.
 One problem I am facing is the wagtail site and lms are using different sessions, so that they may expire at different time. IS it possible to make the two site s  share user db and sessions? I heard that edx.org is using drupal for home page, and I am wondering how the integration is done.

Thanks,
Pengcheng

Clinton Blackburn

unread,
Feb 27, 2018, 11:04:47 PM2/27/18
to General Open edX discussion
Pengcheng,

If you are building a static site (e.g. you only have HTML, CSS, and JS files), there should be no concept of user state/session. Although not a static site, edx.org does not store any user state. Instead the JS—much of the site is rendered client-side—relies on a cookie set by LMS to determine if the user is logged in and the user's username.

The best way to approach user-specific data for static sites is to pretend you don't have a database, because you don't! I started, but never completed, a demonstration of displaying enrollment status on static pages: https://github.com/edx/marketing-site/tree/clintonb/enrollments. The idea there is to use the session cookie, set by LMS on the naked domain (.edx.org), to authenticate client-side calls to the Enrollment API. At no point are any API requests being made to the non-existent marketing server.

Hope that helps.

Clinton
Reply all
Reply to author
Forward
0 new messages