Commits

Matthew Schinckel committed f50f4ea

Fix issue with unread.
Clean up now() handling.

  • Participants
  • Parent commits 27da761

Comments (0)

Files changed (1)

File notifications/models.py

         Shortcut for the ``django.utils.timesince.timesince`` function of the
         current timestamp.
         """
-        from django.utils.timesince import timesince as timesince_
-        return timesince_(self.timestamp, now)
+        from django.utils.timesince import timesince
+        return timesince(self.timestamp, now())
 
     @property
     def slug(self):
         return id2slug(self.id)
 
     def mark_as_read(self):
-        if self.unread:
-            self.unread = False
+        if self.marked_read_at:
+            self.marked_read_at = now()
             self.save()
 
 
     
     """
     activity_stream_data = {
-        'timestamp': datetime.datetime.utcnow().replace(tzinfo=utc),
+        'timestamp': now(),
         'actor': sender,
         'verb': kwargs.pop('verb'),
         # target: need to add later, only if present, GFK limitations