Hi guys,

I am trying Django's auto admin and I encounter some problems.

The story is that I am working on a Product Category system and in a
class Product, one product has many attributes ( for example: size,
color, weight and so on) , So there is a one to many relationship. I
model it as following (the simplest one):

# models.py
class Product(models.Model):
    name = models.CharField(maxlength=100)
    class Admin:
        pass

class Product_attribute(models.Model):
    name = models.CharField(maxlength=100)
    val   = models.CharField(maxlength=100)
    product = models.ForeignKey(
        Product,min_num_in_admin=5,
        edit_inline=models.TABULAR,
        num_extra_on_change=5
    )
    class Admin:
        pass

So it is possible that I have some default attribue: for example, every
product have color and size, So I hope when I am adding a new Product,
the first two inline items' name value have been already set to 'color'
and 'size'.

Thanks in advance.


--~--~---------~--~----~------------~-------~--~----~
 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to