Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to use as a mixin? #76

Closed
YPCrumble opened this issue Sep 21, 2023 · 1 comment
Closed

Possibility to use as a mixin? #76

YPCrumble opened this issue Sep 21, 2023 · 1 comment

Comments

@YPCrumble
Copy link

Would it be possible to use a mixin that could implement the SealableModel, seal=True functionality? In particular I'm inheriting from django extensions' TimeStampedModel for a few models that I'd like to try django-seal on.

Thanks for maintaining this repo!

@charettes
Copy link
Owner

Starting with 1.6.1 which was just released you should be able to define a reusable abstract class that fits your need

class BaseModel(SealableModel, TimeStampedModel, seal=True):
    class Meta:
        abstract = True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants