﻿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
15019	register_models is registering models from apps that are not installed	yashh	nobody	"I am not using django's built in auth models. Instead I wrote a auth app with a user model of my choice. I wrote my own Authentication middleware and it works fine. However when I run django test suite, django is registering models Permission, Message, Group from django.contrib.auth even though ""django.contrib.auth"" is not mentioned in INSTALLED_APPS. Here is a indetail trace of the test suite

{{{
  /Users/yashh/Desktop/costell/manage.py(11)<module>()
-> execute_manager(settings)
  /Library/Python/2.6/site-packages/django/core/management/__init__.py(438)execute_manager()
-> utility.execute()
  /Library/Python/2.6/site-packages/django/core/management/__init__.py(379)execute()
-> self.fetch_command(subcommand).run_from_argv(self.argv)
  /Library/Python/2.6/site-packages/django/core/management/base.py(191)run_from_argv()
-> self.execute(*args, **options.__dict__)
  /Library/Python/2.6/site-packages/django/core/management/base.py(220)execute()
-> output = self.handle(*args, **options)
  /Library/Python/2.6/site-packages/south/management/commands/test.py(8)handle()
-> super(Command, self).handle(*args, **kwargs)
  /Library/Python/2.6/site-packages/django/core/management/commands/test.py(37)handle()
-> failures = test_runner.run_tests(test_labels)
  /Library/Python/2.6/site-packages/django/test/simple.py(314)run_tests()
-> result = self.run_suite(suite)
  /Library/Python/2.6/site-packages/django/test/simple.py(274)run_suite()
-> return DjangoTestRunner(verbosity=self.verbosity, failfast=self.failfast).run(suite)
  /Library/Python/2.6/site-packages/django/test/simple.py(31)run()
-> result = super(DjangoTestRunner, self).run(*args, **kwargs)
  /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/unittest.py(753)run()
-> test(result)
  /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/unittest.py(464)__call__()
-> return self.run(*args, **kwds)
  /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/unittest.py(460)run()
-> test(result)
  /Library/Python/2.6/site-packages/django/test/testcases.py(263)__call__()
-> super(TransactionTestCase, self).__call__(result)
  /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/unittest.py(300)__call__()
-> return self.run(*args, **kwds)
  /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/unittest.py(279)run()
-> testMethod()
  /Users/yashh/Desktop/costell/cork/tests.py(17)test_login()
-> response = self.client.get('/login/')
  /Library/Python/2.6/site-packages/django/test/client.py(298)get()
-> response = self.request(**r)
  /Library/Python/2.6/site-packages/django/test/client.py(238)request()
-> response = self.handler(environ)
  /Library/Python/2.6/site-packages/django/test/client.py(79)__call__()
-> response = self.get_response(request)
  /Library/Python/2.6/site-packages/django/core/handlers/base.py(91)get_response()
-> request.path_info)
  /Library/Python/2.6/site-packages/django/core/urlresolvers.py(215)resolve()
-> for pattern in self.url_patterns:
  /Library/Python/2.6/site-packages/django/core/urlresolvers.py(244)_get_url_patterns()
-> patterns = getattr(self.urlconf_module, ""urlpatterns"", self.urlconf_module)
  /Library/Python/2.6/site-packages/django/core/urlresolvers.py(239)_get_urlconf_module()
-> self._urlconf_module = import_module(self.urlconf_name)
  /Library/Python/2.6/site-packages/django/utils/importlib.py(35)import_module()
-> __import__(name)
  /Users/yashh/Desktop/costell/urls.py(3)<module>()
-> from django.contrib.auth import views as auth_views
  /Library/Python/2.6/site-packages/django/contrib/auth/views.py(7)<module>()
-> from django.contrib.auth.forms import AuthenticationForm
  /Library/Python/2.6/site-packages/django/contrib/auth/forms.py(1)<module>()
-> from django.contrib.auth.models import User
  /Library/Python/2.6/site-packages/django/contrib/auth/models.py(53)<module>()
-> class Permission(models.Model):
  /Library/Python/2.6/site-packages/django/db/models/base.py(193)__new__()
-> register_models(new_class._meta.app_label, new_class)
> /Library/Python/2.6/site-packages/django/db/models/loading.py(197)register_models()
}}}

The traceback ends when Permission model is passed to register_models"		closed	Database layer (models, ORM)	1.2		invalid			Unreviewed	0	0	0	0	0	0
