sydney-linux-user-group/slug — comment on commit 3530234635d7a22fb0990e718431ffbe98d9ee5b
File: accounts/urls.py line 7
By jamezpolley:

*random tanty*

I hate this "from blah import thingy as other_thingy" malarky. It makes it really hard to tell where stuff comes from when you're reading the code.

As far as I can tell, django.contrib.auth.views is referenced precisely once in the code. Using the fully-qualified name greatly enhances readability at the cost of making one line a tad longer.

On it's own this isn't terrible, but across the whole project, this kind of malarkey adds up to a lot of difficulty. "views" as a bare name could refer to any of several "views" defined in different places - and we're not consistent, either: in this scope it's referred to as auth_views, but elsewhere it will be plain "views".

Using the fully-qualified name is consistent and transparent. These tacky inconsistent shortcuts make me cry.

*end tanty*