<commit_before>from pyramid.view import view_config

from . import SettingsView

import logging
logger = logging.getLogger(__name__)

class Overview(SettingsView):
    def __init__(self, request):
        super(Overview, self).__init__(request, name='settings', title='Overview')

    @view_config(route_name='settings', renderer='../templates/settings/overview.pt')
    def view(self):
        buttongroups = []
        buttons = []

        buttons.append(dict(url=self.request.route_path('settings_supervisor'), icon="monitor_edit.png", title="Supervisor"))
        buttons.append(dict(url=self.request.route_path('services'), icon="bookshelf.png", title="Services"))
        buttons.append(dict(url="/settings/users", icon="user_catwomen.png", title="Users"))
        buttons.append(dict(url=self.settings.get('celery.url'),
                            icon="celery_128.png", title="Celery", id="external-url"))
        buttons.append(dict(url="/settings/jobs", icon="blackboard_sum.png", title="Monitor"))
        buttons.append(dict(url = "/settings/ldap", icon = "ldap.png", title = "LDAP"))
        buttongroups.append(dict(title='Settings', buttons=buttons))

        return dict(buttongroups=buttongroups)<commit_msg>using route_path in settings overview<commit_after>from pyramid.view import view_config

from . import SettingsView

import logging
logger = logging.getLogger(__name__)

class Overview(SettingsView):
    def __init__(self, request):
        super(Overview, self).__init__(request, name='settings', title='Overview')

    @view_config(route_name='settings', renderer='../templates/settings/overview.pt')
    def view(self):
        buttongroups = []
        buttons = []

        buttons.append(dict(url=self.request.route_path('settings_supervisor'), icon="monitor_edit.png", title="Supervisor"))
        buttons.append(dict(url=self.request.route_path('services'), icon="bookshelf.png", title="Services"))
        buttons.append(dict(url=self.request.route_path('settings_users'), icon="user_catwomen.png", title="Users"))
        buttons.append(dict(url=self.settings.get('celery.url'),
                            icon="celery_128.png", title="Celery", id="external-url"))
        buttons.append(dict(url=self.request.route_path('settings_jobs'), icon="blackboard_sum.png", title="Monitor"))
        buttons.append(dict(url=self.request.route_path('settings_ldap'), icon = "ldap.png", title = "LDAP"))
        buttongroups.append(dict(title='Settings', buttons=buttons))

        return dict(buttongroups=buttongroups)
{'fraction_non_alphanumeric': 0.1546310832025118, 'fraction_numerical': 0.002354788069073783, 'mean_word_length': 4.481720430107527, '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': '7569658', 'n_tokens_mistral': 756, 'n_tokens_neox': 738, 'n_words': 106}