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

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/228a7f0e-e492-41b1-bc44-04cdff63127b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to