Created
August 28, 2018 18:17
-
-
Save chelseatroy/3a5a9718d32a660683f2644b8d2800cb to your computer and use it in GitHub Desktop.
Example of Proxy Model Visualization
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 django.db import models | |
class Visualization(models.Model): | |
name = models.CharField(primary_key=True, max_length=200) | |
description = models.TextField() | |
position = models.IntegerField(default=200) | |
def __repr__ (self): | |
return self.name | |
def __str__ (self): | |
return self.name | |
def from_data(csvfile): | |
raise NotImplementedError("You must implement from_data in your visualization subclass.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment