Ken,
Thanks for getting back to me so quickly.
Traceback is below. I’m guessing what is meant by “… root issue is not the last item in the stack.” It’s likely the source of my woes, but I really need to understand what you mean. Can you direct me to some illuminating resource(s)?
Traceback:
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/meal/
Django Version: 4.1.5
Python Version: 3.11.1
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'meals',
'reactions',
'bootstrap5']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Template error:
In template G:\workspace\python-land\diet\meals\templates\default\_apps_menu.html, error at line 14
Reverse for 'rxIndex' not found. 'rxIndex' is not a valid view function or pattern name.
4 : <li class="nav-item">
5 : <a class="nav-link active" href="{% url 'home' as the_url %}">Home</a>
6 : </li>
7 : <li class="nav-item">
8 : <a class="nav-link" href="{% url 'mealIncludedFood' as the_url %}">Manage meals</a>
9 : </li>
10 : <li class="nav-item">
11 : <a class="nav-link" href="{% url 'home' as the_url %}">Manage foods</a>
12 : </li>
13 : <li class="nav-item">
14 : <a class="nav-link" href=" {% url 'rxIndex' %} ">Manage reactions</a>
15 : </li>
16 : </ul>
17 : </nav>
Traceback (most recent call last):
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner
response = get_response(request)
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\core\handlers\base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "G:\workspace\python-land\diet\meals\views.py", line 14, in home
return render(request, 'default/index.html', context)
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\shortcuts.py", line 24, in render
content = loader.render_to_string(template_name, context, request, using=using)
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\template\loader.py", line 62, in render_to_string
return template.render(context, request)
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\template\backends\django.py", line 62, in render
return self.template.render(context)
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\template\base.py", line 175, in render
return self._render(context)
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\template\base.py", line 167, in _render
return self.nodelist.render(context)
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\template\base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\template\base.py", line 1005, in <listcomp>
return SafeString("".join([node.render_annotated(context) for node in self]))
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\template\base.py", line 966, in render_annotated
return self.render(context)
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\template\loader_tags.py", line 157, in render
return compiled_parent._render(context)
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\template\base.py", line 167, in _render
return self.nodelist.render(context)
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\template\base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\template\base.py", line 1005, in <listcomp>
return SafeString("".join([node.render_annotated(context) for node in self]))
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\template\base.py", line 966, in render_annotated
return self.render(context)
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\template\defaulttags.py", line 322, in render
return nodelist.render(context)
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\template\base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\template\base.py", line 1005, in <listcomp>
return SafeString("".join([node.render_annotated(context) for node in self]))
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\template\base.py", line 966, in render_annotated
return self.render(context)
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\template\loader_tags.py", line 208, in render
return template.render(context)
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\template\base.py", line 177, in render
return self._render(context)
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\template\base.py", line 167, in _render
return self.nodelist.render(context)
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\template\base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\template\base.py", line 1005, in <listcomp>
return SafeString("".join([node.render_annotated(context) for node in self]))
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\template\base.py", line 966, in render_annotated
return self.render(context)
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\template\defaulttags.py", line 472, in render
url = reverse(view_name, args=args, kwargs=kwargs, current_app=current_app)
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\urls\base.py", line 88, in reverse
return resolver._reverse_with_prefix(view, prefix, *args, **kwargs)
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\urls\resolvers.py", line 828, in _reverse_with_prefix
raise NoReverseMatch(msg)
Exception Type: NoReverseMatch at /meal/
Exception Value: Reverse for 'rxIndex' not found. 'rxIndex' is not a valid view function or pattern name.