title: 3 Tiered Ordering Application using Django Admin
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3681258/nested-inlines-in-the-django-admin">Nested inlines in the Django admin?</a>  </p>
  </blockquote>
  
  
  
  <p>I'm developing an application for a catering company, using Python, Django and PostgreSQL. I have tried to use the Django Admin module as a way to add orders. I want to be able to do everything on one page. I am starting to believe it may not be possible.<br>
  Do not worry, only office staff will be using this part of the software, not the general public.  </p>
  
  <p>Our pricing structure works on the number of items per person, multiplied by the people being catered for. </p>
  
  <p>Here is an example:</p>
  
  <hr>
  
  <p><strong>Order for "Fake Company":</strong></p>
  
  <ul>
  <li>Morning Tea of 2 items at $8.00 x 10ppl:&nbsp;&nbsp;&nbsp;&nbsp; #This is what we call a deal, items have no price.
  
  <ul>
  <li>Gluten Free Biscuits x1</li>
  <li>Sausage Roll  x10  </li>
  <li>Biscuits         x9<br>
  &nbsp;</li>
  </ul></li>
  <li>Lunch of 3 items at $10.00 x 10ppl:  
  
  <ul>
  <li>Sausage Roll  x5  </li>
  <li>Sushi         x5  </li>
  <li>Sandwich      x10  </li>
  <li>Sweet Platter x10</li>
  </ul></li>
  </ul>
  
  <hr>
  
  <p><strong>Total: $180</strong></p>
  
  <hr>
  
  <p>&nbsp;  </p>
  
  <p>The way each order is structured in the database is like this:<br>
  -COMPANY<br>
  &nbsp;&nbsp;-SALE (One-TO-One relationship with COMPANY)<br>
  &nbsp;&nbsp;&nbsp;&nbsp;-DEAL_INSTANCE (One-To-One relationship with both SALE and a DEAL)<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-ITEM (Many-TO-Many relationship with DEAL_INSTANCE through a join table, as an item quantity<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;field is required)  </p>
  
  <p>I have managed to get everything but adding items to a DEAL_INSTANCE, on one page. Due to Django Admin not really liking Many-To-Many Relationships defined with the 'through' attribute.</p>
  
  <p>Here is a link to a screenshot of what I already have, just to clarify things (just copy image location to view fullsize): <img src="https://i.stack.imgur.com/VL7BT.png" alt="What I have so far."></p>
  
  <p>So in closing, I ask is it possible to have this whole process on one page using Django Admin?
  If not, what's the best way to go about it using Django and should I change the layout of my database?</p>
  
  <p>Thanks in advance, I know this is a bit of an odd situation to get your head around.
  I am a Django newbie, but proficient in Python; so you may need to hold my hand when it comes to Django.</p>