<commit_before>from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.forms import UserChangeForm

# Register your models here.

from .models import Ambulance, AmbulanceStatus, AmbulanceCapability, \
    AmbulanceLocation, \
    User, UserLocation, \
    Hospital, Equipment, EquipmentCount, UserLocation, \
    Call, Region

# creates the form with new fields using the UserModel
class CustomUserChangeForm(UserChangeForm):
    class Meta(UserChangeForm.Meta):
        model = User

# adds the new fields to the form
class CustomUserAdmin(UserAdmin):
    form = CustomUserChangeForm
    fieldsets = UserAdmin.fieldsets + ((None, {'fields': ('hospitals', 'hospital', 'ambulances', 'ambulance',)}),)

#admin.site.register(User, CustomUserAdmin)
admin.site.register(User)
admin.site.register(Ambulance)
admin.site.register(AmbulanceStatus)
admin.site.register(AmbulanceCapability)
admin.site.register(AmbulanceLocation)
admin.site.register(Region)
admin.site.register(Call)
admin.site.register(Hospital)
admin.site.register(Equipment)
admin.site.register(EquipmentCount)
admin.site.register(UserLocation)<commit_msg>Changed from Ambulances to Ambulance and many other structural changes in the database<commit_after>from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.forms import UserChangeForm

# Register your models here.

from .models import Ambulance, AmbulanceStatus, AmbulanceCapability, \
    AmbulanceLocation, \
    User, UserLocation, \
    Hospital, Equipment, EquipmentCount, UserLocation, \
    Call, Region

# creates the form with new fields using the UserModel
class CustomUserChangeForm(UserChangeForm):
    class Meta(UserChangeForm.Meta):
        model = User

# adds the new fields to the form
class CustomUserAdmin(UserAdmin):
    form = CustomUserChangeForm
    fieldsets = UserAdmin.fieldsets + ((None, {'fields': ('hospitals', 'hospital', 'ambulances', 'ambulance',)}),)

#admin.site.register(User, CustomUserAdmin)
# admin.site.register(User)
admin.site.register(Ambulance)
admin.site.register(AmbulanceStatus)
admin.site.register(AmbulanceCapability)
admin.site.register(AmbulanceLocation)
admin.site.register(Region)
admin.site.register(Call)
admin.site.register(Hospital)
admin.site.register(Equipment)
admin.site.register(EquipmentCount)
admin.site.register(UserLocation)
{'fraction_non_alphanumeric': 0.10020790020790021, 'fraction_numerical': 0.0, 'mean_word_length': 5.8742857142857146, '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': '7177602', 'n_tokens_mistral': 710, 'n_tokens_neox': 677, 'n_words': 167}