Commit b3de967e authored by Matheus Miranda's avatar Matheus Miranda
Browse files

Add CourseTrack model

parent b0ef725d
...@@ -327,6 +327,31 @@ class Course(models.Model): ...@@ -327,6 +327,31 @@ class Course(models.Model):
CourseMaterial.objects.create(course=self) CourseMaterial.objects.create(course=self)
class CourseTrack(models.Model):
name = models.CharField(
_('Name'),
max_length=255,
blank=True,
)
slug = AutoSlugField(
_('Slug'),
populate_from="name",
unique=True
)
courses = models.ManyToManyField(
Course,
verbose_name='courses',
blank=True,
)
class Meta:
verbose_name = _('Course Track')
verbose_name_plural = _('Course Tracks')
def __str__(self):
return self.name
class CourseStudent(models.Model): class CourseStudent(models.Model):
user = models.ForeignKey( user = models.ForeignKey(
settings.AUTH_USER_MODEL, settings.AUTH_USER_MODEL,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment