<commit_before># -*- coding: UTF-8 -*-
# Copyright 2017 <NAME>
# License: BSD (see file COPYING for details)

"""

.. autosummary::
   :toctree:

   doctests
   demo
   memory
   fixtures



"""

from __future__ import print_function
from __future__ import unicode_literals

from lino.projects.std.settings import *
from lino.api.ad import _


class Site(Site):

    verbose_name = "Lino Avanti!"
    version = '2017.1.0'
    url = "http://avanti.lino-framework.org/"
    demo_fixtures = ['std',
                     # 'all_countries', 'all_languages',
                     'demo', 'demo2']
    user_types_module = 'lino_avanti.lib.avanti.user_types'
    workflows_module = 'lino_avanti.lib.avanti.workflows'
    custom_layouts_module = 'lino_avanti.lib.avanti.layouts'
    migration_class = 'lino_avanti.lib.avanti.migrate.Migrator'

    project_model = 'avanti.Client'
    textfield_format = 'plain'

    def setup_plugins(self):
        super(Site, self).setup_plugins()
        self.plugins.cv.configure(
            person_model = 'avanti.Client')
        # self.plugins.humanlinks.configure(
        #     person_model = 'contacts.Person')
            # person_model = 'avanti.Client')
        # self.plugins.households.configure(
        #     person_model = 'contacts.Person')
            # person_model='avanti.Client')
        self.plugins.cal.configure(
            partner_model='avanti.Client')
        self.plugins.tickets.configure(
            end_user_model='avanti.Client')
        self.plugins.courses.configure(
            # teacher_model='users.User',
            pupil_model='avanti.Client',
            pupil_name_fields='pupil__last_name pupil__first_name')
        self.plugins.coachings.configure(client_model='avanti.Client')
        self.plugins.comments.configure(
            commentable_model='tickets.Ticket')


    def get_installed_apps(self):
        """Implements :meth:`lino.core.site.Site.get_installed_apps`.

        """
        yield super(Site, self).get_installed_apps()
        yield 'lino_avanti.lib.users'
        # yield 'lino.modlib.users'
        yield 'lino_xl.lib.countries'
        yield 'lino_avanti.lib.contacts'
        yield 'lino_avanti.lib.avanti'
        # yield 'lino_xl.lib.households'
        yield 'lino_avanti.lib.households'
        # yield 'lino_welfare.modlib.households'
        # yield 'lino_xl.lib.humanlinks'
        yield 'lino_xl.lib.lists'
        yield 'lino_xl.lib.notes'
        yield 'lino_xl.lib.beid'
        yield 'lino_xl.lib.coachings'
        yield 'lino_xl.lib.cv'
        
        yield 'lino_avanti.lib.courses' # override gen_event_user()
        # yield 'lino_xl.lib.courses'
        # yield 'lino_xl.lib.rooms'
        
        yield 'lino.modlib.plausibility'
        yield 'lino.modlib.export_excel'
        # yield 'lino.modlib.tinymce'
        yield 'lino.modlib.weasyprint'
        yield 'lino_xl.lib.excerpts'
        yield 'lino_xl.lib.appypod'
        
        yield 'lino_noi.lib.faculties'
        yield 'lino_noi.lib.votes'
        yield 'lino_avanti.lib.tickets'
        # yield 'lino_noi.lib.tickets'
        

    def setup_quicklinks(self, user, tb):
        super(Site, self).setup_quicklinks(user, tb)
        a = self.actors.users.MySettings.default_action
        tb.add_instance_action(
            user, action=a, label=_("My settings"))

        Clients = self.actors.avanti.Clients
        tb.add_action(Clients)
        tb.add_action(
            Clients.insert_action,
            label=_("New {}").format(
                Clients.model._meta.verbose_name))
        tb.add_action(Clients, 'find_by_beid')
        <commit_msg>adapt after changes for #1512<commit_after># -*- coding: UTF-8 -*-
# Copyright 2017 <NAME>
# License: BSD (see file COPYING for details)

"""

.. autosummary::
   :toctree:

   doctests
   demo
   memory
   fixtures



"""

from __future__ import print_function
from __future__ import unicode_literals

from lino.projects.std.settings import *
from lino.api.ad import _


class Site(Site):

    verbose_name = "Lino Avanti!"
    version = '2017.1.0'
    url = "http://avanti.lino-framework.org/"
    demo_fixtures = ['std',
                     # 'all_countries', 'all_languages',
                     'demo', 'demo2']
    user_types_module = 'lino_avanti.lib.avanti.user_types'
    workflows_module = 'lino_avanti.lib.avanti.workflows'
    custom_layouts_module = 'lino_avanti.lib.avanti.layouts'
    migration_class = 'lino_avanti.lib.avanti.migrate.Migrator'

    project_model = 'avanti.Client'
    textfield_format = 'plain'

    def setup_plugins(self):
        super(Site, self).setup_plugins()
        self.plugins.cv.configure(
            person_model = 'avanti.Client')
        # self.plugins.humanlinks.configure(
        #     person_model = 'contacts.Person')
            # person_model = 'avanti.Client')
        # self.plugins.households.configure(
        #     person_model = 'contacts.Person')
            # person_model='avanti.Client')
        self.plugins.cal.configure(
            partner_model='avanti.Client')
        self.plugins.tickets.configure(
            end_user_model='avanti.Client')
        self.plugins.courses.configure(
            # teacher_model='users.User',
            pupil_model='avanti.Client',
            pupil_name_fields='pupil__last_name pupil__first_name')
        self.plugins.coachings.configure(client_model='avanti.Client')
        self.plugins.comments.configure(
            commentable_model='tickets.Ticket')


    def get_installed_apps(self):
        """Implements :meth:`lino.core.site.Site.get_installed_apps`.

        """
        yield super(Site, self).get_installed_apps()
        yield 'lino_avanti.lib.users'
        # yield 'lino.modlib.users'
        yield 'lino_xl.lib.countries'
        yield 'lino_avanti.lib.contacts'
        yield 'lino_avanti.lib.avanti'
        # yield 'lino_xl.lib.households'
        yield 'lino_avanti.lib.households'
        # yield 'lino_welfare.modlib.households'
        # yield 'lino_xl.lib.humanlinks'
        yield 'lino_xl.lib.lists'
        yield 'lino_xl.lib.notes'
        yield 'lino_xl.lib.beid'
        yield 'lino_xl.lib.coachings'
        yield 'lino_xl.lib.cv'
        
        yield 'lino_avanti.lib.courses' # override gen_event_user()
        # yield 'lino_xl.lib.courses'
        # yield 'lino_xl.lib.rooms'
        
        yield 'lino.modlib.plausibility'
        yield 'lino.modlib.export_excel'
        # yield 'lino.modlib.tinymce'
        yield 'lino.modlib.weasyprint'
        yield 'lino_xl.lib.excerpts'
        yield 'lino_xl.lib.appypod'
        
        yield 'lino_noi.lib.votes'
        yield 'lino_avanti.lib.tickets'
        # yield 'lino_noi.lib.tickets'
        yield 'lino_noi.lib.faculties'
        

    def setup_quicklinks(self, user, tb):
        super(Site, self).setup_quicklinks(user, tb)
        a = self.actors.users.MySettings.default_action
        tb.add_instance_action(
            user, action=a, label=_("My settings"))

        Clients = self.actors.avanti.Clients
        tb.add_action(Clients)
        tb.add_action(
            Clients.insert_action,
            label=_("New {}").format(
                Clients.model._meta.verbose_name))
        tb.add_action(Clients, 'find_by_beid')
        
{'fraction_non_alphanumeric': 0.11468895587832283, 'fraction_numerical': 0.0038366675801589476, 'mean_word_length': 2.346629986244842, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6979776', 'n_tokens_mistral': 2476, 'n_tokens_neox': 2422, 'n_words': 354}