Hi!
I have a question regarding inlines in the Django admin interface.
Currently there are following models:
Jobs - holds the Job-ID, an action (FK JobActions) and execution status
JobActions - holds a list of possible actions (like "create a new customer") [Also has a ManyToMany against JobAttributes - see below]
JobAttributes - A list of attributes that are possible
JobOptions - values for attributes (FK JobAttributes) for a job (FK Jobs)
JobLog - unlimited rows of text-logs (in this case, API dumps), FK Jobs (not of interest here)
An action can be "add new customer". This action needs an attribute "customer name".
This scenario works perfectly, I can create new Jobs that have attributes but I need to add new lines in the inline part of the admin form.
I have added a ManyToMany-field from JobActions to JobAttributes. This gives me a list which action needs which attribute in JobAttributes.
Is it possbile to pre-fill the inline-part of the form with the attributes? This would be much easier for input.
Currently there are no rows, I need to add a new line and choose the attribute for which I would like to add a value.
Think of it like a dynamic (support) contact form where you get different inputs if you choose a different topic.
Is this possible with the admin? The relation (which JobActions needs which JobAttributes) is available.
Thank you very much.
Kevin