intranet.apps.groups package


intranet.apps.groups.forms module

class intranet.apps.groups.forms.GroupForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]

Bases: django.forms.models.ModelForm

class Meta[source]

Bases: object

fields = ['name', 'permissions']

alias of intranet.apps.groups.models.Group

declared_fields = {}

intranet.apps.groups.models module

class intranet.apps.groups.models.Group(*args, **kwargs)[source]

Bases: django.contrib.auth.models.Group

This Group model is really just the default Django django.contrib.auth.models.Group, but with a “properties” property which returns or creates the GroupProperties field for that group. Because GroupProperties objects are only created here when they are first accessed, and not on creation or edit, you must always access them directly through the Group object, and not through GroupProperties.

This presents some complications. All model-level relationships for a group should use the Django contrib.auth.models.Group object, and not the custom one defined here. You will see this done, to avoid confusion, like:

from django.contrib.auth.models import Group as DjangoGroup

with DjangoGroup being referenced in the OneToOne or ManyToMany relationship.



exception DoesNotExist

Bases: django.contrib.auth.models.Group.DoesNotExist

exception MultipleObjectsReturned

Bases: django.contrib.auth.models.Group.MultipleObjectsReturned

objects = <intranet.apps.groups.models.GroupManager object>
property properties
class intranet.apps.groups.models.GroupManager[source]

Bases: django.contrib.auth.models.GroupManager

This GroupManager model is really just the default Django django.contrib.auth.models.GroupManager, just with an extra method.


Return a QuerySet of groups that are student-visible.

class intranet.apps.groups.models.GroupProperties(*args, **kwargs)[source]

Bases: django.db.models.base.Model

The GroupProperties model contains a OneToOneField with the intranet.apps.groups.models.Group object (really just the default django.contrib.auth.models.Group), and contains properties and other app-specific options about a group.


A OneToOneField with a Group object.


Whether the group should be visible to students in group selections.

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned


Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant') is a ForwardOneToOneDescriptor instance.


A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.


A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

intranet.apps.groups.tests module

class intranet.apps.groups.tests.GroupsTest(methodName='runTest')[source]

Bases: intranet.test.ion_test.IonTestCase


intranet.apps.groups.urls module

intranet.apps.groups.views module

Module contents