Re: FileBrowser: Models for media

2009-05-21 Thread patrickk
as mentioned before, one benefit is to _order_ the materials for each course. second, I just prefer to use edit-inlines (foreign keys) instead of m2m-fields (the interface with many-to-many is not really useful, IMHO). patrick On 21 Mai, 17:42, "eric.frederich" wrote: > Another change you made

Re: FileBrowser: Models for media

2009-05-21 Thread eric.frederich
Another change you made was to replace the ManyToMany on Course with a Foreign key to Course from Material. Could you explain the benefit of that? On May 21, 4:36 am, patrickk wrote: > I´d use a slightly different approach: > > class Course(models.Model): >     name = ... > > class Material(mode

Re: FileBrowser: Models for media

2009-05-21 Thread patrickk
I´d use a slightly different approach: class Course(models.Model): name = ... class Material(models.Model): course = models.ForeignKey(Course) media = FileBrowseField(max_length=200, blank=True, null=True) order = models.PositiveIntegerField("Order", blank=True, null=True) the p

FileBrowser: Models for media

2009-05-20 Thread eric.frederich
My application models Training courses. Those courses may have training material in a variety of formats. I came across FileBrowser and it seems real nice. Are any of you using a FileBrowseField in your models? I get the feeling that what I'm doing below is wrong... creating a model that holds