sandiegopython / test-driven-django-development

This repository contains materials for a San Diego Python workshop on learning Django with test inspired development
http://test-driven-django-development.readthedocs.org/
Other
102 stars 35 forks source link

Reference views by strings in urls.py files #91

Open treyhunner opened 10 years ago

treyhunner commented 10 years ago

Currently we recommend import views from myblog and then reference views.home. Django's example uses a string 'blog.views.home' instead. I think we should do that too.

macro1 commented 10 years ago

I actually reverted the string references to imports where I was able to. I think I read somewhere the import magic is being removed at some point (by Django 2.0?) so I don't think we should encourage its usage.