]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/models/user.py
Merge pull request #2 from udacity/update_django
[osqa.git] / forum / models / user.py
index 695501f53113a531b41c67ecc97ff979bbe071a3..043761481eae3a81989c341eb15ae2e992e05ace 100644 (file)
@@ -165,8 +165,8 @@ class User(BaseModel, DjangoUser):
         #todo: temporary thing, for now lets just assume that the site owner will always be the first user of the application
         return self.id == 1
 
-    @property
-    def decorated_name(self):
+
+    def _decorated_name(self):
         username = smart_unicode(self.username)
 
         if len(username) > TRUNCATE_USERNAMES_LONGER_THAN and TRUNCATE_LONG_USERNAMES:
@@ -181,6 +181,10 @@ class User(BaseModel, DjangoUser):
 
         return username
 
+    @property
+    def decorated_name(self):
+        return self._decorated_name()
+
     @property
     def last_activity(self):
         try:
@@ -205,15 +209,6 @@ class User(BaseModel, DjangoUser):
             sub_settings = SubscriptionSettings(user=self)
             sub_settings.save()
 
-    def get_messages(self):
-        messages = []
-        for m in self.message_set.all():
-            messages.append(m.message)
-        return messages
-
-    def delete_messages(self):
-        self.message_set.all().delete()
-
     @models.permalink
     def get_profile_url(self):
         keyword_arguments = {