Commit 99cd9bf8 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

this is a work in progress-- merely pushing it up for help

parent 9cc87c9d
......@@ -18,14 +18,8 @@ class StyledSeachForm( SearchForm ):
}),
)
# build a trajectory
<<<<<<< HEAD
# create a new trajectory
class NewTrajectoryForm( ModelForm ):
=======
class CreatePersonalProgramListForm( ModelForm ):
>>>>>>> 56146d0bc3dfccfc13208302c365932288fe58be
# def __init__(self, *args, **kwargs):
class Meta:
......@@ -56,6 +50,11 @@ class CreatePersonalProgramListForm( ModelForm ):
# the user selects the courses they are allowed to take but
# this needs to be presented in a dramatically different way than
# just some silly dropdown
# build a trajectory
class BuildTrajectoryForm( ModelForm ):
# def __init__(self, *args, **kwargs):
class Meta:
model = Trajectory
fields = ('name', 'courses',
......@@ -80,10 +79,8 @@ class CreatePersonalProgramListForm( ModelForm ):
'placeholder' = 'Name Your Trajectory',
}),
}
class BuildTrajectoryForm(ModelForm):
model = Trajectory
class StudentEditInfoForm( ModelForm ):
class StudentUpdateForm( ModelForm ):
# def __init__(self, *args, **kwargs):
class Meta:
......@@ -115,18 +112,4 @@ class StudentEditInfoForm( ModelForm ):
}),
}
# class SelectYourCourses( ModelForm ):
# needs to connect with a Student's completedCourses field
# class Meta:
# models = Course
# widgets = {
# department abbreviation
# course number
# name
# }
# def SelectCoursesForm ?
......@@ -2,7 +2,7 @@ from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from model_uitls.models import TimeStampedModel
from model_utils.models import TimeStampedModel
from autoslug import AutoSlugField
class Course(TimeStampedModel):
......@@ -85,7 +85,6 @@ class Program(TimeStampedModel):
isCompleted = models.BooleanField(False)
class Meta:
abstract = True
ordering = ('name',)
def __unicode__(self):
......@@ -108,6 +107,37 @@ class Minor(Program):
class GenEd(Program):
pass
class Trajectory(TimeStampedModel):
name = models.CharField(max_length = 150)
slug = AutoSlugField(populate_from='name',unique=True)
owner = models.ForeignKey(User)
# Takes courses
previousCourses = models.ManyToManyField('Trajectory',)
# the newly added courses for that trajectory
courses = models.ManyToManyField('Course',)
# def getPreviousTrajectory(Trajectory):
# return Trajectory
# the program(s) that this trajectory is completing
whichPrograms = models.ManyToManyField('Program',)
# whether or not the trajectory can be seen by others
isPublic = models.BooleanField()
# semesters since entering college
semester = models.IntegerField()
class Meta:
ordering = ('name',)
verbose_name_plural = "trajectories"
def get_absolute_url(self):
return 'my-trajectories/%s/' % self.slug
# should inherit from the standard Django User Model
class Student(models.Model):
......@@ -141,33 +171,3 @@ def create_user_profile(sender, instance, created, **kwargs):
post_save.connect(create_user_profile, sender=User)
class Trajectory(TimeStampedModel):
name = models.CharField(max_length = 150)
slug = AutoSlugField(populate_from='name',unique=True)
owner = models.ForeignKey(User)
# Takes courses
previousCourses = models.ManyToManyField('Trajectory',)
# the newly added courses for that trajectory
courses = models.ManyToManyField('Course',)
# def getPreviousTrajectory(Trajectory):
# return Trajectory
# the program(s) that this trajectory is completing
whichPrograms = models.ManyToManyField('Program',)
# whether or not the trajectory can be seen by others
isPublic = models.BooleanField()
# semesters since entering college
semester = models.IntegerField()
class Meta:
ordering = ('name',)
verbose_name_plural = "trajectories"
def get_absolute_url(self):
return 'my-trajectories/%s/' % self.slug
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