コード例 #1
0
ファイル: views.py プロジェクト: zouf/AllSortz
def get_unauthenticated_context():
    top_tags = get_top_tags(10)
    context = { \
            'top_sorts':top_tags,\
            'all_sorts':get_all_sorts(4),\
            'location_term':get_community(None)\
            }
    return context
コード例 #2
0
ファイル: views.py プロジェクト: zouf/AllSortz
def get_default_blank_context(user):
    user_tags = get_tags_user(user,"")
    top_tags = get_top_tags(10)    
    community = get_community(user)

    context = {\
               'communities': Community.objects.all(),\
              'community': community,\
              'user_sorts':user_tags,\
            'top_sorts':top_tags,\
             'tags': Tag.objects.all(),\
            'all_sorts':get_all_sorts(4),\
               'questions': HardTag.objects.all(),\
            'location_term':community }   
    return context     
コード例 #3
0
ファイル: views.py プロジェクト: zouf/AllSortz
def get_default_bus_context(b,user):
    comments = get_business_comments(b)
    bus_tags = get_tags_business(b,user=user,q="")
        
        
    user_tags = get_tags_user(user,"")
    top_tags = get_top_tags(10)    
    hard_tags = get_hard_tags(b)
    value_tags = get_value_tags(b)
    
    
    pages = get_pages(b,bus_tags,user)
    

    
    b = get_single_bus_data(b,user)
    context = {}
    context.update({
        'business' : b,
        'comments': comments, 
        'lat':b.lat,
        'lng':b.lon,  
        'bus_tags':bus_tags, 
        'pages': pages, 
        'master_summary': get_master_summary_tag(),
        'tags': Tag.objects.all().order_by('-descr').reverse(),
        'user_sorts':user_tags,
        'top_sorts':top_tags,
        'all_sorts':get_all_sorts(4),
        'hard_tags':hard_tags,
        'value_tags':value_tags,
        'location_term':get_community(user) ,
        'communities': Community.objects.all(),
        'following_business': is_user_subscribed(b,user),
         'feed' : get_bus_recent_activity(b),
        'bus_photos': get_all_bus_photos(b)
        })

    return context