This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Hey!
So I've a project where I need to create a relationship between a Survey and a bunch of Samples.
I decided to use a ManyToMany relationship between Survey and Samples because the Samples are referenced in other surveys.
Now, the problem is that the Samples can be of various types (Core, Bags, etc) which requires a very different set of descriptions according to sample_type. I could just create a Description model, add all the fields I need regardless of sample type and allow them to be set blank. Maybe even hide blank fields with JS when doing forms. But surely, there must be a better way to do this than to have ~5 blank fields set when the sample is not a Core.
Thanks in advance.
Subreddit
Post Details
- Posted
- 6 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/djangolearn...