Wickkiey
Wickkiey

Reputation: 4632

arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: [] in django

I am new to django ..the same question is there already but i cant understand what this error is.. i keep getting this error in the url line. pls help me to resolve this error with explanation.

views.py

def srch(request):
   return render(request,'feeds/search.html')

urls.py

url(r'^search/$',views.srch,name='search')

and in html

<a href="{% url 'feeds:search' %}"> click </a>

thanks in advance for ur help ..

Upvotes: 0

Views: 590

Answers (3)

Bonnibel Villaman
Bonnibel Villaman

Reputation: 19

I had the same problem and I solved it by redirecting like this:

url(r'^password-reset/$', login_views.password_reset, {'post_reset_redirect' : 'password-reset/done/'}, name='password_reset')

So, I also have the:

url(r'^password-reset/done/$', login_views.password_reset_done, name='password_reset_done')

Upvotes: 0

HadeS
HadeS

Reputation: 2038

you must read about URL namespace.. and also check in your project level urls.py entry of feeds application which should be like

url(r'feeds/',include('feeds.urls',namespace='feeds'))..

I might not be correct but I think problem is in urls.py of your project

Upvotes: 1

Steven Xie
Steven Xie

Reputation: 107

Maybe you can try replacing {% url 'feeds:search' %} with {% url 'search' %}"> ?

Upvotes: 2

Related Questions