Created
June 18, 2010 07:35
-
-
Save sixthgear/443371 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Language(models.Model): | |
| name = models.CharField(max_length=100) | |
| def __unicode__(self): | |
| return self.name | |
| class Solution(models.Model): | |
| problem = models.ForeignKey(Problem) | |
| author = models.ForeignKey(User) | |
| title = models.CharField(max_length=100, blank=True) | |
| submitted = models.DateField(auto_now_add=True) | |
| def __unicode__(self): | |
| return self.title | |
| class File(models.Model): | |
| solution = models.ForeignKey(Solution) | |
| language = models.ForeignKey(Language) | |
| filename = models.CharField(max_length=50) | |
| source = models.TextField() | |
| def __unicode__(self): | |
| return self.filename |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment