django-dynamic-models
django-dynamic-models copied to clipboard
Abstract Model Schema
hey!
Cannot we use the AbstractModelSchema anymore? I looked into your codes and commits, also wiki but I did not solve my problem. I cannot extend the base model with version of 0.3.0.
Any help will be appreciated. Thanks.
hi @iremdereli, it sounds like you're using version 0.1.0
. There were many changes in version 0.2.0
including the removal of AbstractModelSchema
. It was adding a lot of complexity that was unnecessary when it was changed to be a concrete model.
The legacy documentation can still be found here.
The migration to 0.2.0 was breaking and more or less a complete rewrite of the package. There is some more discussion in #22.
I'd recommend upgrading to the latest version of you can. It will be much more stable in the future, and there were just recently some PRs merged to add support for any type of Django field, including Foreign Keys, Many to Many fields, and custom field classes. These features will be released momentarily in 0.4.0.
Happy to discuss your use case further if you would like to provide some code examples.
Actually my question was can we extend the main model schema model, without creating a new one (adding new fields to dynamic_model_modelschema table). I can do that with doing some changes on your code but I wonder if there is an another way to do that.
I see. If you are looking to add more fields to the model, a OneToOneField
to a different model with your extra fields might be your best work around for the moment.
We change this into a feature request to add back AbstractModelSchema
.
thanks.