<s> from django . db . models import Q <EOL> from django . core . urlresolvers import reverse <EOL> MESSAGE_STRINGS = { <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> } <EOL> class TeamDefaultHookset ( object ) : <EOL> membership_search_fields = [ "<STR_LIT>" ] <EOL> def build_team_url ( self , url_name , team_slug ) : <EOL> return reverse ( url_name , args = [ team_slug ] ) <EOL> def get_autocomplete_result ( self , user ) : <EOL> return { "<STR_LIT>" : user . pk , "<STR_LIT:email>" : user . email , "<STR_LIT:name>" : user . get_full_name ( ) } <EOL> def search_queryset ( self , query , users ) : <EOL> return users . filter ( <EOL> Q ( email__icontains = query ) | <EOL> Q ( username__icontains = query ) | <EOL> Q ( first_name__icontains = query ) | <EOL> Q ( last_name__icontains = query ) <EOL> ) <EOL> def get_message_strings ( self ) : <EOL> return MESSAGE_STRINGS <EOL> def user_is_staff ( self , user ) : <EOL> return getattr ( user , "<STR_LIT>" , False ) <EOL> class HookProxy ( object ) : <EOL> def __getattr__ ( self , attr ) : <EOL> from pinax . teams . conf import settings <EOL> return getattr ( settings . TEAMS_HOOKSET , attr ) <EOL> hookset = HookProxy ( ) </s>
