Decorators: registry.register_document vs INDEX.doc_type

Sometimes I see decorators:

from django_elasticsearch_dsl import Index
INDEX = Index(settings.ELASTICSEARCH_INDEX_NAMES[__name__])

@INDEX.doc_type

and

from django_elasticsearch_dsl.registries import registry
from articles.models import Article

@registry.register_document

what are the differences between the two decorators?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.