cc1  v2.1
CC1 source code docs
 All Classes Namespaces Files Functions Variables Pages
src.clm.models.group.Group Class Reference

GROUP Model. More...

Classes

class  Meta

Public Member Functions

def __unicode__
def dict

Static Public Member Functions

def get

Static Public Attributes

tuple desc = models.TextField(null=True, blank=True)
 Group's description.
tuple leader = models.ForeignKey(User, related_name='group_leader_set')
 User being leader of this Group.
tuple name = models.CharField(max_length=45)
 Human-friendly name of this group.
tuple users = models.ManyToManyField(User, through='UserGroup')
 "many-to-many" relationship between Group and User defined through UserGroup

Detailed Description

GROUP Model.

Group is an entity uniting Users to enable sharing VMImage resources between them. Each User may belong to any number of Groups.

Definition at line 37 of file group.py.

Member Function Documentation

def src.clm.models.group.Group.__unicode__ (   self)
Returns
(string) name of this Group

Definition at line 54 of file group.py.

def src.clm.models.group.Group.dict (   self)
Returns
(dict) this Group's data
fields:
  • group_id (int) id of this Group
  • leader_id (int) id of this Group's leader
  • leader_login (string) login of this Group's leader
  • leader (string) First name and last name of this Group's leader
  • name (string) this Group's name
  • description (string) this Group's description

Definition at line 69 of file group.py.

def src.clm.models.group.Group.get (   group_id)
static
Parameters
group_id(int) id of the requested Group
Returns
(Group) instance of the requested Group
Exceptions
CLMException('group_get')no such Group

Definition at line 88 of file group.py.

Member Data Documentation

tuple src.clm.models.group.Group.desc = models.TextField(null=True, blank=True)
static

Group's description.

Note
each instance of the model has corresponding non-static attribute

Definition at line 43 of file group.py.

tuple src.clm.models.group.Group.leader = models.ForeignKey(User, related_name='group_leader_set')
static

User being leader of this Group.

Note
each instance of the model has corresponding non-static attribute

Definition at line 39 of file group.py.

tuple src.clm.models.group.Group.name = models.CharField(max_length=45)
static

Human-friendly name of this group.

Note
each instance of the model has corresponding non-static attribute

Definition at line 41 of file group.py.

tuple src.clm.models.group.Group.users = models.ManyToManyField(User, through='UserGroup')
static

"many-to-many" relationship between Group and User defined through UserGroup

Note
each instance of the model has corresponding non-static attribute

Definition at line 45 of file group.py.


The documentation for this class was generated from the following file: