Exemple #1
0
    def __repr__(self):
        t = filters.formattime(self.time)
        d = filters.humandelta(datetime.utcnow(), self.time)
        if self.code == JamStatusCode.ANNOUNCED:
            return "Announced for {0}".format(t)
        elif self.code == JamStatusCode.RUNNING:
            return "Running until {0} ({1} left)".format(t, d)
        elif self.code == JamStatusCode.PACKAGING:
            return "Packaging until {0} ({1} left)".format(t, d)
        elif self.code == JamStatusCode.RATING:
            return "Rating until {0} ({1} left)".format(t, d)
        elif self.code == JamStatusCode.PACKAGING:
            return "Finished since {0}".format(t)

        return "Database error."
Exemple #2
0
    def __repr__(self):
        t = filters.formattime(self.time)
        d = filters.humandelta(datetime.utcnow(), self.time)
        if self.code == JamStatusCode.ANNOUNCED:
            return "Announced for {0}".format(t)
        elif self.code == JamStatusCode.RUNNING:
            return "Running until {0} ({1} left)".format(t, d)
        elif self.code == JamStatusCode.PACKAGING:
            return "Packaging until {0} ({1} left)".format(t, d)
        elif self.code == JamStatusCode.RATING:
            return "Rating until {0} ({1} left)".format(t, d)
        elif self.code == JamStatusCode.PACKAGING:
            return "Finished since {0}".format(t)

        return "Database error."
Exemple #3
0
    def __repr__(self):
        t = formattime(self.time)
        d = humandelta(datetime.utcnow(), self.time)
        if self.code == JamStatusCode.ANNOUNCED:
            return f"Announced for {t}"
        elif self.code == JamStatusCode.REGISTRATION:
            return f"Registrations until {t}"
        elif self.code == JamStatusCode.RUNNING:
            return f"Running until {t} ({d} left)"
        elif self.code == JamStatusCode.PACKAGING:
            return f"Packaging until {t} ({d} left)"
        elif self.code == JamStatusCode.RATING:
            return f"Rating until {t} ({d} left)"
        elif self.code == JamStatusCode.PACKAGING:
            return f"Finished since {t}"

        return "Database error."
Exemple #4
0
    def __repr__(self):
        t = formattime(self.time)
        d = humandelta(datetime.utcnow(), self.time)
        if self.code == JamStatusCode.ANNOUNCED:
            return f"Announced for {t}"
        elif self.code == JamStatusCode.REGISTRATION:
            return f"Registrations until {t}"
        elif self.code == JamStatusCode.RUNNING:
            return f"Running until {t} ({d} left)"
        elif self.code == JamStatusCode.PACKAGING:
            return f"Packaging until {t} ({d} left)"
        elif self.code == JamStatusCode.RATING:
            return f"Rating until {t} ({d} left)"
        elif self.code == JamStatusCode.PACKAGING:
            return f"Finished since {t}"

        return "Database error."