dj-stripe / dj-stripe

dj-stripe automatically syncs your Stripe Data to your local database as pre-implemented Django Models allowing you to use the Django ORM, in your code, to work with the data making it easier and faster.
https://dj-stripe.dev
MIT License
1.56k stars 476 forks source link

Use AbstractModels #2056

Closed mcosti closed 3 weeks ago

mcosti commented 3 weeks ago

Is your request related to a problem? Please describe. We use a few custom tracking mechanisms in our project which need some extra fields on the models. This is not possible in the current setup.

Describe the solution you'd like A configurable setting in settings.py that allows us to point to the custom (e.g.) Subscription model that extends an AbstractSubscription.

Additional context We tried to change our approach by using a proxy model, and that helps for adding some properties and methods, but it's not a complete solution as signals still need to be added on the original model, not on the proxy.

Thank you for the great work

jleclanche commented 3 weeks ago

I doubt we will do this, as it's a significant hurdle to maintain and indirections of this type are bad. What are you trying to solve specifically, that cannot be solved with a simple model on your side that has a one-to-one field to the table?