#NEWLINE# def get_user_home( self , user ) : #NEWLINE# #INDENT# 'Returns the default URL for a particular user.\n\n        This method can be used to customize where a user is sent when\n        they log in, etc. By default it returns the value of\n        :meth:`get_absolute_url`.\n\n        An alternative function can be supplied to customize this behavior\n        by specifying a either a URL or a function which returns a URL via\n        the ``"user_home"`` key in ``HORIZON_CONFIG``. Each of these\n        would be valid::\n\n            {"user_home": "/home",}  # A URL\n            {"user_home": "my_module.get_user_home",}  # Path to a function\n            {"user_home": lambda user: "/" + user.name,}  # A function\n            {"user_home": None,}  # Will always return the default dashboard\n\n        This can be useful if the default dashboard may not be accessible\n        to all users. When user_home is missing from HORIZON_CONFIG,\n        it will default to the settings.LOGIN_REDIRECT_URL value.\n        ' #NEWLINE# user_home = self . _conf [ 'user_home' ] #NEWLINE# if user_home : #NEWLINE# #INDENT# if callable ( user_home ) : #NEWLINE# #INDENT# return user_home ( mod ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( user_home , basestring ) : #NEWLINE# #INDENT# if ( '/' in user_home ) : #NEWLINE# #INDENT# return user_home #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ( mod , func ) = user_home . rsplit ( '.' , 1 ) #NEWLINE# return getattr ( import_module ( mod ) , func ) ( user ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# raise ValueError ( 'The user_home setting must be either a string or a callable object (e.g. a function).' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return self . get_absolute_url ( )