I have problem with url tag. I want to redirect to a function that is in for eg
project_name.forum.views.function. Here is how i try to create url
{% url forum.views.function %}
it gives me this error:
Caught ViewDoesNotExist while rendering: Tried forum in module project_name.forum.views. Error was: 'module' object has no attribute 'forum'
I added this url in urls.py(I can access it directly) What am I doing wrong?
It sounds more like an incorrectly set up URL conf. You get that error when you specify a view that doesn’t exist.
The url tag failing gives you a
failure to reverse url with params...message.What does your URL conf look like? Does
project_name.forum.views.forumexist?I mean, I find it odd you can visit the page at all, but that’s the first place I’d look.