[Fixed]-Proper model defination in django for a widget manager

1👍

If I understood your description correctly, you want a relationship where there can be many emailWidget or TextWidget for one instance of widgetManager.

What you can do in this case is add a ForeignKey field for widgetManager to emailWidget and TextWidget. This way, you can have many instances of the widgets while they refer to the same manager.

I think you may have confused inheritance with model relationships when you said you want to extend widgets from a base class. Perhaps I’m wrong?

Not sure what you mean’t about order of the widget being important either..

👤zubhav

Leave a comment