Custom Open edX Extensions

Hi, I have created an pip installable custom Django app(edx extensions) and even included it(INSTALLED_APPS.append("custom_edx_core")). I have configured the apps.py to add URLs as well, but the URLs are not included.
Contents of apps.py inside the package:

import logging
from django.apps import AppConfig
from edx_django_utils.plugins import PluginSettings, PluginURLs
from openedx.core.djangoapps.plugins.constants import ProjectType, SettingsType

log = logging.getLogger(__name__)


class MyAppConfig(AppConfig):
    name = "custom_edx_core"
    label = "custom_edx_core"
    verbose_name = "My Open edX Plugin"

    plugin_app = {
        PluginURLs.CONFIG: {
            ProjectType.LMS: {
                PluginURLs.NAMESPACE: "custom",
                PluginURLs.REGEX: r"^custom/",
                PluginURLs.RELATIVE_PATH: "urls",
            }
        },
        PluginSettings.CONFIG: {
            ProjectType.LMS: {
                SettingsType.COMMON: {
                    PluginSettings.RELATIVE_PATH: "settings.lms",
                },
            },
            ProjectType.CMS: {
                SettingsType.COMMON: {
                    PluginSettings.RELATIVE_PATH: "settings.cms",
                },
            },
        },
    }

    def ready(self):
        log.debug("{label} is ready.".format(label=self.label))

Not able to understand what is wrong, i am not able to access those URLs added in the urls.py of the package. Any suggestions would be really helpful.

Fixed the issue.
entry_points in setup() was not configured properly.

1 Like