<commit_before>from django.contrib import admin
from django.apps import apps
from .models import *
from django.forms import BaseInlineFormSet

# app = apps.get_app_config('course')

# for model_name, model in app.models.items():
#     admin.site.register(model)

class BasicAdmin(admin.ModelAdmin):
    class Media:
        css = { "all" : ("course/admin.css",) }


class CourseAdmin(BasicAdmin):
    icon = '<i class="material-icons">class</i>'
    list_display = ('name', 'code', 'description')
    ordering = ('name',)

admin.site.register(Course, CourseAdmin)


class CourseClassAdmin(BasicAdmin):
    icon = '<i class="material-icons">people</i>'
    list_display = ('code', 'start_date', 'end_date')
    ordering = ('start_date', 'code',)

admin.site.register(CourseClass, CourseClassAdmin)

<commit_msg>Change fields of User list (Admin)<commit_after>from django.contrib import admin
from django.apps import apps
from .models import *
from django.forms import BaseInlineFormSet
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User

# app = apps.get_app_config('course')

# for model_name, model in app.models.items():
#     admin.site.register(model)

UserAdmin.list_display = ('email', 'first_name', 'last_name', 'last_login')

admin.site.unregister(User)
admin.site.register(User, UserAdmin)


class BasicAdmin(admin.ModelAdmin):
    class Media:
        css = { "all" : ("course/admin.css",) }


class CourseAdmin(BasicAdmin):
    icon = '<i class="material-icons">class</i>'
    list_display = ('name', 'code', 'description')
    ordering = ('name',)

admin.site.register(Course, CourseAdmin)


class CourseClassAdmin(BasicAdmin):
    icon = '<i class="material-icons">people</i>'
    list_display = ('code', 'start_date', 'end_date')
    ordering = ('start_date', 'code',)

admin.site.register(CourseClass, CourseClassAdmin)


{'fraction_non_alphanumeric': 0.14704315396909962, 'fraction_numerical': 0.0, 'mean_word_length': 4.850467289719626, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '4176830', 'n_tokens_mistral': 587, 'n_tokens_neox': 578, 'n_words': 135}