Thank you, It didn't worked for me. something wrong I am doing. I
have a refer.html file which has two form
url.py
url(r'^member/refer/$', direct_to_template,
{'template': 'member_refer.html'}, name='member_refer'),
url(r'^refer/$', 'erp_site.views.tellfriend', name='tell_friend'),
url(r'^refer/$', 'erp_site.views.hero', name='hero'),
views.py
def tellfriend(request):
def hero(request):
When I am loading my html, I am getting this error:
<form method="post" action="{% url tell_friend %}">
<form method="post" action="{% url hero %}">
NoReverseMatch: Reverse for 'hero' with arguments '()' and keyword
arguments '{}' not found.
Thank you
Bhaskar
On Jan 17, 8:40 am, Andreas Pfrengle <[email protected]> wrote:
> Your urls.py needs to contain sth. like that:
>
> urlpatterns = patterns('your_app.views',
> url(r'^the_url_you_want_for_tellfriend$', 'name_of_viewfunction',
> name='tellfriend'),
> ....
> )
>
> the last argument, name='tellfriend', is what the {% url %} tag is
> searching for in your urlpatterns, and then directs to the
> corresponding viewfunction.
> Details
> here:http://docs.djangoproject.com/en/1.1/topics/http/urls/#topics-http-urls
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.