def get_form(self, request, obj=None, **kwargs):
return get_form(request, obj)
def get_form(self, request, obj=None, **kwargs):
return get_form(request, obj)
if instance.contact:
return '<a href="%s">%s</a>' % (
reverse('admin:contact_contact_change', args=[instance.contact.id]),
if instance.contact:
return '<a href="%s">%s</a>' % (
reverse('admin:contact_contact_change', args=[instance.contact.id]),
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'
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'
return ', '.join([u.username for u in submission.examiners.all()])
examiners_repr.short_description = 'Przypisani do zgłoszenia'
return ', '.join([u.username for u in submission.examiners.all()])
examiners_repr.short_description = 'Przypisani do zgłoszenia'
examiners = self.examiners_by_exercise.setdefault(exercise_id, [])
if user not in examiners:
examiners.append(user)
examiners = self.examiners_by_exercise.setdefault(exercise_id, [])
if user not in examiners:
examiners.append(user)