﻿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
27230	Inconsistency in AppConfig.path depending on sys.path	vinay karanam	nobody	"Consider the following project structure
{{{
root/
    app1/
        __init__.py
        ...
    app2/
        __init__.py
        ...
    project/
        __init__.py
        settings.py
        urls.py
        wsgi.py
    manage.py
    script.py
}}}

content of script.py is
{{{
#!python
import os
import sys

os.environ.setdefault(""DJANGO_SETTINGS_MODULE"", ""project.settings"")

import django
django.setup()

from django.apps import apps


for app in apps.get_app_configs():
    print app.path
}}}


If I run `python script.py`, output will be
{{{
$ python script.py
....
/<project_path>/root/app1
/<project_path>/root/app2
}}}

If I run `ipython script.py`, output is
{{{
$ ipython script.py
....
app1
app2
}}}

Ipython inserts !'' as the first entry in sys.path which results in path for project apps being relative path.
This in turn is making the output of `django.template.utils.get_app_template_dirs` inconsistent.

I faced this issue with python 2.7.11+
This is not an issue with python 2.7.12. I think because of [https://bugs.python.org/issue1739468 Patch #1739468]"	Bug	closed	Core (Other)	1.10	Normal	wontfix			Unreviewed	0	0	0	0	0	0
