Search code examples
pythondjangoweb-frameworksdjango-apps

from where the "}" is coming (The current path, entries/}, didn't match any of these.) in Django


I have just started learning Django and while making an app in the link it is showing %7D and giving the error :

Using the URLconf defined in ag.urls, Django tried these URL patterns, in this order:

admin/
entries/ [name='list']
[name='home']
^about/$ [name='about']
contact/ [name='contact']

The current path, entries/}, didn't match any of these.

I have searched for this over the internet but I have not get the solution yet.


Solution

  • Your template probably contains something like (perhaps with different quotation marks or some extra arguments):

    {% url 'list' %}}

    So with an extra closed curly bracket }. Since the template render does not see an open bracket, it will simply add the curly bracket. As a result the URL thus will now contain an extra curly bracket.

    You thus should rewrite it to:

    {% url 'list' %}

    Try searching for %}} in your templates.