Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Django Basics Test Time View Tests

flying programmer
flying programmer
6,030 Points

Django Reverse Function Deprecated?

I'm currently going through the Django Testing course, and have run into an issue in Django 1.9

I get the error message

Creating test database for alias 'default'... ./Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/django/template/defaulttags.py:507: RemovedInDjango110Warning: Reversing by dotted path is deprecated (learning.views.hello_world). current_app=current_app)


Ran 2 tests in 0.028s

when testing out the "test_course_list_view" method which uses the django reverse function. I'm confused by this error message because I was not using reverse on the hello_world url/view. This is the line of code:
resp = self.client.get(reverse('courses:list'))

Thank you for your time!

3 Answers

Justyna Julia Jamr贸z
Justyna Julia Jamr贸z
13,354 Points

Django developers deprecated the ability to reverse by dotted path.

Source: https://code.djangoproject.com/ticket/22384

So, is it normal to have this warning?

Ben Moore
Ben Moore
22,588 Points

I ran into the same issue. Kenneth Love, Chris Freeman is there a preferred workaround?