Opened 14 years ago
Closed 14 years ago
#14689 closed (invalid)
AUTH_USER_PROFILE setting not parsed correctly.
Description ¶
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')
Note:
See TracTickets
for help on using tickets.
Nevermind, i figured out why this behavior is ok.