Package expedient :: Package clearinghouse :: Package users :: Module models :: Class UserProfile
[hide private]
[frames] | no frames]

Class UserProfile

source code


Additional information about a user.

Nested Classes [hide private]
  DoesNotExist
  MultipleObjectsReturned

Inherited from django.db.models.base.Model: __metaclass__

Instance Methods [hide private]
 
__unicode__(self) source code
 
objects(...)

Inherited from django.db.models.base.Model: __eq__, __hash__, __init__, __ne__, __reduce__, __repr__, __str__, clean, clean_fields, date_error_message, delete, full_clean, prepare_database_save, save, save_base, serializable_value, unique_error_message, validate_unique

Inherited from django.db.models.base.Model (private): _collect_sub_objects, _get_FIELD_display, _get_next_or_previous_by_FIELD, _get_next_or_previous_in_order, _get_pk_val, _get_unique_checks, _perform_date_checks, _perform_unique_checks, _set_pk_val

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Methods [hide private]
UserProfile
get_or_create_profile(cls, user)
Gets the user's profile if available or creates one if one doesn't exist
source code
Class Variables [hide private]
  _base_manager = <django.db.models.manager.Manager object at 0x...
  _default_manager = <django.db.models.manager.Manager object at...
  _meta = <Options for UserProfile>

Inherited from django.db.models.base.Model (private): _deferred

Instance Variables [hide private]
auth.models.User user = models.ForeignKey(User, unique= True)
the user to whom this UserProfile belongs
str affiliation = models.CharField(max_length= 100, default= "")
The organization to which the user is affiliated
Properties [hide private]

Inherited from django.db.models.base.Model: pk

Inherited from object: __class__

Method Details [hide private]

get_or_create_profile(cls, user)
Class Method

source code 

Gets the user's profile if available or creates one if one doesn't exist

Parameters:
  • user (auth.models.User) - the User whose UserProfile to get or create
Returns: UserProfile
user's profile

Class Variable Details [hide private]

_base_manager

Value:
<django.db.models.manager.Manager object at 0x8d89c0c>

_default_manager

Value:
<django.db.models.manager.Manager object at 0x8d89c0c>