<s> """<STR_LIT>""" <EOL> from __future__ import unicode_literals <EOL> from __future__ import print_function <EOL> import logging <EOL> logger = logging . getLogger ( __name__ ) <EOL> """<STR_LIT>""" <EOL> from django . conf import settings <EOL> from django . utils . encoding import python_2_unicode_compatible <EOL> from lino . core . tables import VirtualTable <EOL> from lino . core . utils import resolve_model , UnresolvedModel <EOL> from lino . core . utils import resolve_app , require_app_models <EOL> from lino . core . utils import resolve_field , get_field <EOL> from lino . core . utils import obj2str <EOL> from lino . core . utils import obj2unicode <EOL> from lino . core . utils import range_filter <EOL> from lino . core . utils import inrange_filter <EOL> from lino . core . utils import full_model_name <EOL> from lino . core . model import Model <EOL> "<STR_LIT>" <EOL> from lino . core . merge import MergeAction <EOL> from lino . core . actors import Actor <EOL> from lino . core . dbtables import has_fk <EOL> from lino . core . dbtables import Table <EOL> from django . db . models . fields import FieldDoesNotExist <EOL> from django . db import models <EOL> from lino . core . frames import Frame <EOL> from lino . core . tables import VentilatingTable <EOL> from lino . core . actions import action <EOL> from lino . core . actions import Action <EOL> from lino . core . actions import MultipleRowAction <EOL> from lino . core . actions import ShowSlaveTable <EOL> from lino . core . actions import GridEdit , ShowDetailAction <EOL> from lino . core . actions import InsertRow , DeleteSelected <EOL> from lino . core . actions import SubmitDetail , SubmitInsert <EOL> from lino . core . choicelists import ChoiceList , Choice <EOL> from lino . core . workflows import State , Workflow , ChangeStateAction <EOL> from lino . core . actions import NotifyingAction <EOL> from lino . core . fields import fields_list , ImportedFields <EOL> from lino . core . fields import Dummy , DummyField <EOL> from lino . core . fields import CustomField <EOL> from lino . core . fields import RecurrenceField <EOL> from lino . core . fields import IncompleteDateField <EOL> from lino . core . fields import DatePickerField <EOL> from lino . core . fields import NullCharField <EOL> from lino . core . fields import PasswordField <EOL> from lino . core . fields import MonthField <EOL> from lino . core . fields import PercentageField <EOL> from lino . core . fields import QuantityField <EOL> from lino . core . fields import DurationField <EOL> from lino . core . fields import HtmlBox , PriceField , RichTextField <EOL> from lino . core . fields import DisplayField , displayfield , htmlbox <EOL> from lino . core . fields import VirtualField , virtualfield <EOL> from lino . core . fields import RequestField , requestfield <EOL> from lino . core . fields import Constant , constant <EOL> from lino . core . fields import ForeignKey <EOL> from lino . core . fields import CharField <EOL> from lino . core . utils import babelkw <EOL> from lino . core . utils import babel_values <EOL> from lino . utils . choosers import chooser , action_chooser <EOL> from lino . core . layouts import FormLayout , DetailLayout , InsertLayout , Panel <EOL> from lino . core . layouts import ParamsLayout <EOL> from lino . core . layouts import DummyPanel <EOL> from lino . core . signals import on_ui_created , pre_ui_delete , on_ui_updated <EOL> from lino . core . signals import database_connected <EOL> from lino . core . signals import database_ready <EOL> from lino . core . signals import pre_startup , post_startup <EOL> from lino . core . signals import pre_analyze <EOL> from lino . core . signals import post_analyze <EOL> from lino . core . signals import auto_create <EOL> from lino . core . signals import pre_merge <EOL> from lino . core . signals import pre_add_child <EOL> from lino . core . signals import pre_remove_child <EOL> from lino . core . signals import pre_ui_build <EOL> from lino . core . signals import post_ui_build <EOL> from django . db . models . signals import pre_save , post_save <EOL> from django . db . models . signals import pre_init , post_init <EOL> from django . db . models . signals import class_prepared <EOL> from django . db . backends . signals import connection_created <EOL> from django . dispatch import receiver <EOL> from django . db . models . fields import NOT_PROVIDED <EOL> from lino . core . inject import inject_action <EOL> from lino . core . inject import inject_field <EOL> from lino . core . inject import update_model <EOL> from lino . core . inject import update_field <EOL> from lino . core . inject import inject_quick_add_buttons <EOL> from lino . core . inject import do_when_prepared , when_prepared <EOL> from lino . core . utils import ParameterPanel , PseudoRequest <EOL> from lino . utils import IncompleteDate <EOL> from lino . utils . format_date import fdm , fdl , fdf , fdmy <EOL> from lino . utils . format_date import fds as fds_ <EOL> def fds ( d ) : <EOL> """<STR_LIT>""" <EOL> if isinstance ( d , IncompleteDate ) : <EOL> return fds_ ( d . as_date ( ) ) <EOL> return fds_ ( d ) <EOL> dtos = fds <EOL> from lino . utils . format_date import fdl as dtosl <EOL> babelitem = settings . SITE . babelitem <EOL> field2kw = settings . SITE . field2kw <EOL> from lino . utils . mldbc . fields import BabelTextField <EOL> from lino . utils . mldbc . fields import BabelCharField , LanguageField <EOL> from lino . modlib . system . choicelists import Genders , PeriodEvents , YesNo <EOL> from importlib import import_module <EOL> decfmt = settings . SITE . decfmt <EOL> str2kw = settings . SITE . str2kw <EOL> def today ( * args , ** kwargs ) : <EOL> return settings . SITE . today ( * args , ** kwargs ) <EOL> strftime = settings . SITE . strftime <EOL> demo_date = settings . SITE . demo_date <EOL> is_abstract_model = settings . SITE . is_abstract_model <EOL> is_installed = settings . SITE . is_installed <EOL> add_welcome_handler = settings . SITE . add_welcome_handler <EOL> build_media_url = settings . SITE . build_media_url <EOL> build_static_url = settings . SITE . build_static_url <EOL> get_default_language = settings . SITE . get_default_language <EOL> resolve_languages = settings . SITE . resolve_languages <EOL> babelattr = settings . SITE . babelattr <EOL> apps = plugins = settings . SITE . plugins <EOL> def resolve_plugin ( app_label ) : <EOL> return plugins . get ( app_label , None ) <EOL> from django . utils import translation <EOL> get_language = translation . get_language <EOL> from lino . core . roles import SiteStaff , SiteUser , SiteAdmin , login_required <EOL> Required = required = login_required </s>
