示例#1
0
def gallery_detail(request, project_id, gallery_id):
    if 'HTTP_X_FILE_NAME' in request.META:
        return photo_add(request, project_id, gallery_id)
    elif not request.GET.get('ajax'):
        return project_overview(request, project_id)
    # Mode
    mode = project_getmode_helper(request, project_id)
    is_view_mode = mode == 'view'

    plan_tags_form = utility.plan_tags_form(project_id, Gallery.objects.get(id=gallery_id), 10)

    return object_detail(
        request, 
        Gallery.objects.all(), 
        object_id=gallery_id,
        template_object_name='gallery', 
        template_name='stockphoto/gallery_detail.html',
        extra_context={'project_id': project_id, 'is_view_mode': is_view_mode, 'plan_tags_form':plan_tags_form}
    )
示例#2
0
def blog_detail(request, project_id, blog_id):
    if not request.GET.get('ajax'):
        return project_overview(request, project_id)

    # Mode
    mode = project_getmode_helper(request, project_id)
    is_view_mode = mode == 'view'

    blog_full = True

    # Plan tags
    plan_tags_form = utility.plan_tags_form(project_id,
                                            Blog.objects.get(id=blog_id), 10)

    return object_detail(request,
                         Blog.objects.all(),
                         object_id=blog_id,
                         template_object_name='blog',
                         template_name='blog_detail.html',
                         extra_context=locals())
示例#3
0
def blog_detail(request, project_id, blog_id):
    if not request.GET.get('ajax'):
        return project_overview(request, project_id)

    # Mode
    mode = project_getmode_helper(request, project_id)
    is_view_mode = mode == 'view'

    blog_full = True

    # Plan tags
    plan_tags_form = utility.plan_tags_form(project_id, Blog.objects.get(id=blog_id), 10)
    

    return object_detail(
        request,
        Blog.objects.all(),
        object_id=blog_id,
        template_object_name='blog',
        template_name='blog_detail.html',
        extra_context=locals()
    )
示例#4
0
def gallery_detail(request, project_id, gallery_id):
    if 'HTTP_X_FILE_NAME' in request.META:
        return photo_add(request, project_id, gallery_id)
    elif not request.GET.get('ajax'):
        return project_overview(request, project_id)
    # Mode
    mode = project_getmode_helper(request, project_id)
    is_view_mode = mode == 'view'

    plan_tags_form = utility.plan_tags_form(project_id,
                                            Gallery.objects.get(id=gallery_id),
                                            10)

    return object_detail(request,
                         Gallery.objects.all(),
                         object_id=gallery_id,
                         template_object_name='gallery',
                         template_name='stockphoto/gallery_detail.html',
                         extra_context={
                             'project_id': project_id,
                             'is_view_mode': is_view_mode,
                             'plan_tags_form': plan_tags_form
                         })