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

from __future__ import unicode_literals
from . import models
from django.contrib import admin
from django.contrib.auth.admin import GroupAdmin, UserAdmin
from django.contrib.auth.models import Group, User
from django.contrib.admin.sites import AdminSite


class MainAdminSite(AdminSite):
    site_header = 'Miete Administration'
    site_title = 'Seite'
    index_title = 'Übersicht'

main = MainAdminSite(name='admin')

main.register(Group, GroupAdmin)
main.register(User, UserAdmin)


class MieteAdmin(admin.ModelAdmin):
    readonly_fields = ('added',)
    search_fields = ('plz', 'stadtbezirk')
    fieldsets = (
        ('Pflicht', {
         'fields': ('kaltmiete', 'groesse', 'plz', 'stadtbezirk', 'added')}),
        ('Optional', {
         'fields': ('bewohner', 'abschluss', 'erhoehung', 'vermieter')}),
        ('Temporär', {'fields': ('ipaddress',)}),
    )
    list_display = ('kaltmiete', 'groesse', 'plz')
    list_filter = ('plz',)
    date_hierarchy = 'added'

main.register(models.Miete, MieteAdmin)
<commit_msg>improve admin interface<commit_after># -*- coding: utf-8 -*-

from __future__ import unicode_literals
from . import models
from django.contrib import admin
from django.contrib.auth.admin import GroupAdmin, UserAdmin
from django.contrib.auth.models import Group, User
from django.contrib.admin.sites import AdminSite


class MainAdminSite(AdminSite):
    site_header = 'Miete Administration'
    site_title = 'Seite'
    index_title = 'Übersicht'

main = MainAdminSite(name='admin')

main.register(Group, GroupAdmin)
main.register(User, UserAdmin)


class MieteAdmin(admin.ModelAdmin):
    readonly_fields = ('added',)
    search_fields = ('plz', 'stadtbezirk')
    fieldsets = (
        ('Pflicht', {
         'fields': ('kaltmiete', 'groesse', 'plz', 'stadtbezirk', 'added')}),
        ('Optional', {
         'fields': ('bewohner', 'abschluss', 'erhoehung', 'vermieter' 'email')}),
        ('Temporär', {'fields': ('ipaddress',)}),
    )
    list_display = ('kaltmiete', 'groesse', 'plz', 'bewohner', 'abschluss', 'erhoehung', 'vermieter', 'email')
    list_filter = ('plz',)
    date_hierarchy = 'added'

main.register(models.Miete, MieteAdmin)

{'fraction_non_alphanumeric': 0.15554553651938682, 'fraction_numerical': 0.0009017132551848512, 'mean_word_length': 4.2959427207637235, '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': '55546', 'n_tokens_mistral': 738, 'n_tokens_neox': 743, 'n_words': 162}