<commit_before>"""
CSS Grid Template
"""

class CSSGridMixin(object):
    """
    A mixin for adding css grid to any standard CBV
    """

    def get_context_data(self, **kwargs):
        """
        Insert the single object into the context dict.
        """
        context = {}
        if self.object:
            context['object'] = self.object
            context_object_name = self.get_context_object_name(self.object)
            if context_object_name:
                context[context_object_name] = self.object
        context.update(kwargs)
        return super(SingleObjectMixin, self).get_context_data(**context)<commit_msg>Update views.py<commit_after>"""
CSS Grid Template
"""

class CSSGridMixin(object):
    """
    A mixin for adding css grid to any standard CBV
    """
    
    _prefix = 'css-grid'
    grid_wrapper = None
    grid_template_columns = None
    grid_template_areas = None
    grid_gap = None
    

    def get_context_data(self, **kwargs):
        """
        Insert the single object into the context dict.
        """
        context = super(SingleObjectMixin, self).get_context_data(**context)
        context.update({
            'grid_wrapper': self._prefix + self.grid_wrapper,
            'grid-template-columns': self._prefix + self.grid_template_columns,
            'grid-template-areas': self._prefix + self.grid_template_areas,
            'grid-gap': self._prefix + self.grid_gap
        })
        return context
{'fraction_non_alphanumeric': 0.10198494182067078, 'fraction_numerical': 0.0, 'mean_word_length': 2.423887587822014, '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': '6672069', 'n_tokens_mistral': 417, 'n_tokens_neox': 407, 'n_words': 97}