Пример #1
0
        EmailMessage(subject, content, payment.responsible_mail(), [],
                     receivers).send()

    @staticmethod
    def set_mark(payment_delay):
        mark = Mark()
        mark.title = _(
            "Manglende betaling på %s") % payment_delay.payment.description()
        mark.category = 6  # Manglende betaling
        mark.description = _(
            "Du har fått en prikk fordi du ikke har betalt for et arrangement."
        )
        mark.save()

        user_entry = MarkUser()
        user_entry.user = payment_delay.user
        user_entry.mark = mark
        user_entry.save()

    @staticmethod
    def unattend(payment_delay):
        Attendee.objects.get(event=payment_delay.payment.content_object,
                             user=payment_delay.user).delete()


schedule.register(PaymentReminder, day_of_week='mon-sun', hour=7, minute=30)
schedule.register(PaymentDelayHandler,
                  day_of_week='mon-sun',
                  hour=7,
                  minute=45)
Пример #2
0
                                  description=new_repo.description,
                                  updated_at=new_repo.updated_at,
                                  url=new_repo.url,
                                  public_url=new_repo.public_url,
                                  issues=new_repo.issues)
            new_repo.save()

            # Add repository languages
            for language in new_languages:
                new_language = RepositoryLanguage(type=language,
                                                  size=int(
                                                      new_languages[language]),
                                                  repository=new_repo)
                new_language.save()

    @staticmethod
    def get_git_repositories():
        url = git_domain + "/users/dotkom/repos?per_page=60"
        r = requests.get(url)
        data = json.loads(r.text)
        return data

    @staticmethod
    def get_repository_languages(url):
        r = requests.get(url + "/languages")
        data = json.loads(r.text)
        return data


schedule.register(UpdateRepositories, day_of_week="mon-sun", hour=6, minute=0)
Пример #3
0
class Message(object):
    subject = ""
    intro = ""
    date = ""
    deadline = ""
    mark = ""
    contact = ""
    link = ""
    send = False
    end = "\n\nMvh\nLinjeforeningen Online"
    results_message = False
    status = "-"

    committee_mail = ""
    attended_mails = False

    def __str__(self):
        message = "%s %s %s %s %s %s %s" % (
            self.intro,
            self.date,
            self.link,
            self.deadline,
            self.mark,
            self.contact,
            self.end
        )
        return message


schedule.register(FeedbackMail, day_of_week='mon-sun', hour=8, minute=00)
Пример #4
0
        message.committee_message += not_attended_string
        return message

    @staticmethod
    def active_events():
        return AttendanceEvent.objects.filter(automatically_set_marks=True, marks_has_been_set=False,
                                              event__event_end__lt=timezone.now())


class Message():
    subject = ""
    intro = ""
    contact = ""
    not_attended_mails = ""
    send = False
    end = "\n\nMvh\nLinjeforeningen Online"
    results_message = False

    committee_mail = ""
    committee_message = False

    def __str__(self):
        message = "%s %s %s" % (
            self.intro,
            self.contact,
            self.end)
        return message


schedule.register(SetEventMarks, day_of_week='mon-sun', hour=8, minute=0o5)