Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6090787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:15:14+00:00 2026-05-23T12:15:14+00:00

I seem to be getting a Caught NoReverseMatch error. I am not so sure

  • 0

I seem to be getting a Caught NoReverseMatch error. I am not so sure what is causing the problem. Have a look at the full error.

Caught NoReverseMatch while rendering: Reverse for 'mmc.views.edit_note' with arguments '(1L, '')' and keyword arguments '{}' not found.

On my get_client page. I have a link to the edit note page. I am assuming the problem might be here in my template. I think the note.pk is the problem.

<a href="{% url mmc.views.edit_notes client.pk note.pk %}"> Edit Note</a>

Here is also some more information which could help.
urls.py

(r'^clients/(?P<client_id>\d+)/$', views.get_client),
(r'^clients/notes/(?P<client_id>\d+)(?P<note_id>\d+)$', views.edit_notes),

views.py

@login_required
def edit_notes(request, client_id = 0, note_id = 0):
    client = None
    note = None
    try:
        client = models.Client.objects.get(pk = client_id)
        note = models.Note.objects.get(pk = note_id)
    except:
        return HttpResponseNotFound()

    if request.method == 'POST':
        form = forms.NoteForm(request.POST, instance=note)
        if form.is_valid():
            note = form.save(commit=False)
            note.user = request.user
            note.client = client
            note.save(True)
            request.user.message_set.create(message = "Note is successfully added.")
            return HttpResponse("<script language=\"javascript\" type=\"text/javascript\">window.opener.location = window.opener.location; window.close();</script>")
    else:
        form = forms.NoteForm(instance=note)

    return render_to_response('note_form.html', {'form':form, 'client':client, 'note':note}, context_instance = RequestContext(request))

*EDIT: * Seem to have corrected most of it Here are some changes I have made.

Template

{% for note in notes %}
        <a href="{% url mmc.views.edit_note client.pk note.pk  %}" onclick="return showAddAnotherPopup(this);"> Edit Note</a>
{% endfor%}

urls.py

(r'^clients/notes/(?P<client_id>\d+)/(?P<note_id>\d+)/$', views.edit_note)

Now the only problem is it displays all of the links to each edit form notes for an individual client. I only want the link for the latest note and only the latest note. Is there a possible way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:15:15+00:00Added an answer on May 23, 2026 at 12:15 pm

    (r'^clients/(?P<client_id>\d+)/$', views.get_client) should be something like url(r'^clients/(?P<client_id>\d+)/$', views.get_client, name='MY_URL_NAME') then called with {% url MY_URL_NAME client.pk %}

    and import url from django.conf.urls.defaults

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I seem to have a problem with getting MVC to fill in my custom
The full text of the error is: TemplateSyntaxError at / Caught an exception while
I seem to be getting application crashes at: parent.findViewById(R.id.a_1).setVisibility(View.VISIBLE); not sure what im doing
I seem to be getting a strange error when I run my tests in
I seem to be getting a type mismatch error when trying to do something
I cannot seem to figure out I am getting the following error in IE
I'm getting the following error message and I can't seem to figure out the
This may seem like a simple question but i am getting an error when
Well.. it's pretty much that, I seem to be getting a Illegal Seek error
not seem to getting the outputs from exec() command in PHP, OS: Windows XP

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.