EventUserMap

Qualified name: intranet.apps.events.models.EventUserMap

class intranet.apps.events.models.EventUserMap(*args, **kwargs)[source]

Bases: Model

Represents a mapping between events and users.

These attributes would be a part of the Event model, but if they are, the last updated date is changed whenever a student sees or hides an event.

Access these through event.user_map

If you are checking to see whether a user has hidden an event, use: >>> Event.objects.hidden_events(user)

event

The one-to-one mapping between this object and the Event it is for

Type:

Event

users_hidden

A many-to-many field of Users who have hidden this event

Type:

UserQuerySet

Parameters:

id (AutoField) – Primary key: ID

Relationship fields:

Parameters:

Methods

Attributes

event

Type: OneToOneField to Event

event_id

Internal field, use event instead.

id

Type: AutoField

objects

users_hidden

Type: ManyToManyField to User