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

from django.contrib import admin

from apps.authentication.models import OnlineUser

class OnlineUserAdmin(admin.ModelAdmin):
    model = OnlineUser
    list_display = ['username', 'first_name', 'last_name', 'field_of_study',]

admin.site.register(OnlineUser, OnlineUserAdmin)<commit_msg>Added fieldsets to admin site.<commit_after># -*- coding: utf-8 -*-

from django.contrib import admin
from django.utils.translation import ugettext as _

from apps.authentication.models import OnlineUser

class OnlineUserAdmin(admin.ModelAdmin):
    model = OnlineUser
    list_display = ['username', 'first_name', 'last_name', 'field_of_study', 'is_online',]
    list_filter = ('is_staff', 'is_superuser', 'is_active', 'groups')
    fieldsets = (
        (None, {'fields': ('username', 'password')}),
        (_('Personal info'), {'fields': ('first_name', 'last_name', 'email', 'phone_number', )}),
        (_('Studieinformasjon'), {'fields': ('ntnu_username', 'field_of_study', 'started_date', 'compiled',)}),
        (_('Address'), {'fields': ('address', 'zip_code',)}), 
        (_('Important dates'), {'fields': ('last_login', 'date_joined',)}),
        (_('Permissions'), {'fields': ('is_active', 'is_staff', 'is_superuser',
                                       'groups', 'user_permissions')}),
    )
    filter_horizontal = ('groups', 'user_permissions',)

admin.site.register(OnlineUser, OnlineUserAdmin)
{'fraction_non_alphanumeric': 0.1754507628294036, 'fraction_numerical': 0.0013869625520110957, 'mean_word_length': 4.486692015209125, '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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1655778', 'n_tokens_mistral': 439, 'n_tokens_neox': 429, 'n_words': 95}