Created
August 7, 2015 10:39
-
-
Save SafPlusPlus/8087fa8916b7e6a1ed26 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
from django.db import models | |
# Create your models here. | |
class TestModel(models.Model): | |
name = models.CharField(max_length=10) | |
reference = models.ForeignKey('TestModel', blank=True, null=True) | |
def __str__(self): | |
return self.name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment