def __init__(self, system, subject): from r2.models.admin_notes import AdminNotesBySystem self.system = system self.subject = subject self.author = c.user.name self.notes = AdminNotesBySystem.in_display_order(system, subject) # Convert timestamps for easier reading/translation for note in self.notes: note["timesince"] = timesince(note["when"]) Templated.__init__(self)
def __init__(self, system, subject): from r2.models.admin_notes import AdminNotesBySystem self.system = system self.subject = subject self.author = c.user.name self.notes = AdminNotesBySystem.in_display_order(system, subject) # Convert timestamps for easier reading/translation for note in self.notes: note["timesince"] = timesince(note["when"]) Templated.__init__(self)
def __init__(self, system, subject, subject_user=None): from r2.models.admin_notes import AdminNotesBySystem self.system = system self.subject = subject self.author = c.user.name self.notes = AdminNotesBySystem.in_display_order(system, subject) self.global_ban = 'yes' if subject_user and subject_user.is_global_banned else 'no' # Convert timestamps for easier reading/translation for note in self.notes: note["timesince"] = timesince(note["when"]) Templated.__init__(self)