title: Django Error TemplateSyntaxError only occuring in production
body: <p>So I've got either a doozy of an issue, or I'm over looking the obvious.</p>
  
  <p>I am getting a TemplateSyntaxError and it's only occurring in production. I temporary turned on DEBUG and it provided zero useful information. I have an index.html page, that loads my tags, it then calls the inclusion tag. </p>
  
  <p>My setup is Django 1.6.5 and using the default Mezzanine setup. (Fabric, Nginx, Gunicorn). Development environment is OpenSuse 12.2 and the deployment environment is some version of Ubuntu (hosted on AWS EC2).</p>
  
  <p>This issue only occurs on the production side and NOT in the development environment. Originally I made the tag a regular tag, and it wasn't even being called at all. The server would silently fail, and act as though it had never attempted to call the tag. (I used logging to prove that it never went into the tag). Now that it is an inclusion_tag (which is what it should be), I get this exception.</p>
  
  <p>Here is the file system paths where the relevant pieces are.</p>
  
  <pre><code>project
    bactt_core
      templates
        base.html
        index.html
        blog
          includes
            blog_post_list_include.html
  
      templatetags
        __init__.py
        bactt_blog_tags.py
  </code></pre>
  
  <p>The error exactly is </p>
  
  <pre><code>TemplateSyntaxError at /
  
  Invalid block tag: 'get_blogs_by_category', expected 'endblock'
  </code></pre>
  
  <p>Here is the portion of my index.html template where I am making the call to the inclusion tag. It is dying on the get_blogs_by_category, which is an inclusion_tag. Inside bactt_blog_tags.</p>
  
  <pre><code>  &lt;div id="news" class="row"&gt;
          &lt;div class="panel"&gt;
              &lt;div class="panel-body"&gt;
                  &lt;h2&gt;News&lt;/h2&gt;
                  {% load bactt_blog_tags %}
                  {% get_blogs_by_category "News" %}
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>Here is bactt_blog_tags</p>
  
  <pre><code>from django import template
  from django.core.exceptions import ObjectDoesNotExist
  #from mezzanine import template
  from mezzanine.blog.models import BlogPost, BlogCategory
  
  
  
  register = template.Library()
  MAX_BLOG_POSTS_TO_RETURN = 5
  
  @register.inclusion_tag('blog/includes/blog_post_list_include.html')
  def get_blogs_by_category(categoryTitle):
      category = None
      postList = []
      try:
          category = BlogCategory.objects.get(title__exact=categoryTitle)
      except ObjectDoesNotExist:
          return {'blog_posts':[]}
      if category:
          for post in BlogPost.objects.all():
              categories = post.categories.all()
              if category in post.categories.all():
                  postList.append(post)
      if len(postList) &gt; MAX_BLOG_POSTS_TO_RETURN:
          postList = postList[0:MAX_BLOG_POSTS_TO_RETURN]
      return {'blog_posts': postList}
  </code></pre>
  
  <p>Thanks for any help you can provide I've already spun my wheels for a least a few hours now.</p>
  
  <p>Edit:
  So I renamed the file bactt_blog_tags.py to bb_tags.py and everything now works. I have no idea what the reason for this naming issue is but if somebody could explain that, I would definitely call this answered. Why whatever pathing occurs in development vs. production is also odd.</p>