I am creating shop, but need advise on model/db design on product
part:

class Product(models.Model):
    name = models.CharField(max_length=250)
    typeid = models.IntegerField()
    pdata = models.IntegerField()
    price = ...
    visible = ...

typeid and pdata is for extending product information by product type
(book, music-cd, ..)
typeid is for selecting table (ID1 - productbook, ...)
pdata is pointer to ID in selected table by typeid.


class ProductBook(models.Model):
    product = models.ForeignKey(Product)
    pageno = models.IntegerField()
    author = ...


Question1:

How to edit ProductBook all infomartion in 1 admin page (including
Product entries)?

Question1:

How to create ProductBook and Product in 1 page?
(To avoid 2 steps: 1. create Product, 2. create ProductBook by
assigning to right Product)

--~--~---------~--~----~------------~-------~--~----~
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