Created
June 8, 2016 23:20
-
-
Save lightstrike/2f32fac2a3d1ee75a7f7e7184f04336b to your computer and use it in GitHub Desktop.
Student Record Brainstorming
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 StudenAdmin(admin.ModelAdmin): | |
inlines = (StudentRecordInline,) |
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 Student(models.Model): | |
admin_grade = models.IntegerField(null=True) | |
hq_grade = models.IntegerField(null=True) | |
class StudentRecord(models.Model): | |
student = models.ForeignKey(Student) # things like ID, maybe what camp they're attending | |
RECORD_TYPES = ('headquarters', 'admin', 'master') | |
record_type = models.CharField(choices=RECORD_TYPES) | |
grade = models.IntegerField() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment