Z
Z
zkweb2015-10-01 11:07:29
Django
zkweb, 2015-10-01 11:07:29

How to implement this relationship in Django?

I’m new to Django and I immediately propose a scheme
be7f07785459467b86ce5e5d33862278.JPG
In App 1, all connections work well, namely, what I needed was RequestInline TabularInline
Question: how can I do the same functionality in App 2, i.e. I also need to display RequestInline in the App2 admin panel TabularInline having contract_id field in Rzi model

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2015-10-02
@sim3x

Contract
  name = Text

ServiceName
  name = Text

Request
  contract = ForeignKey(Contract)
  service = ManyToMany(ServiceName)

RZI
  contract = ForeignKey(Contract)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question