<commit_before>from datetime import timedelta
import json

from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect, Http404, JsonResponse
from django.utils import timezone
from django.utils.decorators import method_decorator
from django.views.generic import TemplateView, View
from zenaida.forms import modelformset_factory

from brambling.forms.attendee import (EventPersonForm, PersonDiscountForm,
                                      CheckoutForm, OwnerFormSet)
from brambling.models import (Item, PersonItem, ItemOption, Payment,
                              PersonDiscount, Discount)
from brambling.views.utils import (get_event_or_404, get_event_nav,
                                   get_event_admin_nav, ajax_required)


class AddToCartView(View):
    @method_decorator(ajax_required)
    @method_decorator(login_required)
    def post(self, request, *args, **kwargs):
        event = get_event_or_404(kwargs['slug'])<commit_msg>Removed unused imports.<commit_after>import json

from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect, Http404, JsonResponse
from django.utils import timezone
from django.utils.decorators import method_decorator
from django.views.generic import TemplateView, View

from brambling.forms.attendee import (EventPersonForm, PersonDiscountForm,
                                      CheckoutForm, OwnerFormSet)
from brambling.models import (Item, PersonItem, ItemOption, Payment,
                              PersonDiscount, Discount)
from brambling.views.utils import (get_event_or_404, get_event_nav,
                                   get_event_admin_nav, ajax_required)


class AddToCartView(View):
    @method_decorator(ajax_required)
    @method_decorator(login_required)
    def post(self, request, *args, **kwargs):
        event = get_event_or_404(kwargs['slug'])
{'fraction_non_alphanumeric': 0.06513026052104208, 'fraction_numerical': 0.009018036072144289, 'mean_word_length': 3.6988235294117646, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '939255', 'n_tokens_mistral': 553, 'n_tokens_neox': 524, 'n_words': 135}