Django 4 Everybody: 405 Error, Auto-grader assignment Ad List #1
I'm following the DJ4E coursera course and I am on the 5th module auto-grader assignment: Ad List #1
When I run the auto-grader everything passes except the last test and I get this error:
Logging out...
Loading URL: https://loupy316.pythonanywhere.com/logout/?next=/ads/ (Open URL) Could not find HTML The current node list is empty.
Here is my html:
{% extends 'base_bootstrap.html' %}
{% load app_tags %} <!-- see home/templatetags/app_tags.py and dj4e-samples/settings.py -->
{% block navbar %}
<nav class="navbar navbar-expand-lg navbar-dark bg-dark" style="border-radius:10px !important">
<div class="container-fluid">
<a class="navbar-brand" href="{% url 'home:home' %}">LP's Site</a>
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
{% url 'home:home' as home_url %}
<a class="nav-link {% if request.get_full_path == home_url %}active{% endif %}" href="{% url 'home:home' %}">Home</a>
{% url 'ads:all' as ads_url %}
<li {% if request.get_full_path == ads_url %}class="active"{% endif %}>
<a class="nav-link" href="{% url 'ads:all' %}" role="button">Ads</a>
</li>
</ul>
<ul class="navbar-nav">
{% if user.is_authenticated %}
<li>
<a class="nav-link" href="{% url 'ads:ad_create' %}">Create Ad</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="rightnavDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
<img style="width: 35px; height: 35px; border-radius: 50%; object-fit: cover;" src="{{ user|gravatar:60 }}"/><b class="caret"></b>
</a>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="rightnavDropdown">
<li>
<form method="post" action="/admin/logout/?next={% url 'ads:all' %}">
{% csrf_token %}
<button type="submit" class="dropdown-item">Logout</button>
</form>
</li>
</ul>
</li>
{% else %}
<li class="nav-item"><a class="nav-link" href="{% url 'login' %}?next={% url 'ads:all' %}">Login</a></li>
{% endif %}
</ul>
</div>
</nav>
{% endblock %}
Here are my urls:
urlpatterns = [
path('', include('home.urls')), # Change to ads.urls
path('ads/', include('ads.urls')),
path('admin/', admin.site.urls),# Keep
path('accounts/', include('django.contrib.auth.urls')), # Keep
re_path(r'^oauth/', include('social_django.urls', namespace='social')), # Keep
path('logout/', LogoutView.as_view(next_page=reverse_lazy('ads:all')), name='logout'),
]
Any help would be appreciated! My site (to me) seems to work fine but it's not passing the auto-grader and I would really like to complete this course.