예제 #1
0
파일: models.py 프로젝트: TheGU/django-pm
 def __unicode__(self):
     return self.subject or format_subject(self.body, from_body=True) 
예제 #2
0
파일: models.py 프로젝트: TheGU/django-pm
 def save(self):
     "This method is overridden to clean data."
     if self.subject:
         self.subject = format_subject(self.subject)
     self.body = format_body(self.body)
     super(Message, self).save()
예제 #3
0
파일: forms.py 프로젝트: TheGU/django-pm
 def clean_subject(self):
     return format_subject(self.cleaned_data['subject'])