示例#1
0
            format=format,
        )

        return csv_response(
            event,
            ShirtOrder,
            shirt_orders,
            dialect=CSV_EXPORT_FORMATS[format],
            filename=filename,
            m2m_mode='comma_separated',
        )


if 'lippukala' in settings.INSTALLED_APPS:
    from lippukala.views import POSView
    lippukala_pos_view = POSView.as_view()

    @csrf_exempt
    @tickets_event_required
    def tickets_admin_pos_view(request, event):
        # XXX kala expects event filter via &event=foo; we specify it via /events/foo
        request.GET = request.GET.copy()
        request.GET['event'] = event.slug

        meta = event.tickets_event_meta
        if not meta:
            messages.error(request,
                           "Tämä tapahtuma ei käytä Kompassia lipunmyyntiin.")
            return redirect('core_event_view', event.slug)

        if not meta.is_user_allowed_pos_access(request.user):
示例#2
0
        info.save()

        messages.success(request, u'Majoittuja lisättiin.')
        return redirect('tickets_admin_accommodation_filtered_view', event.slug, limit_group_id)

    vars.update(
        form=form,
        limit_group=limit_group,
    )

    return render(request, 'tickets_admin_accommodation_create_view.jade', vars)


if 'lippukala' in settings.INSTALLED_APPS:
    from lippukala.views import POSView
    lippukala_pos_view = POSView.as_view()

    @csrf_exempt
    @tickets_admin_required
    def tickets_admin_pos_view(request, vars, event):
        # XXX kala expects event filter via &event=foo; we specify it via /events/foo
        request.GET = request.GET.copy()
        request.GET['event'] = event.slug

        return lippukala_pos_view(request)


def tickets_admin_menu_items(request, event):
    stats_url = url('tickets_admin_stats_view', event.slug)
    stats_active = request.path == stats_url
    stats_text = u"Myyntitilanne"
示例#3
0
        else:
            messages.error(request, u'Tuntematon toiminto.')

        return redirect('tickets_admin_tools_view', event.slug)

    vars.update(
        UNPAID_CANCEL_DAYS=UNPAID_CANCEL_DAYS,
        num_unpaid_orders_to_cancel=Order.get_unpaid_orders_to_cancel(event).count(),
    )

    return render(request, 'tickets_admin_tools_view.jade', vars)


if 'lippukala' in settings.INSTALLED_APPS:
    from lippukala.views import POSView
    tickets_admin_pos_view = csrf_exempt(tickets_admin_required(POSView.as_view()))


def tickets_admin_menu_items(request, event):
    stats_url = url('tickets_admin_stats_view', event.slug)
    stats_active = request.path == stats_url
    stats_text = u"Myyntitilanne"

    orders_url = url('tickets_admin_orders_view', event.slug)
    orders_active = request.path.startswith(orders_url)
    orders_text = u"Tilaukset"

    batches_url = url('tickets_admin_batches_view', event.slug)
    batches_active = request.path.startswith(batches_url)
    batches_text = u"Toimituserät"
示例#4
0
文件: urls.py 项目: kcsry/lippukala
from django.conf.urls import url
from django.views.decorators.csrf import csrf_exempt

from lippukala.views import POSView

urlpatterns = [url("^pos/$", csrf_exempt(POSView.as_view()))]
示例#5
0
文件: urls.py 项目: kcsry/lippukala
from django.conf.urls import url
from django.contrib.admin import site
from django.urls import include
from django.views.decorators.csrf import csrf_exempt

from lippukala.views import POSView

urlpatterns = [
    url("^admin/", site.urls),
    url("^pos/$", csrf_exempt(POSView.as_view())),
]