Re: Multitenant app // Validation / constraints for related fields

2023-01-19 Thread ASAMOAH EMMANUEL
One other approach you could consider is using Django's built-in form and model validation. You could create a custom form class that inherits from the built-in Django `ModelForm` and override the `clean` method to perform your tenant check. For example: class BlogPostForm(forms.ModelForm): de

Multitenant app // Validation / constraints for related fields

2023-01-19 Thread Abeed Visram
Hi there, Long-time lurker / Django user; first-time poster. Ask: Any other ideas for ensuring that ForeignKey relationships are valid? Context / background: I'm working on a multitenant app, and looking at ways of ensuring the integrity of the data in the system. Specifically, I want to ensur