<commit_before># -*- coding: utf-8 -*-

from __future__ import unicode_literals, division

from xue.tutor.models import *
from django.contrib import admin


class TutorProjectAdmin(admin.ModelAdmin):
    list_display = (
            'get_teacher_name',
            'teacher',
            'name',
            'year',
            )

    list_filter = (
            'teacher__profile__realname',
            'year',
            )


class StudentApplicationAdmin(admin.ModelAdmin):
    list_display = (
            'student',
            'get_student_realname',
            'get_student_year',
            'get_student_major',
            'get_student_klass',
            'get_student_political',
            'status',
            )

    list_filter = (
            'status',
            'student__central_info__klass__major',
            'student__central_info__klass',
            'student__central_info__political',
            )


admin.site.register(TutorProject, TutorProjectAdmin)
admin.site.register(StudentProject)
admin.site.register(StudentApplication, StudentApplicationAdmin)


# vim:ai:et:ts=4:sw=4:sts=4:fenc=utf-8<commit_msg>改进模型的管理界面呈现 #3<commit_after># -*- coding: utf-8 -*-

from __future__ import unicode_literals, division

from xue.tutor.models import *
from django.contrib import admin


class TutorProjectAdmin(admin.ModelAdmin):
    list_display = (
            'get_teacher_name',
            'teacher',
            'name',
            'year',
            )

    list_filter = (
            'year',
            )


class StudentApplicationAdmin(admin.ModelAdmin):
    list_display = (
            'student',
            'get_student_realname',
            'status',
            'get_student_year',
            'get_student_major',
            'get_student_klass',
            'get_student_political',
            )

    list_filter = (
            'status',
            'student__central_info__klass__major',
            'student__central_info__klass',
            'student__central_info__political',
            )


admin.site.register(TutorProject, TutorProjectAdmin)
admin.site.register(StudentProject)
admin.site.register(StudentApplication, StudentApplicationAdmin)


# vim:ai:et:ts=4:sw=4:sts=4:fenc=utf-8
{'fraction_non_alphanumeric': 0.10120913569189431, 'fraction_numerical': 0.0049261083743842365, 'mean_word_length': 2.1687943262411347, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5352185', 'n_tokens_mistral': 672, 'n_tokens_neox': 668, 'n_words': 91}