<commit_before>from django.contrib import admin
from django.contrib.sessions.models import Session

# Register your models here.

from .models import Patient, Doctor, Question, Answer, Record, Symptom, Notes, Entity

class PatientAdmin(admin.ModelAdmin):
	list_display = [field.name for field in Patient._meta.get_fields()]

class DoctorAdmin(admin.ModelAdmin):
	list_display = [field.name for field in Doctor._meta.get_fields()]

class AnswerAdmin(admin.ModelAdmin):
	list_display = [field.name for field in Answer._meta.get_fields()]

class QuestionAdmin(admin.ModelAdmin):
	list_display = ('question',)

class EntityAdmin(admin.ModelAdmin):
	list_display = ('name', 'street', 'city', 'state', 'country',)
	# list_display = [field.name for field in Entity._meta.get_fields()]

class RecordAdmin(admin.ModelAdmin):
	# list_display = [field.name for field in Record._meta.get_fields()]
	list_display = ('date', 'user', 'score', 'created_date', 'signed',)

class NotesAdmin(admin.ModelAdmin):
	list_display = [field.name for field in Notes._meta.get_fields()]

class SymptomAdmin(admin.ModelAdmin):
	list_display = [field.name for field in Symptom._meta.get_fields()]

class SessionAdmin(admin.ModelAdmin):
    def _session_data(self, obj):
        return obj.get_decoded()
    list_display = ['session_key', '_session_data', 'expire_date']


admin.site.register(Session, SessionAdmin)
admin.site.register(Patient, PatientAdmin)
admin.site.register(Doctor, DoctorAdmin)
admin.site.register(Answer, AnswerAdmin)
admin.site.register(Question, QuestionAdmin)
admin.site.register(Entity, EntityAdmin)
admin.site.register(Record, RecordAdmin)
admin.site.register(Notes, NotesAdmin)
admin.site.register(Symptom, SymptomAdmin)<commit_msg>add log view to admin file<commit_after>from django.contrib import admin
from django.contrib.sessions.models import Session

# Register your models here.

from .models import Patient, Doctor, Question, Answer, Record, Symptom, Notes, Entity, Log

class PatientAdmin(admin.ModelAdmin):
	list_display = [field.name for field in Patient._meta.get_fields()]

class LogAdmin(admin.ModelAdmin):
	list_display = [field.name for field in Log._meta.get_fields()]

class DoctorAdmin(admin.ModelAdmin):
	list_display = [field.name for field in Doctor._meta.get_fields()]

class AnswerAdmin(admin.ModelAdmin):
	list_display = [field.name for field in Answer._meta.get_fields()]

class QuestionAdmin(admin.ModelAdmin):
	list_display = ('question',)

class EntityAdmin(admin.ModelAdmin):
	list_display = ('name', 'street', 'city', 'state', 'country',)
	# list_display = [field.name for field in Entity._meta.get_fields()]

class RecordAdmin(admin.ModelAdmin):
	# list_display = [field.name for field in Record._meta.get_fields()]
	list_display = ('date', 'user', 'score', 'created_date', 'signed',)

class NotesAdmin(admin.ModelAdmin):
	list_display = [field.name for field in Notes._meta.get_fields()]

class SymptomAdmin(admin.ModelAdmin):
	list_display = [field.name for field in Symptom._meta.get_fields()]

class SessionAdmin(admin.ModelAdmin):
    def _session_data(self, obj):
        return obj.get_decoded()
    list_display = ['session_key', '_session_data', 'expire_date']


admin.site.register(Session, SessionAdmin)
admin.site.register(Log, LogAdmin)
admin.site.register(Patient, PatientAdmin)
admin.site.register(Doctor, DoctorAdmin)
admin.site.register(Answer, AnswerAdmin)
admin.site.register(Question, QuestionAdmin)
admin.site.register(Entity, EntityAdmin)
admin.site.register(Record, RecordAdmin)
admin.site.register(Notes, NotesAdmin)
admin.site.register(Symptom, SymptomAdmin)
{'fraction_non_alphanumeric': 0.1245502352615555, 'fraction_numerical': 0.0, 'mean_word_length': 6.405737704918033, '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': '4979793', 'n_tokens_mistral': 1116, 'n_tokens_neox': 1101, 'n_words': 263}