Skip to content

Autodiscovery components.py files #15

@ralfbraendli

Description

@ralfbraendli

Would it be possible to add autodiscovery for components?

Here is an example code for the apps.py file

from django.apps import AppConfig
from django.utils.module_loading import autodiscover_modules


class DjangoWebComponentsAppConfig(AppConfig):
    name = "django_web_components"
    verbose_name = "Django Web Components"

    def ready(self):
        autodiscover_modules("components")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions