From: cain-ish Date: Tue, 22 Mar 2016 13:30:05 +0000 (+0100) Subject: Merge remote-tracking branch 'origin/filmowa' into filmowa X-Git-Url: https://git.mdrn.pl/edumed.git/commitdiff_plain/37b7e864c44294c543e4af7ab374625197f5e539?hp=1bbcf6254ccbfeeaa1aae9ec63d3582ef13ca5a6 Merge remote-tracking branch 'origin/filmowa' into filmowa --- diff --git a/wtem/admin.py b/wtem/admin.py index 56a687d..03c4446 100644 --- a/wtem/admin.py +++ b/wtem/admin.py @@ -155,8 +155,7 @@ class SubmissionAdmin(admin.ModelAdmin): def get_form(self, request, obj=None, **kwargs): return get_form(request, obj) - @staticmethod - def submitted_by(instance): + def submitted_by(self, instance): if instance.contact: return '%s' % ( reverse('admin:contact_contact_change', args=[instance.contact.id]), @@ -166,16 +165,14 @@ class SubmissionAdmin(admin.ModelAdmin): submitted_by.allow_tags = True submitted_by.short_description = "Zgłoszony/a przez" - @staticmethod - def todo(submission): + def todo(self, submission): user = get_current_request().user user_exercises = get_user_exercises(user) user_marks = submission.marks.get(str(user.id), {}) return ','.join([str(e['id']) for e in user_exercises if str(e['id']) not in user_marks.keys()]) todo.short_description = 'Twoje nieocenione zadania' - @staticmethod - def examiners_repr(submission): + def examiners_repr(self, submission): return ', '.join([u.username for u in submission.examiners.all()]) examiners_repr.short_description = 'Przypisani do zgłoszenia'