Though both links are exactly the same, I keep receiving a "Page Not Found at /accounts/login/next?" error whenever I click my link. What's the error in my code? 'explore' works, but 'happening' doesn't! Please help!
views.py
def explore(request):
return render(request, 'explore.html')
def happening(request):
return render(request, 'happening.html')
html template
<div id="happening_log">
<a style= "padding-left:5px" href="{% url 'happening'
%}">Happening</a>
</div>
urls.py
urlpatterns = [
path('', views.explore, name='explore'),
path('<user__name>/', views.home, name='home'),
path('happening/', views.happening, name='happening'),
]
Page not found (404) Request Method: GET Request URL: http://127.0.0.1:8000/accounts/login/?next=/happening/ Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:
admin/
[name='explore']
<user__name>/ [name='home']
/happening/ [name='happening']
users/
^static\/(?P<path>.*)$
^media\/(?P<path>.*)$
The current path, accounts/login/, didn't match any of these.
views.py? - bonidjukic