Stewart:

Take a look at http://www.djangoproject.com/documentation/forms/ for more on creating forms, and simplifying the process.

You will need to have to figure out how you want to handle the item listings. You will either have to have a static set of items or use some fancy _javascript_/DHTML to dynamically create new item listings.

Something like:

<ordered_by_field>

<qty_field><stock_item_field>
<qty_field><stock_item_field>
<qty_field><stock_item_field>
<qty_field><stock_item_field>

<submit>


Corey


On Aug 22, 2006, at 5:59 AM, [EMAIL PROTECTED] wrote:


Hi.

I've just started with Django and I'm liking it! A little confused
about one thing though...

I am experimenting with a basic ordering system, the model for which
look like this:

class stock_item(models.Model):
    name = models.CharField(maxlength=200)

class order(models.Model):
    ordered_by = models.CharField(maxlength=200)

class order_item(models.Model):
    order = models.ForeignKey(order)
    stock_item = models.ForeignKey(stock_item)
    quantity = models.PositiveSmallIntegerField()

This is all fine until I get to a form for placing orders. I envisioned
a form something like this:

<ordered_by_field>

{repeat for each stock_item}
    <stock_item_name><order_item_quantity_field>
{end}

But I'm having some trouble writing the view code for it, does anyone
have any pointers?

Thanks,
Stewart.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to