Created
March 30, 2019 18:30
-
-
Save pranavcode/1630f67abb1e0589cd6d1f3b0fed944f to your computer and use it in GitHub Desktop.
Velotio - HashiCorp Consul Part 2 - Django models for our example application
This file contains hidden or 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