<commit_before>from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from cmsplugin_facebook import models

class BasePlugin(CMSPluginBase):
    name = None

    def render(self, context, instance, placeholder):
        context.update({'instance': instance,
                        'name': self.name,
                        'url': instance.pageurl or \
                               context['request'].build_absolute_uri()})
        return context

class FacebookLikeBoxPlugin(BasePlugin):
    model = models.FacebookLikeBox
    name = 'Facebook Like Box'
    render_template = 'cmsplugin_facebook/likebox.html'
    change_form_template = 'cmsplugin_facebook/likebox_change_form.html'

class FacebookLikeButtonPlugin(BasePlugin):
    model = models.FacebookLikeButton
    name = 'Facebook Like Button'
    render_template = 'cmsplugin_facebook/likebutton.html'<commit_msg>Create a specific group for the Facebook plugins - makes it a bit neater in the list of plugins.<commit_after>from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from cmsplugin_facebook import models

class BasePlugin(CMSPluginBase):
    name = None

    def render(self, context, instance, placeholder):
        context.update({'instance': instance,
                        'name': self.name,
                        'url': instance.pageurl or \
                               context['request'].build_absolute_uri()})
        return context

class FacebookLikeBoxPlugin(BasePlugin):
    model = models.FacebookLikeBox
    name = 'Facebook Like Box'
    module = 'Facebook'
    render_template = 'cmsplugin_facebook/likebox.html'
    change_form_template = 'cmsplugin_facebook/likebox_change_form.html'

class FacebookLikeButtonPlugin(BasePlugin):
    model = models.FacebookLikeButton
    name = 'Facebook Like Button'
    module = 'Facebook'
    render_template = 'cmsplugin_facebook/likebutton.html'
{'fraction_non_alphanumeric': 0.07855297157622738, 'fraction_numerical': 0.0, 'mean_word_length': 3.236323851203501, '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': 15, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6417551', 'n_tokens_mistral': 518, 'n_tokens_neox': 497, 'n_words': 126}