Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Business Data 1
- ---Product A
- ---Product B
- Business Data 2
- ---Product A
- Business 1: Joe's Plumbing, located at ... ... ...
- ---Product A, standard ad appearing in category 3, with text "awesome plumbing"
- ---Product B, cooler ad appearing in category 9, with text "cheap plumbing"
- Business 2: Joe's Burgers, located at ... ... ...
- ---Product A, standard ad appearing in category 4, with text "zzz"
- class Business(models.Model):
- name = models.CharField(max_length=255)
- address = models.MagicAddressField()
- class Ad(models.Model):
- category = models.ForeignKey(Category)
- text = models.CharField(max_length=255)
- business = models.ForeignKey(Business)
- class Ad(Product):
- objects = ProductManager()
- category = models.ForeignKey(Category)
- text = models.CharField(max_length=255)
- business = models.ForeignKey(Business)
Add Comment
Please, Sign In to add comment