上传小部件和混搭后,“我的资源”列表中没有显示资源

时间:2019-01-04 12:57:56

标签: fiware fiware-wirecloud

enter image description here

enter image description here

我的资源列表中没有显示任何小部件和混搭。即使在手动上载后,仍会上载该窗口小部件,但在“我的资源”列表中不可见。再次上传后,显示错误为“小部件已存在”。 我已经从docker和集成的postgres数据库部署了wirecloud。 我是否必须启用wirecloud中的任何设置才能显示小部件和混搭。此外,它还向我显示“我的资源”列表和“小部件”上的消息,如屏幕截图所示。

请在docker-compose.yml文件中找到我正在使用的wirecloud和postgres部分

   postgres:
        container_name: postgres
        hostname: postgres
        restart: always
        image: postgres:latest
        ports:
            - 127.0.0.1:5432:5432
        volumes:
            - ./postgres-data:/var/lib/postgresql/data
        networks:
            - db
        logging:
            options:
                max-size: "100m"
                max-file: "5"


     wirecloud:
            container_name: wirecloud
            hostname: wirecloud
            restart: always
            image: fiware/wirecloud
            ports:
                - 127.0.0.1:8000:8000
            volumes:
                - ./wirecloud_instance:/opt/wirecloud_instance
                - ./static:/var/www/static
                - ./config-idm.sh:/opt/wirecloud_instance/config-idm.sh
                - ./config-django-admin.py:/opt/wirecloud_instance/config-django-admin.py
                - ./change-user-permissions.py:/opt/wirecloud_instance/change-user-permissions.py
            depends_on:
                - postgres
                - fiware-idm
            networks:
                - db
                - frontend
            logging:
                options:
                    max-size: "100m"
                    max-file: "5"

请找到settings.py文件。我尝试使用“ https://wirecloud.readthedocs.io/en/stable/installation_guide/#whoosh-configuration”中提供的Haystack默认搜索配置来运行它,但仍然存在相同的错误。

# -*- coding: utf-8 -*-
# Django settings for wirecloud_instance project.

from os import path
from wirecloud.commons.utils.conf import load_default_wirecloud_conf
from django.core.urlresolvers import reverse_lazy

DEBUG = True
BASEDIR = path.dirname(path.abspath(__file__))
load_default_wirecloud_conf(locals())

USE_XSENDFILE = False

SESSION_COOKIE_NAME = "wcsessionid"
CSRF_COOKIE_NAME = "wccsrftoken"

ADMINS = (
    # ('Your Name', 'your_email@example.com'),
)

MANAGERS = ADMINS


DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',       # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': 'postgres',           # Or path to database file if using sqlite3.
        # The following settings are not used with sqlite3:
        'USER': 'postgres',
        'PASSWORD': 'postgres',
        'HOST': 'postgres',                      # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
        'PORT': '5432',                      # Set to empty string for default.
    }
}




# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = ['*']
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# In a Windows environment this must be set to your system time zone.
TIME_ZONE = 'America/Chicago'

# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'

# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True

# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale.
USE_L10N = True

# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/var/www/example.com/media/"
MEDIA_ROOT = ''

# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://example.com/media/", "http://media.example.com/"
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: "/var/www/example.com/static/"
STATIC_ROOT = '/var/www/static'

# Controls the absolute file path that linked static will be read from and
# compressed static will be written to when using the default COMPRESS_STORAGE.
COMPRESS_ROOT = STATIC_ROOT

# URL prefix for static files.
# Example: "http://example.com/static/", "http://static.example.com/"
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.
# )

# List of finder classes that know how to find static files in
# various locations.
# STATICFILES_FINDERS += (
#     'django.contrib.staticfiles.finders.FileSystemFinder',
#     'django.contrib.staticfiles.finders.DefaultStorageFinder',
# )

# Make this unique, and don't share it with anybody.
SECRET_KEY = '=8&cve7*neymifn7i1e%3rn94o3xid0ib(h91%c96m9f==wwlm'

ROOT_URLCONF = 'wirecloud_instance.urls'

# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION = 'wirecloud_instance.wsgi.application'

INSTALLED_APPS += (
    # 'django.contrib.sites',
   # 'wirecloud.oauth2provider',
    'social_django',
    'wirecloud.fiware',
)

# Login/logout URLs
LOGIN_URL = reverse_lazy('login')
LOGOUT_URL = reverse_lazy('wirecloud.root')
LOGIN_REDIRECT_URL = reverse_lazy('wirecloud.root')

THEME_ACTIVE = "wirecloud.defaulttheme"
DEFAULT_LANGUAGE = 'browser'

FIWARE_IDM_SERVER = "http://fiwareidm:3000"
SOCIAL_AUTH_FIWARE_KEY = "8d111720-68ae-45bc-b342-xxxxxxxx"
SOCIAL_AUTH_FIWARE_SECRET = "8598084e-9b6a-4816-b8ca-xxxxxxx"
# WGT deployment dirs
CATALOGUE_MEDIA_ROOT = path.join(BASEDIR, 'catalogue_resources')
GADGETS_DEPLOYMENT_DIR = path.join(BASEDIR, 'widget_files')

# Cache settings
CACHES = {
    'default': {
        'BACKEND': 'wirecloud.platform.cache.backends.locmem.LocMemCache',
        'OPTIONS': {
            'MAX_ENTRIES': 3000,
        },
    }
}

# WireCloud autodiscover Wirecloud plugins by default. Uncomment this for settings
# the list of plugins manually.
#
# WIRECLOUD_PLUGINS = (
#     'wirecloud.oauth2provider.plugins.OAuth2ProviderPlugin',
#     'wirecloud.fiware.plugins.FiWarePlugin',
# )

AUTHENTICATION_BACKENDS = (
     'wirecloud.fiware.social_auth_backend.FIWAREOAuth2',
     'django.contrib.auth.backends.ModelBackend',
)


NOT_PROXY_FOR = ['localhost', '127.0.0.1']

0 个答案:

没有答案