﻿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
14689	AUTH_USER_PROFILE setting not parsed correctly.	twoolie	nobody	"currently the behavior  of AUTH_USER_PROFILE does not allow for imported profiles from a packaged distribution.
e.g. i have downloaded sphene community tools and i wish to set AUTH_PROFILE_MODULE = 'sphene.community.CommunityUserProfile'

The current code at <contrib/auth/models.py@357>
{{{
    try:
        app_label, model_name = settings.AUTH_PROFILE_MODULE.split('.')
    except ValueError:
        raise SiteProfileNotAvailable('app_label and model_name should'
                ' be separated by a dot in the AUTH_PROFILE_MODULE set'
                'ting')
}}}
this does not take into account that app_label can itself be dot-delimited.

I propose the following patch.
{{{
    try:
        path = settings.AUTH_PROFILE_MODULE.split('.')
        app_label = ""."".join(path[0:-1])
        model_name = path[-1]
    except ValueError:
        raise SiteProfileNotAvailable('app_label and model_name should'
                ' be separated by a dot in the AUTH_PROFILE_MODULE set'
                'ting')
}}}
"		closed	Contrib apps	1.2		invalid	AUTH_USER_PROFILE		Unreviewed	1	0	0	0	0	0
