Пример #1
0
 def save(self, *args, **kwargs):
     self.created_by = get_username(
     ) if self.created_by is None else self.created_by
     self.updated_by = get_username()
     self.created_date = timezone.now(
     ) if self.created_date is None else self.created_date
     self.updated_date = timezone.now()
     super(Requests, self).save(*args, **kwargs)
Пример #2
0
    def save(self, *args, **kwargs):

        self.created_by = get_username(
        ) if self.created_by is None else self.created_by
        self.updated_by = get_username()
        self.created_date = timezone.now(
        ) if self.created_date is None else self.created_date
        self.updated_date = timezone.now()

        super(Participation_Type, self).save(*args, **kwargs)
Пример #3
0
    def save(self, *args, **kwargs):

        self.created_by = get_username(
        ) if self.created_by is None else self.created_by
        self.updated_by = get_username()
        self.created_date = timezone.now(
        ) if self.created_date is None else self.created_date
        self.updated_date = timezone.now()
        att, created = Attendance.objects.update_or_create(
            member_id=self.member_id,
            meeting_id=self.meeting_id,
            defaults={
                'present': True,
            })

        super(Participation, self).save(*args, **kwargs)
Пример #4
0
    def save(self, *args, **kwargs):
        req_user = get_username()
        if not req_user is None:
            if not req_user.is_anonymous:
                self.created_by = req_user if self.created_by is None else self.created_by
                self.updated_by = req_user
        self.created_date = timezone.now(
        ) if self.created_date is None else self.created_date
        self.updated_date = timezone.now()

        super(User, self).save(*args, **kwargs)