Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- models:
- class Blueprint(models.Model):
- id = models.AutoField(primary_key=True)
- name = models.CharField(max_length=120)
- description = models.TextField()
- # workloads = models.ManyToManyField('Workload', db_constraint=False)
- # workloads = models.ManyToManyField('self', null=True)
- class Meta:
- ordering = ["name", ]
- class Workload(models.Model):
- id = models.AutoField(primary_key=True)
- blueprints = models.ManyToManyField('Blueprint', db_constraint=False, null=True, blank=True)
- name = models.CharField(max_length=120)
- description = models.TextField()
- image = models.CharField(max_length=120)
- flavor = models.CharField(max_length=120)
- class Meta:
- ordering = ["name", ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement