<commit_before># -*- coding: utf-8 -*-
"""microcms.admin module, admin site configuration and options.

THIS SOFTWARE IS UNDER BSD LICENSE.
Copyright (c) 2010 <NAME> <<EMAIL>>

Read LICENSE for more informations.
"""
from django import forms
from django.conf import settings
from django.contrib import admin
from django.contrib.flatpages.models import FlatPage
from django.contrib.flatpages.admin import FlatpageForm, FlatPageAdmin
from django.contrib.sites.models import Site
from django.db import models
from django.utils.translation import ugettext_lazy as _


from microcms import settings as microcms_settings
from microcms.models import Page


class PageForm(FlatpageForm):
    class Meta:
        model = Page


class PageAdmin(FlatPageAdmin):
    form = PageForm

    list_display = ('url', 'title', 'pub_date', 'modified_date',
                    'enable_comments', 'author')
    list_display_links = ('url', 'title')
    list_filter = FlatPageAdmin.list_filter + ('author',
                                               'pub_date',
                                               'modified_date')
    fieldsets = (
        (None, {'fields': ('url', 'title', 'content')}),
        (_('Extra'),
         {'classes': ('collapse closed',), 'fields': ('links',)}),

        (_('Advanced options'),
         {'classes': ('collapse closed',),
          'fields': ('enable_comments',
                     'registration_required',
                     'template_name',
                     'sites')}),

        (_('Search Engine Optimization'),
         {'classes': ('collapse closed',), 'fields': ('meta_keywords',
                                                      'meta_description')}),
    )<commit_msg>Explicit is better than implicit<commit_after># -*- coding: utf-8 -*-
"""microcms.admin module, admin site configuration and options.

THIS SOFTWARE IS UNDER BSD LICENSE.
Copyright (c) 2010 <NAME> <<EMAIL>>

Read LICENSE for more informations.
"""
from django import forms
from django.conf import settings
from django.contrib import admin
from django.contrib.flatpages.models import FlatPage
from django.contrib.flatpages.admin import FlatpageForm, FlatPageAdmin
from django.contrib.sites.models import Site
from django.db import models
from django.utils.translation import ugettext_lazy as _


from microcms import settings as microcms_settings
from microcms.models import Page


class PageForm(FlatpageForm):
    class Meta:
        model = Page


class PageAdmin(FlatPageAdmin):
    form = PageForm

    list_display = ('url', 'title', 'pub_date', 'modified_date',
                    'enable_comments', 'author')
    list_display_links = ('url', 'title')
    list_filter = ('sites', 'enable_comments', 'registration_required',
                   'author', 'pub_date', 'modified_date')
    fieldsets = (
        (None, {'fields': ('url', 'title', 'content')}),
        (_('Extra'),
         {'classes': ('collapse closed',), 'fields': ('links',)}),

        (_('Advanced options'),
         {'classes': ('collapse closed',),
          'fields': ('enable_comments',
                     'registration_required',
                     'template_name',
                     'sites')}),

        (_('Search Engine Optimization'),
         {'classes': ('collapse closed',), 'fields': ('meta_keywords',
                                                      'meta_description')}),
    )
{'fraction_non_alphanumeric': 0.12584733274388446, 'fraction_numerical': 0.0029472443265546712, 'mean_word_length': 2.5726315789473686, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4964907', 'n_tokens_mistral': 899, 'n_tokens_neox': 845, 'n_words': 258}