<commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals

# Copyright 2014, Cercle Informatique ASBL. All rights reserved.
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This software was made by hast, C4, ititou at UrLab, ULB's hackerspace

from django.contrib import admin
from .models import User, Inscription


@admin.register(User)
class UserAdmin(admin.ModelAdmin):
    exclude = ('password', 'last_login', 'follow', 'moderated_nodes')
    readonly_fields = ('netid', )
    list_display = ('netid', 'name', 'is_staff', 'is_academic', 'is_representative')
    list_filter = ('is_staff', 'is_academic', 'is_representative', 'last_login')
    search_fields = ('netid', 'first_name', 'last_name')


@admin.register(Inscription)
class InscriptionAdmin(admin.ModelAdmin):
    pass<commit_msg>Nicer admin for user inscriptions<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals

# Copyright 2014, Cercle Informatique ASBL. All rights reserved.
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This software was made by hast, C4, ititou at UrLab, ULB's hackerspace

from django.contrib import admin
from .models import User, Inscription


@admin.register(User)
class UserAdmin(admin.ModelAdmin):
    exclude = ('password', 'last_login', 'follow', 'moderated_nodes')
    readonly_fields = ('netid', )
    list_display = ('netid', 'name', 'is_staff', 'is_academic', 'is_representative')
    list_filter = ('is_staff', 'is_academic', 'is_representative', 'last_login')
    search_fields = ('netid', 'first_name', 'last_name')


@admin.register(Inscription)
class InscriptionAdmin(admin.ModelAdmin):
    readonly_fields = ('user', )
    list_display = ('id', 'user', 'faculty', 'section', 'year')
    list_filter = ('faculty', 'section', 'year')
    search_fields = ('section', )
{'fraction_non_alphanumeric': 0.12016021361815754, 'fraction_numerical': 0.006230529595015576, 'mean_word_length': 5.075675675675676, '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': '1302108', 'n_tokens_mistral': 698, 'n_tokens_neox': 667, 'n_words': 230}