开放的edx样式的cms不起作用

时间:2015-10-19 04:16:46

标签: openedx

CSS在cms(open edx)中不起作用。我试图编译JS和CSS,但它没有给出任何结果。服务器重启对我没有帮助。这是我在日志中的错误:

public Contact findContact() {
    Contact find = null;
    System.out.println("Enter the LAST NAME of the contact you'd like to find: ");
    String tempLastName = scan.nextLine();
    for (Contact temp : card) {
        if (temp.getLastName().equalsIgnoreCase(tempLastName)) {
            System.out.println("\nCONTACT FOUND:");
            System.out.println(temp);
            find = temp;
            break;
        }
    }
    if (find == null) {
        System.out.println("Sorry but " + tempLastName + " is not located in this address book");
    }
    return find;
}

=============================================== ==================

frank帮助我解决了我的问题

[__init__.py:42] - staticfiles_storage couldn't find path css/cms-style-vendor-tinymce-content.css: The file 'css/cms-style-vendor-tinymce-content.css' could not be found with <cms.lib.django_require.staticstorage.OptimizedCachedRequireJsStorage object at 0x8c1b950>.
[__init__.py:42] - staticfiles_storage couldn't find path css/cms-style-vendor.css: The file 'css/cms-style-vendor.css' could not be found with <cms.lib.django_require.staticstorage.OptimizedCachedRequireJsStorage object at 0x8c1b950>.
[__init__.py:42] - staticfiles_storage couldn't find path css/studio-main.css: The file 'css/studio-main.css' could not be found with <cms.lib.django_require.staticstorage.OptimizedCachedRequireJsStorage object at 0x8c1b950>.
[shortcuts.py:56] - Cannot find corresponding link for name: ROOT
[shortcuts.py:56] - Cannot find corresponding link for name: TOS
[shortcuts.py:56] - Cannot find corresponding link for name: PRIVACY

2 个答案:

答案 0 :(得分:6)

编译静态资产后,您应该运行collectstatic。

    sudo -H -u edxapp bash

    source /edx/app/edxapp/edxapp_env

    cd /edx/app/edxapp/edx-platform

    python manage.py cms --settings=aws collectstatic --noinput

    python manage.py lms --settings=aws collectstatic --noinput

答案 1 :(得分:1)

sudo -H -u edxapp bash
source /edx/app/edxapp/edxapp_env
cd /edx/app/edxapp/edx-platform
paver update_assets cms --settings=aws
paver update_assets lms --settings=aws

python manage.py cms --settings=aws collectstatic --noinput
python manage.py lms --settings=aws collectstatic --noinput

sudo /edx/bin/supervisorctl restart edxapp:
sudo /edx/bin/supervisorctl restart edxapp_worker: