[Pulp-dev] [BREAKING] Changes on plugin models
Fabricio Aguiar
fabricio.aguiar at redhat.com
Mon Aug 19 21:11:08 UTC 2019
The PR: https://github.com/pulp/pulpcore/pull/259 for the issue: #4681
<https://pulp.plan.io/issues/4681> is merged
Please update the Detail models on your plugins.
> 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
> Example:
>
> 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:
> https://github.com/pulp/pulpcore/pull/259
> - 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/20190819/34b85bd5/attachment.htm>
More information about the Pulp-dev
mailing list