Caught ViewDoesNotExist on rendering

I encountered an error:

Caught ViewDoesNotExist on rendering: Worked my_view_two in yourmodule.views module. Error: object 'module' does not have attribute 'my_view_two'

The error is triggered from the template tag:

<a href="{% url password_reset_link %}">{% trans "Lost your password?" %}</a> 

I used to have the my_view_two function and added this to urls.py. But later I deleted the entry and the URL function. But he still gives an error.

+4
source share
1 answer

I had similar error messages in {% url password_reset_link %} before - is this the first {% url %} in your template?

It looks like this view is being imported somewhere (perhaps elsewhere from urls.py?). Have you imported this view into another views.py file, for example?). A quick way to find files containing this is to use grep (on Linux / Mac) on the command line at the root of your site:

 $ grep -r "my_view_two" . 

This will lead to the search for this line in all files of your project (if I understand you correctly, it should not be).

0
source

All Articles