Mentoring relationships

The mentoring application provides the core of the mentorship management support.


class mentoring.models.Relationship(*args, **kwargs)[source]

The mentoring database is structured around the concept of a “mentoring relationship” between two users. One user will be the mentor and one will be the mentee.


This model is not yet completely set in stone. In particular, it’s unclear whether the ending of the relationship should be recorded in the model or in a related model.


The user who is the mentor in this relationship.


The user who is the mentee in this relationship.


True iff this relationship is currently active.

class mentoring.models.RelationshipManager[source]

A queryset of active relationships.


A queryset of inactive relationships.


A queryset returning all users who are the passed user’s mentees. Only active relationships are considered.


A queryset returning all users who are the passed user’s mentors. Only active relationships are considered.


class mentoring.models.Meeting(*args, **kwargs)[source]

Meetings are recorded for a particular relationship.


The in-database duration is likely to have a ludicrous resolution (maybe microsecond) but using a DurationField in this model has the advantage that it is exposed as a standard Python timedelta object.


It is likely that a “happened” field will need to be added to this model at some point to allow users to specify that a meeting was mistakenly recorded.


The Relationship this meeting is associated with.


The date this meeting was held.


The approximate duration of the meeting.

class mentoring.forms.ReportMentorMeetingForm(*args, **kwargs)[source]

A form which allows a user to record a meeting where they were a mentor. Much like a ModelForm this object provides a single save() method which can be used to save the cleaned data to the database.

Parameters:mentor (django.contrib.auth.models.User) – A required argument which specifies the user who is the mentor.
save(*args, **kwargs)[source]

Save this meeting to the DB.