Created
May 20, 2009 18:46
-
-
Save bdarcus/115011 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 | |
# an outline of a model for a course | |
# an umbrella organization (school, etc.)? | |
class AcademicSession(models.Model): | |
""" | |
A block of time (such as a semester) during which courses may be | |
offered. | |
""" | |
year = # not sure how to do this in Django | |
term = # need to allow flexibilty here; quarters vs. semesters vs. "weird stuff" | |
class Course(models.Model): | |
""" | |
An abstract course. | |
""" | |
title = models.CharField(max_length=250) | |
subtitle = models.CharField(max_length=250, null=True, blank=True) | |
slug = models.SlugField(prepopulate_from=('title',)) | |
description = models.TextField(null=True, blank=True) | |
outcomes = models.ManyToManyField(Outcome) | |
class Outcome(models.Model): | |
""" | |
An outcome. | |
""" | |
name = models.CharField(max_length=250) | |
description = models.TextField(null=True, blank=True) | |
class CourseOffering(models.Model): | |
""" | |
A course instance, as offered by a particular instructor or set of | |
instructors, in a particular AcademicSession. | |
""" | |
session | |
course | |
instructors | |
students | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment