Skip to content

admin rednerer not working  #3582

@auvipy

Description

@auvipy

nvironment:

Request Method: GET
Request URL: http://127.0.0.1:8000/api/

Django Version: 1.8.5
Python Version: 2.7.10
Installed Applications:
('material',
'material.admin',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'tower',
'rest_framework')
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')

Template error:
In template /usr/local/lib/python2.7/dist-packages/rest_framework/templates/rest_framework/admin.html, error at line 117
Invalid block tag: 'trans', expected 'elif', 'else' or 'endif'

107 :

108 :

109 : Delete

110 :

111 :

112 : {% endif %}

113 :

114 : {% if filter_form %}

115 :

116 :

117 : {% trans "Filters" %}

118 :

119 : {% endif %}

120 :

121 :

122 :

123 :

{{ name }}

124 :

125 :

126 : {% block description %}

127 : {{ description }}

Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response

  1.             response = response.render()
    
    File "/usr/local/lib/python2.7/dist-packages/django/template/response.py" in render
  2.         self.content = self.rendered_content
    
    File "/usr/local/lib/python2.7/dist-packages/rest_framework/response.py" in rendered_content
  3.     ret = renderer.render(self.data, media_type, context)
    
    File "/usr/local/lib/python2.7/dist-packages/rest_framework/renderers.py" in render
  4.     template = loader.get_template(self.template)
    
    File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py" in get_template
  5.             return engine.get_template(template_name, dirs)
    
    File "/usr/local/lib/python2.7/dist-packages/django/template/backends/django.py" in get_template
  6.     return Template(self.engine.get_template(template_name, dirs))
    
    File "/usr/local/lib/python2.7/dist-packages/django/template/engine.py" in get_template
  7.     template, origin = self.find_template(template_name, dirs)
    
    File "/usr/local/lib/python2.7/dist-packages/django/template/engine.py" in find_template
  8.             source, display_name = loader(name, dirs)
    
    File "/usr/local/lib/python2.7/dist-packages/django/template/loaders/base.py" in call
  9.     return self.load_template(template_name, template_dirs)
    
    File "/usr/local/lib/python2.7/dist-packages/django/template/loaders/base.py" in load_template
  10.         template = Template(source, origin, template_name, self.engine)
    
    File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in init
  11.     self.nodelist = engine.compile_string(template_string, origin)
    
    File "/usr/local/lib/python2.7/dist-packages/django/template/engine.py" in compile_string
  12.     return parser.parse()
    
    File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in parse
  13.                 compiled_result = compile_func(self, token)
    
    File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py" in do_block
  14. nodelist = parser.parse(('endblock',))
    
    File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in parse
  15.                 compiled_result = compile_func(self, token)
    
    File "/usr/local/lib/python2.7/dist-packages/django/template/defaulttags.py" in do_if
  16. nodelist = parser.parse(('elif', 'else', 'endif'))
    
    File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in parse
  17.                 self.invalid_block_tag(token, command, parse_until)
    
    File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in invalid_block_tag
  18.             (command, get_text_list(["'%s'" % p for p in parse_until])))
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions