My model as is: http://dpaste.com/156737/
What I'm trying to figure out is the best method to assign students to
courses. We'd like the ability to have all students in one group,
there are a couple courses that are for all students regardless of
freshman, sophomore, etc. Also, we'd like to have groups for each
class year, Freshman, Sophomore, Junior, Senior, also, we'd like the
option to individually add students to certain courses, so a freshman
could be added to a junior class. Also, we want the option to exclude
individuals from a course, so if all but 5 of the 80 freshman are in a
class, we can add the group to the class, but just exclude those five
(could do so with .exclude() in a query).
So would it make sense to have this in my Courses model?
- A ManyToManyField to groups that include All Students, Freshman,
Sophomores, Juniors, Seniors that will add all students in each group
to a course
- A ManyToManyField with a list of all students to individually add
these students to a course if they're Group is not already added
- A ManyToManyField with a list of all students to individually
EXCLUDE these students to a course if they're Group is added
Splitting them up like you have (individual students, groups, students
to exclude from groups) might be more efficient in terms of storage,
but would probably result in more computation when retrieving data,
which is what your app will be doing most of the time.
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to django-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
>
>