﻿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
8195	Importing models from same directory throws unhelpful exception (trying to get app_label)	Kenneth Arnold	nobody	"Before:
{{{
In [1]: import models
---------------------------------------------------------------------------
<type 'exceptions.IndexError'>            Traceback (most recent call last)
 (strip my stuff)
...django/db/models/base.py in __new__(cls, name, bases, attrs)
     54             # For 'django.contrib.sites.models', this would be 'sites'.
     55             model_module = sys.modules[new_class.__module__]
---> 56             kwargs = {""app_label"": model_module.__name__.split('.')[-2]}
     57         else:
     58             kwargs = {}
}}}

After attached patch, the relative import succeeds.
"		closed	Database layer (models, ORM)	dev		worksforme		kenneth.arnold@…	Unreviewed	1	0	0	0	0	0
