Created
February 13, 2015 03:46
-
-
Save jMyles/2bdcc288e7fca764e540 to your computer and use it in GitHub Desktop.
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
class Incident(models.Model): | |
owner = models.ForeignKey(User) | |
class IncidentData(models.Model): | |
key = models.CharField(max_length=255) | |
value = models.CharField(max_length=255) | |
incident = models.ForeignKey(Incident) | |
## Or, if you want to have manager-level control for the IncidentData: | |
class IncidentDataType(models.Model): | |
key = models.CharField(max_length=255) | |
class IncidentData(models.Model): | |
key = models.ForeignKey(IncidentDataType) | |
value = models.CharField(max_length=255) | |
incident = models.ForeignKey(Incident) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment