<commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django.contrib import admin
from physical.forms.environment_group import EnvironmentGroupForm


class EnvironmentGroupAdmin(admin.ModelAdmin):
    form = EnvironmentGroupForm
    save_on_top = True
    search_fields = ('name',)
    list_display = ('name', 'group_environments')
    list_filter = ("environments",)

    def group_environments(self, obj):
        return ",".join(obj.environments.values_list('name', flat=True))<commit_msg>Filter horizontal for environments in environment groups<commit_after># -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django.contrib import admin
from physical.forms.environment_group import EnvironmentGroupForm


class EnvironmentGroupAdmin(admin.ModelAdmin):
    form = EnvironmentGroupForm
    save_on_top = True
    search_fields = ('name',)
    list_display = ('name', 'group_environments')
    list_filter = ("environments",)
    filter_horizontal = ("environments",)

    def group_environments(self, obj):
        return ",".join(obj.environments.values_list('name', flat=True))
{'fraction_non_alphanumeric': 0.10834049871023216, 'fraction_numerical': 0.0017196904557179708, 'mean_word_length': 5.126315789473685, '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': '4879834', 'n_tokens_mistral': 320, 'n_tokens_neox': 313, 'n_words': 77}