old_contents: # -*- coding: utf-8 -*-
  from django import template
  from django.conf import settings
  from opps.article.models import ArticleBox
  
  
  register = template.Library()
  
  @register.inclusion_tag('article/articlebox_detail.html')
  def get_articlebox(slug, channel_slug=None):
      if channel_slug:
          slug = slug + '-' + channel_slug
  
      try:
          box = ArticleBox.objects.get(site=settings.SITE_ID, slug=slug)
      except ArticleBox.DoesNotExist:
          box = None
  
      return {'articlebox': box}
  
  
  @register.inclusion_tag('article/articlebox_list.html')
  def get_all_articlebox(channel_slug):
      boxes = ArticleBox.objects.filter(site=settings.SITE_ID, channel__slug=channel_slug)
      return {'articleboxes': boxes}
  
new_contents: # -*- coding: utf-8 -*-
  from django import template
  from django.conf import settings
  from opps.article.models import ArticleBox
  
  
  register = template.Library()
  
  
  @register.inclusion_tag('article/articlebox_detail.html')
  def get_articlebox(slug, channel_slug=None):
      if channel_slug:
          slug = slug + '-' + channel_slug
  
      try:
          box = ArticleBox.objects.get(site=settings.SITE_ID, slug=slug)
      except ArticleBox.DoesNotExist:
          box = None
  
      return {'articlebox': box}
  
  
  @register.inclusion_tag('article/articlebox_list.html')
  def get_all_articlebox(channel_slug):
      boxes = ArticleBox.objects.filter(site=settings.SITE_ID, channel__slug=channel_slug)
      return {'articleboxes': boxes}
  
subject: fix pep8 on tamplate tag article (box), E302 expected ./opps/article/templatetags/article_tags.py:9:1: E302 expected 2 blank lines, found 1