# Path: aldryn_blog/models.py
# AUTH_USER_MODEL = getattr(settings, 'AUTH_USER_MODEL', 'auth.User')
# class CategoryManager(TranslationManager):
# class Category(TranslatableModel):
#     class Meta:
# class RelatedManager(models.Manager):
# class PublishedManager(RelatedManager):
# class Post(models.Model):
#     class Meta:
# class LatestEntriesPlugin(CMSPlugin):
# class AuthorsPlugin(CMSPlugin):
#     def get_with_usage_count(self, language=None, **kwargs):
#     def __unicode__(self):
#     def get_absolute_url(self, language=None):
#     def get_query_set(self):
#     def filter_by_language(self, language):
#     def filter_by_current_language(self):
#     def get_tags(self, entries=None, language=None):
#     def get_categories(self, language=None):
#     def get_months(self, language):
#     def get_query_set(self):
#     def __unicode__(self):
#     def get_absolute_url(self):
#     def save(self, **kwargs):
#     def get_author_slug(self):
#     def __unicode__(self):
#     def copy_relations(self, oldinstance):
#     def get_posts(self):
#     def get_authors(self):
# def force_language(sender, instance, **kwargs):
# 
# Path: aldryn_blog/forms.py
# class LatestEntriesForm(forms.ModelForm):
# 
#     class Meta:
# 
#         widgets = {
#             'tags': django_select2.Select2MultipleWidget
#         }


from django.utils.translation import ugettext_lazy as _
from cms.models.pluginmodel import CMSPlugin
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from aldryn_blog import models
from aldryn_blog.forms import LatestEntriesForm

    module = 'Blog'


class LatestEntriesPlugin(BlogPlugin):

    render_template = 'aldryn_blog/plugins/latest_entries.html'
    name = _('Latest Blog Entries')
    model = models.LatestEntriesPlugin
    form = LatestEntriesForm

    def render(self, context, instance, placeholder):
        context['instance'] = instance
        return context


class AuthorsPlugin(BlogPlugin):
    render_template = 'aldryn_blog/plugins/authors.html'
    name = _('Blog Authors')
    model = models.AuthorsPlugin
    filter_horizontal = ['authors']

    def render(self, context, instance, placeholder):
        context['instance'] = instance
        return context


class BlogTagsPlugin(BlogPlugin):

    render_template = 'aldryn_blog/plugins/tags.html'

# Path: aldryn_blog/models.py
# AUTH_USER_MODEL = getattr(settings, 'AUTH_USER_MODEL', 'auth.User')
# class CategoryManager(TranslationManager):
# class Category(TranslatableModel):
#     class Meta:
# class RelatedManager(models.Manager):
# class PublishedManager(RelatedManager):
# class Post(models.Model):
#     class Meta:
# class LatestEntriesPlugin(CMSPlugin):
# class AuthorsPlugin(CMSPlugin):
#     def get_with_usage_count(self, language=None, **kwargs):
#     def __unicode__(self):
#     def get_absolute_url(self, language=None):
#     def get_query_set(self):
#     def filter_by_language(self, language):
#     def filter_by_current_language(self):
#     def get_tags(self, entries=None, language=None):
#     def get_categories(self, language=None):
#     def get_months(self, language):
#     def get_query_set(self):
#     def __unicode__(self):
#     def get_absolute_url(self):
#     def save(self, **kwargs):
#     def get_author_slug(self):
#     def __unicode__(self):
#     def copy_relations(self, oldinstance):
#     def get_posts(self):
#     def get_authors(self):
# def force_language(sender, instance, **kwargs):
# 
# Path: aldryn_blog/forms.py
# class LatestEntriesForm(forms.ModelForm):
# 
#     class Meta:
# 
#         widgets = {
#             'tags': django_select2.Select2MultipleWidget
#         }


# Path: aldryn_blog/cms_plugins.py
from django.utils.translation import ugettext_lazy as _
from cms.models.pluginmodel import CMSPlugin
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from aldryn_blog import models
from aldryn_blog.forms import LatestEntriesForm


    module = 'Blog'


class LatestEntriesPlugin(BlogPlugin):

    render_template = 'aldryn_blog/plugins/latest_entries.html'
    name = _('Latest Blog Entries')
    model = models.LatestEntriesPlugin
    form = LatestEntriesForm

    def render(self, context, instance, placeholder):
        context['instance'] = instance
        return context


class AuthorsPlugin(BlogPlugin):
    render_template = 'aldryn_blog/plugins/authors.html'
    name = _('Blog Authors')
    model = models.AuthorsPlugin
    filter_horizontal = ['authors']

    def render(self, context, instance, placeholder):
        context['instance'] = instance
        return context


class BlogTagsPlugin(BlogPlugin):

    render_template = 'aldryn_blog/plugins/tags.html'

    name = _('Tags')