<commit_before>from django.contrib import admin
from .models import *

class SubCourseAdmin(admin.ModelAdmin):
    list_filter = ['parent_course__name']
    list_display = ['__unicode__', 'batch_no',
                    'reg_open_date', 'reg_close_date']
    search_fields = ['parent_course__name']

admin.site.register(Course)
admin.site.register(SubCourse, SubCourseAdmin)
admin.site.register(Instructor)
admin.site.register(Graduate)
admin.site.register(Media_File)
admin.site.register(Work)
admin.site.register(NewStudent)
admin.site.register(IndexBG)<commit_msg>Making it possible to search for users, instead of selecting from a dropdown menu<commit_after>from django.contrib import admin
from .models import *

class SubCourseAdmin(admin.ModelAdmin):
    list_filter = ['parent_course__name']
    list_display = ['__unicode__', 'batch_no',
                    'reg_open_date', 'reg_close_date']
    search_fields = ['parent_course__name']

class InstructorAdmin(admin.ModelAdmin):
    raw_id_fields = ['user']

class GraduateAdmin(admin.ModelAdmin):
    raw_id_fields = ['user']

class NewStudentAdmin(admin.ModelAdmin):
    raw_id_fields = ['user']

admin.site.register(Course)
admin.site.register(SubCourse, SubCourseAdmin)
admin.site.register(Instructor, InstructorAdmin)
admin.site.register(Graduate, GraduateAdmin)
admin.site.register(Media_File)
admin.site.register(Work)
admin.site.register(NewStudent, NewStudentAdmin)
admin.site.register(IndexBG)
{'fraction_non_alphanumeric': 0.11285909712722299, 'fraction_numerical': 0.0, 'mean_word_length': 5.773148148148148, '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': '2682650', 'n_tokens_mistral': 458, 'n_tokens_neox': 440, 'n_words': 81}