I have a link to note detail page (s_note) in the user page (username). So as long as I have no entries(notes) in the database for the user the user page renders fine, but as soon as there is a valid note the render fails with the above error and points to ln:6 of user.html.
my urls.py
from django.conf.urls import url
from notes.models import User, Note
from . import views
app_name = 'notes'
urlpatterns = [
    url(r'^$', views.index, name='u_index'), 
my url url(r'^signup/$', views.signup, name='u_signup'),
    url(r'^(?P<user_id>[\w\-]+)/$', views.user, name='username'),
    url(r'^(?P<user_name>[\w\-]+)/(?P<note_t>[\w\-]+)/$', views.note, name='s_note'),
url(r'^(?P<user_name>[\w\-]+)/(?P<note_t>[\w\-]+)/$', views.note, name='s_note')
]
my views
def note(request, user_name, note_t):
    nt = Note.objects.get(note_title=note_t)
    return render (request, 'notes/detail.html', {'note': nt})
my users.html
<h2>Hi! {{ user.user_n }} Your notes are here.</h2>
{% if allnotes %}
    <ul>
    {% for note in allnotes %}
        <li><a href="{% url 's_note' user_name=user.user_n note_t=note.note_title %}">{{ note.note_title }}</a></li>
    {% endfor %}
    </ul>
{% else %}
    <p>You have no notes yet!</p>
{% endif %}
<form method="post" action""> 
    <table>
        {% csrf_token %}
        {{ NForm }}
    </table>
    <input type="submit" value="Create">
</form>
 
     
    