Created
June 17, 2020 05:11
-
-
Save velotiotech/526fb38b5fc72f087a60d26b48ee9849 to your computer and use it in GitHub Desktop.
Velotio - HashiCorp Consul Part 2 - Django models for our example application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from djongo import models | |
class Blog(models.Model): | |
name = models.CharField(max_length=100) | |
tagline = models.TextField() | |
class Meta: | |
abstract = True | |
class Entry(models.Model): | |
blog = models.EmbeddedModelField( | |
model_container=Blog, | |
) | |
headline = models.CharField(max_length=255) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment