Package expedient :: Package common :: Package messaging :: Module models :: Class DatedMessage
[hide private]
[frames] | no frames]

Class DatedMessage

source code


DatedMessage(id, type, datetime, msg_text, sender_id)

Nested Classes [hide private]
  DoesNotExist
  MultipleObjectsReturned

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

Instance Methods [hide private]
 
objects(...)
 
format_date(self) source code
 
format_time(self) source code
 
get_type(self) source code
 
__unicode__(self) source code
 
_base_manager(...)
 
get_next_by_datetime(*moreargs, **morekwargs)
 
get_previous_by_datetime(*moreargs, **morekwargs)
 
get_type_display(*moreargs, **morekwargs)

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 Variables [hide private]
  TYPE_ERROR = 'error'
  TYPE_SUCCESS = 'success'
  TYPE_WARNING = 'warning'
  TYPE_ANNOUNCE = 'announcement'
  TYPE_INFO = 'info'
  TYPE_U2U = 'user2user'
  MSG_TYPE_CHOICES = {'announcement': 'Announcement', 'error': '...
  type = models.CharField("Message type", max_length= 20, choice...
  datetime = models.DateTimeField(auto_now= True, auto_now_add= ...
  users = models.ManyToManyField(User, related_name= "messages",...
  msg_text = models.CharField("Message", max_length= 200)
  sender = models.ForeignKey(User, related_name= "sent_messages"...
  _default_manager = <expedient.common.messaging.models.DatedMes...
  _meta = <Options for DatedMessage>

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

Properties [hide private]

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

Inherited from object: __class__

Class Variable Details [hide private]

MSG_TYPE_CHOICES

Value:
{'announcement': 'Announcement',
 'error': 'Error',
 'info': 'Informational',
 'success': 'Success',
 'user2user': 'From User',
 'warning': 'Warning'}

type

Value:
models.CharField("Message type", max_length= 20, choices= MSG_TYPE_CHO\
ICES.items())

datetime

Value:
models.DateTimeField(auto_now= True, auto_now_add= True, editable= Fal\
se)

users

Value:
models.ManyToManyField(User, related_name= "messages", verbose_name= "\
Recipients")

sender

Value:
models.ForeignKey(User, related_name= "sent_messages", editable= False\
, null= True, blank= True)

_default_manager

Value:
<expedient.common.messaging.models.DatedMessageManager object at 0x8c6\
de2c>