Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created June 17, 2020 05:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save velotiotech/526fb38b5fc72f087a60d26b48ee9849 to your computer and use it in GitHub Desktop.
Save velotiotech/526fb38b5fc72f087a60d26b48ee9849 to your computer and use it in GitHub Desktop.
Velotio - HashiCorp Consul Part 2 - Django models for our example application
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