﻿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
10322	Allow n-th level subpackage structure for django and apps	Vadim Fint	nobody	"A long time ago, I was decided want I want more elegant package structure for django apps. Take a look:

{{{
app.tools     < some tools
app.whatever
app.web       < django package
app.web.users < django app
}}}

Also I didnt want to put app.web into Python path. I want to put my app into python path and all should work.

Pretty soon I did found that this does not work :). First problem: django strangely determines project_name (dir there settings.py). Second: django translations cant find project locale dir.

I did wrote these two patches (backward compatible). All django tests pass. We are using them for ~1 year -- all looks perfect. The only drawback -- PROJECT_MODULE should be set in settings (e.g. PROJECT_MODULE = __import__('app.web', {}, {}, [''])), because there is no way determine valid project dir in multi-level structure.

I know, you may wanna kill me after that -- but probably idea is not so bad ;). It even allows to use subapps (e.g. app.web.app.subapp), but django will ident all apps by their name, so app package still must be unique *1)

*1: Personally my dream is to allow multiple app instances -- my business web project will require this soon, so, be ready for heavy patches :). "		closed	Core (Other)	1.0		duplicate			Unreviewed	0	0	0	0	0	0
