Пример #1
0
def presentation(request, presentation_id):
    if request.user.is_authenticated():
        presentation_object = Presentation.objects.get(pk=presentation_id)
        total_all, total_adult, total_youth, view_only = _get_presentation_totals(presentation_object)
        return render_page(request, "main/presentation.html", "PRESENTATIONS", {
            "presentation": presentation_object,
            "total_all": total_all,
            "total_adult": total_adult,
            "total_youth": total_youth,
            "view_only": view_only
        })
    else:
        return HttpResponseRedirect("/")
Пример #2
0
def presentation_order(request, presentation_id, order_id):
    if request.user.is_authenticated():
        user_profile = request.user.get_profile()
        presentation_object = Presentation.objects.get(pk=presentation_id)
        product_styles = ProductStyle.objects.filter(
            Q(product_items__order_type="ALL") | Q(product_items__order_type="PRE-BOOK")).distinct().order_by(
            "style_sku")
        return render_page(request, "main/order.html", "PRESENTATIONS", {"order_id": order_id,
                                                                         "presentation": presentation_object,
                                                                         "product_styles": product_styles,
                                                                         "user_type": user_profile.user_type,
                                                                         "order_type": "PRE-BOOK"})
    else:
        return HttpResponseRedirect("/")
Пример #3
0
def presentations(request):
    if request.user.is_authenticated():
        return render_page(request, "main/presentations.html", "PRESENTATIONS")
    else:
        return HttpResponseRedirect("/")
Пример #4
0
def presentations_report(request):
    return render_page(request, "main/presentation_report.html", "PRESENTATIONS")