Ah great, I thought I went over the models documentation but must have
missed just what I was looking for... Thanks, I'll have a go at it.
On 31 Mar, 18:25, "Jonathan Buchanan" <[EMAIL PROTECTED]>
wrote:
> On Mon, Mar 31, 2008 at 2:31 PM, R. Akerman <[EMAIL PROTECTED]> wrote:
>
> > I'm co-writing a site for a student nation (
> > http://en.wikipedia.org/wiki/Nations_at_Swedish_universities) and
> > I've run into some issues in the first step of creating the site,
> > making the models.
>
> > I have a model called Person that describes personal information about
> > a person; name, adress, DOB... No problem here. I'm using the
> > AUTH_PROFILE_MODULE approach to link a User to a Person. No problem
> > here.
>
> > The problem is the next Model and it's relations. It's called
> > "Position" and holds information about a position within the
> > organizational hierarchy and as such should have permissions for the
> > page associated with it. I'm thinking I could just relate it to the
> > django.contrib.auth.permission system and have that sorted that way
> > (not sure about this thou)...
>
> > The biggest problem is that the relation between Person and Position
> > (a many to many relation) is date-limited. It starts at a given date
> > and stops at another given date. Between these 2 dates, the person
> > should have access to the permissions stated in the Position model.
>
> > How can I go about doing this? Any help is welcome, I'm quite new to
> > Django but it appears to be just what we need for our project.
>
> > Robin Åkerman, System technician at Wermlands Nation, Lund, Sweden.
>
> Have you seen the "Many-to-many relationships via an intermediary
> table" [1] example in the documentation? Sounds like what you want,
> with the intermediary table holding the date range.
>
> Regards,
> Jonathan.
>
> [1]http://www.djangoproject.com/documentation/models/m2m_intermediary/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---