﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
21562	"Bad things happen if you name your custom user app ""auth"""	Charlie DeTar	nobody	"It seems that odd conflicts and unexpected behavior happen if you create an app specifying a custom user model and name that app ""auth""[1].  The general principle might also apply that bad things happen when you include two apps with the same ultimate module name (e.g. both ""<foo>"" and ""django.contrib.<foo>"", as well as any other dotted path to an app).

The documentation for reusable apps https://docs.djangoproject.com/en/dev/intro/reusable-apps/ mentions choosing app names that don't conflict with existing published apps for sharing convenience, but I can't find any mention of the fact that module names (even with differing dotted prefixes) should never collide for purposes of proper code function.  Particularly with custom user models, where bare ""auth"" is a very natural thing to name your own implementation, this seems worth a mention.

[1] Specific problems: importing the model in the shell (e.g. ""import auth.models.User"") resulted in importing a ""django.contrib.auth.models.User""; the post-syncdb signal for creating the first superuser followed the contract for creating a django.contrib User but put the results in a table made for the custom User, and trying to register the custom User resulted in an ""already registered"" error."	Cleanup/optimization	closed	Documentation	dev	Normal	fixed			Accepted	1	0	0	0	0	0
