Skip to content

Instantly share code, notes, and snippets.

@gocreating
Created October 30, 2014 18:56
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 gocreating/4fe51feaa19757d9448e to your computer and use it in GitHub Desktop.
Save gocreating/4fe51feaa19757d9448e to your computer and use it in GitHub Desktop.
from django.db import models
class Field(models.Model):
device_id = models.IntegerField()
field = models.IntegerField()
class Sensor(models.Model):
name = models.CharField(max_length=30)
device_id = models.IntegerField()
fields = models.ForeignKey(Field)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment