Step 1: I logged into the Django Admin
Step 2: Clicked in Password Change in Admin
Step 3: Entered the Old Password and New Password
Step 4: Clicked the Change My password button
The password is being successfully changed in the database. But, I'm getting the following error:
Environment:
Request Method: GET
Request URL: http://localhost:8000/admin/password_change/done/
Django Version: 2.2.24
Python Version: 3.7.10
Installed Applications:
['material.admin',
'material.admin.default',
'nested_inline',
'django.contrib.auth',
'django.contrib.sites',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_extensions',
'softdelete',
'reversion',
'actstream',
'rest_framework',
'rest_framework.authtoken',
'valital.api.apps.ApiConfig',
'cacheops',
'corsheaders',
'drf_yasg',
'storages',
'djmoney',
'mail_factory',
'mjml']
Installed Middleware:
['corsheaders.middleware.CorsMiddleware',
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'reversion.middleware.RevisionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Template error:
In template /usr/local/lib/python3.7/site-packages/material/admin/templates/registration/password_change_done.html, error at line 3
Invalid block tag on line 3: 'translate', expected 'elif', 'else' or 'endif'. Did you forget to register or load this tag?
1 : {% extends "admin/base_site.html" %}
2 : {% load i18n %}
3 : {% block userlinks %}{% url 'django-admindocs-docroot' as docsroot %}{% if docsroot %}<a href="{{ docsroot }}"> {% translate 'Documentation' %} </a> / {% endif %}{% translate 'Change password' %} / <a href="{% url 'admin:logout' %}">{% translate 'Log out' %}</a>{% endblock %}
4 : {% block breadcrumbs %}
5 : <div class="breadcrumbs">
6 : <a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
7 : › {% translate 'Password change' %}
8 : </div>
9 : {% endblock %}
10 :
11 : {% block content %}
12 : <div class="app">
13 : <div class="card">
Traceback:
File "/usr/local/lib/python3.7/site-packages/django/template/base.py" in parse
470. compile_func = self.tags[command]
During handling of the above exception ('translate'), another exception occurred:
File "/usr/local/lib/python3.7/site-packages/django/core/handlers/exception.py" in inner
34. response = get_response(request)
File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
145. response = self.process_exception_by_middleware(e, request)
File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
143. response = response.render()
File "/usr/local/lib/python3.7/site-packages/django/template/response.py" in render
106. self.content = self.rendered_content
File "/usr/local/lib/python3.7/site-packages/django/template/response.py" in rendered_content
81. template = self.resolve_template(self.template_name)
File "/usr/local/lib/python3.7/site-packages/django/template/response.py" in resolve_template
63. return select_template(template, using=self.using)
File "/usr/local/lib/python3.7/site-packages/django/template/loader.py" in select_template
42. return engine.get_template(template_name)
File "/usr/local/lib/python3.7/site-packages/django/template/backends/django.py" in get_template
34. return Template(self.engine.get_template(template_name), self)
File "/usr/local/lib/python3.7/site-packages/django/template/engine.py" in get_template
143. template, origin = self.find_template(template_name)
File "/usr/local/lib/python3.7/site-packages/django/template/engine.py" in find_template
125. template = loader.get_template(name, skip=skip)
File "/usr/local/lib/python3.7/site-packages/django/template/loaders/base.py" in get_template
30. contents, origin, origin.template_name, self.engine,
File "/usr/local/lib/python3.7/site-packages/django/template/base.py" in __init__
156. self.nodelist = self.compile_nodelist()
File "/usr/local/lib/python3.7/site-packages/django/template/base.py" in compile_nodelist
194. return parser.parse()
File "/usr/local/lib/python3.7/site-packages/django/template/base.py" in parse
478. raise self.error(token, e)
File "/usr/local/lib/python3.7/site-packages/django/template/base.py" in parse
476. compiled_result = compile_func(self, token)
File "/usr/local/lib/python3.7/site-packages/django/template/loader_tags.py" in do_extends
266. nodelist = parser.parse()
File "/usr/local/lib/python3.7/site-packages/django/template/base.py" in parse
478. raise self.error(token, e)
File "/usr/local/lib/python3.7/site-packages/django/template/base.py" in parse
476. compiled_result = compile_func(self, token)
File "/usr/local/lib/python3.7/site-packages/django/template/loader_tags.py" in do_block
209. nodelist = parser.parse(('endblock',))
File "/usr/local/lib/python3.7/site-packages/django/template/base.py" in parse
478. raise self.error(token, e)
File "/usr/local/lib/python3.7/site-packages/django/template/base.py" in parse
476. compiled_result = compile_func(self, token)
File "/usr/local/lib/python3.7/site-packages/django/template/defaulttags.py" in do_if
952. nodelist = parser.parse(('elif', 'else', 'endif'))
File "/usr/local/lib/python3.7/site-packages/django/template/base.py" in parse
472. self.invalid_block_tag(token, command, parse_until)
File "/usr/local/lib/python3.7/site-packages/django/template/base.py" in invalid_block_tag
528. get_text_list(["'%s'" % p for p in parse_until], 'or'),
Exception Type: TemplateSyntaxError at /admin/password_change/done/
Exception Value: Invalid block tag on line 3: 'translate', expected 'elif', 'else' or 'endif'. Did you forget to register or load this tag?
Can anyone let me know an answer to resolve this?