<commit_before>"""
bughipster.project.views
~~~~~~~~~~~~~~~~~~~~~~~~

:copyright: (c) 2014 by <NAME>,
see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""

from django.views import generic

from . import models


def bug_creation(request, *args, **kwargs):
    if not request.GET.get('product', None):
        return SelectProduct.as_view()(request, *args, **kwargs)
    return CreateBug.as_view()(request, *args, **kwargs)


class CreateBug(generic.CreateView):
    template_name = 'new_bug.html'
    model = models.Bug


class SelectProduct(generic.ListView):
    template_name = 'product_selection.html'
    model = models.Product
<commit_msg>Use the bug form.<commit_after>"""
bughipster.project.views
~~~~~~~~~~~~~~~~~~~~~~~~

:copyright: (c) 2014 by <NAME>,
see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""

from django.views import generic

from . import models
from . import forms


def bug_creation(request, *args, **kwargs):
    if not request.GET.get('product', None):
        return SelectProduct.as_view()(request, *args, **kwargs)
    return CreateBug.as_view()(request, *args, **kwargs)


class CreateBug(generic.CreateView):
    template_name = 'new_bug.html'
    model = models.Bug
    form_class = forms.Bug


class SelectProduct(generic.ListView):
    template_name = 'product_selection.html'
    model = models.Product

{'fraction_non_alphanumeric': 0.15340501792114694, 'fraction_numerical': 0.005734767025089606, 'mean_word_length': 4.496062992125984, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5908677', 'n_tokens_mistral': 443, 'n_tokens_neox': 413, 'n_words': 116}