<commit_before>from django.contrib import admin
from pagedown.widgets import AdminPagedownWidget
from django.db import models
from .models import Date, House


class PageDownAdmin(admin.ModelAdmin):
    formfield_overrides = {
        models.TextField: {'widget': AdminPagedownWidget}
    }


@admin.register(Date)
class DateAdmin(admin.ModelAdmin):
    list_display = ('title', 'location', 'start', 'end')
    list_filter = ['start']
    search_fields = ['title']
    readonly_fields = ['latitude', 'longitude', 'display_name']
    fieldsets = [
        (None,        {'fields': ['title', 'start', 'end', 'attachment', 'location', 'host', 'description']}),
        ('Erweitert', {'fields': ['created', 'latitude', 'longitude', 'display_name'], 'classes': ['collapse']}),
    ]


@admin.register(House)
class HouseAdmin(PageDownAdmin):
    list_display = ('name', 'city', 'price_intern')
    list_filter = ['name', 'price_intern']
    search_fields = ['name', 'city']
    readonly_fields = ['latitude', 'longitude', 'display_name']
    fieldsets = [
        ('Allgemein', {'fields': [
            'name',
            ('street', 'plz', 'city'),
            'state', 'accessibility',
            'website',
            ('image1', 'image2', 'image3'),
            'description',
            ('gmaps_location', 'osm_location')]}),
            ('Kontakt', {'fields': [
            'owner',
            ('contact_name', 'contact_tel', 'contact_email')]}),
            ('Preise', {'fields': [
            ('capacity_house', 'capacity_outdoor'),<commit_msg>Include situation to admin<commit_after>from django.contrib import admin
from pagedown.widgets import AdminPagedownWidget
from django.db import models
from .models import Date, House


class PageDownAdmin(admin.ModelAdmin):
    formfield_overrides = {
        models.TextField: {'widget': AdminPagedownWidget}
    }


@admin.register(Date)
class DateAdmin(admin.ModelAdmin):
    list_display = ('title', 'location', 'start', 'end')
    list_filter = ['start']
    search_fields = ['title']
    readonly_fields = ['latitude', 'longitude', 'display_name']
    fieldsets = [
        (None,        {'fields': ['title', 'start', 'end', 'attachment', 'location', 'host', 'description']}),
        ('Erweitert', {'fields': ['created', 'latitude', 'longitude', 'display_name'], 'classes': ['collapse']}),
    ]


@admin.register(House)
class HouseAdmin(PageDownAdmin):
    list_display = ('name', 'city', 'price_intern')
    list_filter = ['name', 'price_intern']
    search_fields = ['name', 'city']
    readonly_fields = ['latitude', 'longitude', 'display_name']
    fieldsets = [
        ('Allgemein', {'fields': [
            'name',
            ('street', 'plz', 'city'),
            ('situation', 'state'),
            'accessibility',
            'website',
            ('image1', 'image2', 'image3'),
            'description',
            ('gmaps_location', 'osm_location')]}),
            ('Kontakt', {'fields': [
            'owner',
            ('contact_name', 'contact_tel', 'contact_email')]}),
            ('Preise', {'fields': [
            ('capacity_house', 'capacity_outdoor'),
{'fraction_non_alphanumeric': 0.17877629063097514, 'fraction_numerical': 0.0019120458891013384, 'mean_word_length': 3.1686586985391765, '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': '1724786', 'n_tokens_mistral': 927, 'n_tokens_neox': 916, 'n_words': 203}