Re: Adding default rows to Django admin inlines

2019-01-28 Thread Kevin Olbrich
Hi! Maybe I did not fully understand but it seems we indeed don't talk about the same. I already got M2M relation. If I access the "Jobs" admin-page, I have the option to add inline-options. On a new object, there are no lines but I can add new. I would like to add lines for the attributes from M

Adding default rows to Django admin inlines

2019-01-19 Thread Mohammad Etemaddar
If I get you right you need to add m2m objects with a default value. In this situation, you can create an intermediate model to build m2m. For example: JobActionRel: job = fk action = fk-to-actions (default=Action.objects.get...) And use it as through model: https://docs.djangoproject.com/en/2.1/t

Adding default rows to Django admin inlines

2019-01-18 Thread Kevin Olbrich
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 JobAttr