Advertisement
Guest User

Untitled

a guest
Jan 26th, 2015
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. models:
  2.  
  3. class Blueprint(models.Model):
  4. id = models.AutoField(primary_key=True)
  5. name = models.CharField(max_length=120)
  6. description = models.TextField()
  7. # workloads = models.ManyToManyField('Workload', db_constraint=False)
  8. # workloads = models.ManyToManyField('self', null=True)
  9.  
  10. class Meta:
  11. ordering = ["name", ]
  12.  
  13.  
  14. class Workload(models.Model):
  15. id = models.AutoField(primary_key=True)
  16. blueprints = models.ManyToManyField('Blueprint', db_constraint=False, null=True, blank=True)
  17. name = models.CharField(max_length=120)
  18. description = models.TextField()
  19. image = models.CharField(max_length=120)
  20. flavor = models.CharField(max_length=120)
  21.  
  22. class Meta:
  23. ordering = ["name", ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement