[Pulp-dev] [BREAKING] Changes on plugin models

Fabricio Aguiar fabricio.aguiar at redhat.com
Mon Aug 12 14:35:15 UTC 2019

On August 19th due to issue #4681 <https://pulp.plan.io/issues/4681> we are
gonna have changes on how to subclass Master/Detail models in plugins.

After August 19th we should define the default_related_name

class FileContent(Content):
    """    The "file" content type.
    Fields:        digest (str): The SHA256 HEX digest.    """
    TYPE = 'file'
    digest = models.TextField(null=False)

    class Meta:
        default_related_name = "%(app_label)s_%(model_name)s"

This change is to avoid name conflicts between plugins.

Related PRs:
- Making default_related_name required:
- Docs: https://github.com/pulp/pulpcore-plugin/pull/119
- Example of updating a plugin: https://github.com/pulp/pulp_file/pull/269

Best regards,
Fabricio Aguiar
Software Engineer, Pulp Project
Red Hat Brazil - Latam <https://www.redhat.com/>
+55 11 999652368
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-dev/attachments/20190812/e9514383/attachment.htm>

More information about the Pulp-dev mailing list