def get_user_admin_url(value):
    '''
    Given a username (`value`), return a string containing an absolute
    path to the user's admin profile.
    '''
    users = cache_users()
    try:
        user = users.get(username=value)
        uid = str(user.id)
    except ObjectDoesNotExist:
        uid = '#'
        
    return "%s/%s" % (USER_PROFILE_URL, uid)
def get_user_admin_url(value):
    '''
    Given a username (`value`), return a string containing an absolute
    path to the user's admin profile.
    '''
    users = cache_users()
    try:
        user = users.get(username=value)
        uid = str(user.id)
    except ObjectDoesNotExist:
        uid = '#'

    return "%s/%s" % (USER_PROFILE_URL, uid)
Ejemplo n.º 3
0
 def get_choices(self):
     userdict = SortedDict([(user.id, user.username)
                            for user in cache_users()
                            if user.logentry_set.count()])
     return userdict
Ejemplo n.º 4
0
 def get_choices(self):
     userdict = SortedDict([(user.id, user.username) for user in cache_users()
                            if user.logentry_set.count()])
     return userdict