Hello I am trying to pass different urls from my site into a template.
I thought it would be done by using this in the template
{% url myappname.module.views.urlfunction %}
but that returns an error, saying that “Caught AttributeError while rendering: ‘str’ object has no attribute ‘regex'”
I am not sure what that means. I followed this example url template tag in django template
urlpatterns = patterns('',
url(r'^$', 'myappname.module.views.start'),
and this is what I have entered in my template
{% url myappname.module.views.start %}
I have also tried this url pattern and template combo to no avial:
urlpatterns = patterns('',
url(r'^$', 'myappname.module.views.start', name="home"),
{% url "home" %}
What am I doing wrong?
Thanks.
In last example instead of
try
without quotes