title: Django {% include %} Templatetag not working for a {% load %} in file
body: <p>I just rent a VPS to try to publish a Django project. In debug mode in my pc all runs ok, but when i try to run debug mode in the VPS it comes an error:</p>
  
  <pre><code>Django Version:     1.8.5
  Exception Type:     SyntaxError
  Exception Value:      
  invalid syntax (inbox.py, line 39)
  
  Exception Location:     /usr/lib/python3.4/importlib/__init__.py in import_module, line 109
  Python Executable:  /usr/bin/python3
  Python Version:     3.4.3
  
  
  Error during template rendering
  
  In template /webapps/rusc/rusc/templates/base.html, error at line 66:
  
  63          &lt;/div&gt;
  64  
  65          &lt;div id="div_user"&gt;
  66  
  
        {%  include "usermenu.html" %}
  
  
  
  67          &lt;/div&gt;
  68      &lt;/div&gt;
  </code></pre>
  
  <p>In the "usermenu.html" i have this loads that are causing the problem</p>
  
  <pre><code>{% load notifications_tags %}
  {% load inbox %}
  </code></pre>
  
  <p>If i load this in "base.html" the {% extends %} tag doesn't work:</p>
  
  <pre><code>Django Version:     1.8.5
  Exception Type:     SyntaxError
  Exception Value:    
  
  invalid syntax (inbox.py, line 39)
  
  Exception Location:     /usr/lib/python3.4/importlib/__init__.py in import_module, line 109
  Python Executable:  /usr/bin/python3
  Python Version:     3.4.3
  
  In template /webapps/rusc/rusc/templates/rusc.html, error at line 1
  invalid syntax
  1   
  
        {% extends "base.html" %}
  
  
  
  2   
  3   
  4   {%  block content %}
  5       &lt;br /&gt;
  6       &lt;br /&gt;
  </code></pre>
  
  <p>and if i load on rusc.html i still have the <strong>SyntaxError</strong> but with no html file attached, just the return with the render:</p>
  
  <pre><code>Environment:
  
  
  Request Method: GET
  Request URL: http://xx.xxx.xx.xx:8000/rusc/
  
  Django Version: 1.8.5
  Python Version: 3.4.3
  Installed Applications:
  ('django.contrib.admin',
   'django.contrib.auth',
   'django.contrib.contenttypes',
   'django.contrib.sessions',
   'django.contrib.messages',
   'django.contrib.staticfiles',
   'django_filters',
   'django_tables2',
   'django_messages',
   'notifications',
   'registration',
   'autocomplete_light',
   'post',
   'etiqueta',
   'recurs',
   'usuari',
   'buscador',
   'cela',
   'rusc.faq',
   'micawber.contrib.mcdjango')
  Installed Middleware:
  ('django.contrib.sessions.middleware.SessionMiddleware',
   'django.middleware.common.CommonMiddleware',
   'django.middleware.csrf.CsrfViewMiddleware',
   'django.contrib.auth.middleware.AuthenticationMiddleware',
   'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
   'django.contrib.messages.middleware.MessageMiddleware',
   'django.middleware.clickjacking.XFrameOptionsMiddleware',
   'django.middleware.security.SecurityMiddleware')
  
  
  Traceback:
  File "/usr/local/lib/python3.4/dist-packages/django/core/handlers/base.py" in get_response
    132.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/webapps/rusc/rusc/views.py" in ruscView
    24.     return render(request,"rusc.html", {'celas':celas,'notifications': notif})
  File "/usr/local/lib/python3.4/dist-packages/django/shortcuts.py" in render
    67.             template_name, context, request=request, using=using)
  File "/usr/local/lib/python3.4/dist-packages/django/template/loader.py" in render_to_string
    98.             template = get_template(template_name, using=using)
  File "/usr/local/lib/python3.4/dist-packages/django/template/loader.py" in get_template
    35.                 return engine.get_template(template_name, dirs)
  File "/usr/local/lib/python3.4/dist-packages/django/template/backends/django.py" in get_template
    30.         return Template(self.engine.get_template(template_name, dirs))
  File "/usr/local/lib/python3.4/dist-packages/django/template/engine.py" in get_template
    167.         template, origin = self.find_template(template_name, dirs)
  File "/usr/local/lib/python3.4/dist-packages/django/template/engine.py" in find_template
    141.                 source, display_name = loader(name, dirs)
  File "/usr/local/lib/python3.4/dist-packages/django/template/loaders/base.py" in __call__
    13.         return self.load_template(template_name, template_dirs)
  File "/usr/local/lib/python3.4/dist-packages/django/template/loaders/base.py" in load_template
    23.             template = Template(source, origin, template_name, self.engine)
  File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in __init__
    190.         self.nodelist = engine.compile_string(template_string, origin)
  File "/usr/local/lib/python3.4/dist-packages/django/template/engine.py" in compile_string
    261.         return parser.parse()
  File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in parse
    341.                     compiled_result = compile_func(self, token)
  File "/usr/local/lib/python3.4/dist-packages/django/template/loader_tags.py" in do_extends
    210.     nodelist = parser.parse()
  File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in parse
    341.                     compiled_result = compile_func(self, token)
  File "/usr/local/lib/python3.4/dist-packages/django/template/defaulttags.py" in load
    1159.                 lib = get_library(taglib)
  File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in get_library
    1392.             lib = import_library(taglib_module)
  File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in import_library
    1331.         mod = import_module(taglib_module)
  File "/usr/lib/python3.4/importlib/__init__.py" in import_module
    109.     return _bootstrap._gcd_import(name[level:], package, level)
  
  Exception Type: SyntaxError at /rusc/
  Exception Value: invalid syntax (inbox.py, line 39)
  </code></pre>
  
  <p>Where i can load this data?</p>
  
  <p>The strange thing is that i installed the same project in Windows and Ubuntu and works fine, this error is only in a Ubuntu VPS from OVH (as far i know).</p>
  
  <p>Any help would be appreciated.</p>
  
  <p><strong>inbox.py</strong> is a file of Django-messages: 
  <a href="http://Django-messages" rel="nofollow">https://github.com/arneb/django-messages/blob/master/django_messages/templatetags/inbox.py</a></p>
  
  <pre><code>from django.template import Library, Node, TemplateSyntaxError
  
  class InboxOutput(Node):
      def __init__(self, varname=None):
          self.varname = varname
  
      def render(self, context):
          try:
              user = context['user']
              count = user.received_messages.filter(read_at__isnull=True, recipient_deleted_at__isnull=True).count()
          except (KeyError, AttributeError):
              count = ''
          if self.varname is not None:
              context[self.varname] = count
              return ""
          else:
              return "%s" % (count)
  
  def do_print_inbox_count(parser, token):
      """
      A templatetag to show the unread-count for a logged in user.
      Returns the number of unread messages in the user's inbox.
      Usage::
  
          {% load inbox %}
          {% inbox_count %}
  
          {# or assign the value to a variable: #}
  
          {% inbox_count as my_var %}
          {{ my_var }}
  
      """
      bits = token.contents.split()
      if len(bits) &gt; 1:
          if len(bits) != 3:
              raise TemplateSyntaxError("inbox_count tag takes either no arguments or exactly two arguments")
          if bits[1] != 'as':
              raise TemplateSyntaxError("first argument to inbox_count tag must be 'as'")
          return InboxOutput(bits[2])
      else:
          return InboxOutput()
  
  register = Library()
  register.tag('inbox_count', do_print_inbox_count)
  </code></pre>