<commit_before>from django import forms
from django.db.models import get_model
from django.template.defaultfilters import slugify
from django.utils.translation import ugettext_lazy as _

Page = get_model('fancypages', 'Page')
Category = get_model('catalogue', 'Category')
PageType = get_model('fancypages', 'PageType')
VisibilityType = get_model('fancypages', 'VisibilityType')


DATE_FORMAT = '%d-%m-%Y'


class PageFormMixin(object):

    def update_field_order(self):
        # we need to specify the key order here because 'description' and
        # 'image' are non-model fields that cause an error when added
        # to the metaclass field attribute below
        self.fields.keyOrder = [
            'name',
            'description',
            'image',
            'keywords',
            'page_type',<commit_msg>Fix date format temporarily to work with datepicker in Oscar<commit_after>from django import forms
from django.conf import settings
from django.db.models import get_model
from django.template.defaultfilters import slugify
from django.utils.translation import ugettext_lazy as _

Page = get_model('fancypages', 'Page')
Category = get_model('catalogue', 'Category')
PageType = get_model('fancypages', 'PageType')
VisibilityType = get_model('fancypages', 'VisibilityType')


DATE_FORMAT = getattr(settings, 'FANCYPAGES_DATE_FORMAT', '%Y-%m-%d')


class PageFormMixin(object):

    def update_field_order(self):
        # we need to specify the key order here because 'description' and
        # 'image' are non-model fields that cause an error when added
        # to the metaclass field attribute below
        self.fields.keyOrder = [
            'name',
            'description',
            'image',
            'keywords',
            'page_type',
{'fraction_non_alphanumeric': 0.09633802816901409, 'fraction_numerical': 0.0, 'mean_word_length': 3.4511278195488724, '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': '4201461', 'n_tokens_mistral': 501, 'n_tokens_neox': 484, 'n_words': 150}