Did I find the right examples for you? yes no

All Samples(14)  |  Call(10)  |  Derive(0)  |  Import(4)

src/d/j/django-discussions-0.3.1.3/discussions/models/base.py   django-discussions(Download)
                                  MessageManager)
 
from ..utils import tznow, get_model_string
 
from model_utils import Choices
    def mark_as_deleted(self, commit=True):
        self.deleted_at = tznow()
        self.status = self.STATUS.deleted
 
        if commit:
            self.save()
 
    def mark_as_read(self, commit=True):
        self.read_at = tznow()
            recipients = recipients.filter(user_id=user.pk)
 
        recipients.update(read_at=tznow(), status=Recipient.STATUS.read)
 
    def add_message(self, body, sender=None, commit=True):
        self.recipient_set.exclude(user=sender).update(status=Recipient.STATUS.unread)
 
        self.updated_at = tznow()
 
        if commit:

src/d/j/django-discussions-HEAD/discussions/models/base.py   django-discussions(Download)
                                  MessageManager)
 
from ..utils import tznow, get_model_string
 
from model_utils import Choices
    def mark_as_deleted(self, commit=True):
        self.deleted_at = tznow()
        self.status = self.STATUS.deleted
 
        if commit:
            self.save()
 
    def mark_as_read(self, commit=True):
        self.read_at = tznow()
            recipients = recipients.filter(user_id=user.pk)
 
        recipients.update(read_at=tznow(), status=Recipient.STATUS.read)
 
    def add_message(self, body, sender=None, commit=True):
        self.recipient_set.exclude(user=sender).update(status=Recipient.STATUS.unread)
 
        self.updated_at = tznow()
 
        if commit:

src/d/j/django-discussions-0.3.1.3/discussions/views/base.py   django-discussions(Download)
from .. import settings
from ..compat import User
from ..utils import tznow
 
from pure_pagination import Paginator
        if discussion_ids:
            # Delete all the messages, if they belong to the user.
            now = tznow()
            changed_message_list = set()
            for pk in self.valid_ids(discussion_ids):

src/d/j/django-discussions-HEAD/discussions/views/base.py   django-discussions(Download)
from .. import settings
from ..compat import User
from ..utils import tznow
 
from pure_pagination import Paginator
        if discussion_ids:
            # Delete all the messages, if they belong to the user.
            now = tznow()
            changed_message_list = set()
            for pk in self.valid_ids(discussion_ids):